Date
July 5, 2025, 11:11 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 18.516896] ================================================================== [ 18.516986] BUG: KASAN: slab-use-after-free in workqueue_uaf+0x480/0x4a8 [ 18.517041] Read of size 8 at addr fff00000c65c4cc0 by task kunit_try_catch/200 [ 18.517089] [ 18.517120] CPU: 0 UID: 0 PID: 200 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 18.517214] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.517239] Hardware name: linux,dummy-virt (DT) [ 18.517854] Call trace: [ 18.517883] show_stack+0x20/0x38 (C) [ 18.517933] dump_stack_lvl+0x8c/0xd0 [ 18.518256] print_report+0x118/0x608 [ 18.518310] kasan_report+0xdc/0x128 [ 18.518362] __asan_report_load8_noabort+0x20/0x30 [ 18.518597] workqueue_uaf+0x480/0x4a8 [ 18.518920] kunit_try_run_case+0x170/0x3f0 [ 18.519016] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.519067] kthread+0x328/0x630 [ 18.519108] ret_from_fork+0x10/0x20 [ 18.519264] [ 18.519289] Allocated by task 200: [ 18.519318] kasan_save_stack+0x3c/0x68 [ 18.519676] kasan_save_track+0x20/0x40 [ 18.519727] kasan_save_alloc_info+0x40/0x58 [ 18.519768] __kasan_kmalloc+0xd4/0xd8 [ 18.519804] __kmalloc_cache_noprof+0x16c/0x3c0 [ 18.519842] workqueue_uaf+0x13c/0x4a8 [ 18.521606] kunit_try_run_case+0x170/0x3f0 [ 18.521668] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.521713] kthread+0x328/0x630 [ 18.521745] ret_from_fork+0x10/0x20 [ 18.521782] [ 18.521801] Freed by task 75: [ 18.521830] kasan_save_stack+0x3c/0x68 [ 18.521870] kasan_save_track+0x20/0x40 [ 18.521909] kasan_save_free_info+0x4c/0x78 [ 18.521947] __kasan_slab_free+0x6c/0x98 [ 18.522340] kfree+0x214/0x3c8 [ 18.522428] workqueue_uaf_work+0x18/0x30 [ 18.522470] process_one_work+0x530/0xf98 [ 18.522526] worker_thread+0x618/0xf38 [ 18.522560] kthread+0x328/0x630 [ 18.522593] ret_from_fork+0x10/0x20 [ 18.522628] [ 18.522649] Last potentially related work creation: [ 18.522677] kasan_save_stack+0x3c/0x68 [ 18.522958] kasan_record_aux_stack+0xb4/0xc8 [ 18.523021] __queue_work+0x65c/0x1008 [ 18.523058] queue_work_on+0xbc/0xf8 [ 18.523344] workqueue_uaf+0x210/0x4a8 [ 18.523440] kunit_try_run_case+0x170/0x3f0 [ 18.523479] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.523522] kthread+0x328/0x630 [ 18.523553] ret_from_fork+0x10/0x20 [ 18.523589] [ 18.523620] The buggy address belongs to the object at fff00000c65c4cc0 [ 18.523620] which belongs to the cache kmalloc-32 of size 32 [ 18.523678] The buggy address is located 0 bytes inside of [ 18.523678] freed 32-byte region [fff00000c65c4cc0, fff00000c65c4ce0) [ 18.523752] [ 18.524003] The buggy address belongs to the physical page: [ 18.524092] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1065c4 [ 18.524146] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 18.524384] page_type: f5(slab) [ 18.524477] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 18.524531] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 18.524690] page dumped because: kasan: bad access detected [ 18.524825] [ 18.524843] Memory state around the buggy address: [ 18.524874] fff00000c65c4b80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 18.525120] fff00000c65c4c00: 00 00 03 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 18.525408] >fff00000c65c4c80: 00 00 00 07 fc fc fc fc fa fb fb fb fc fc fc fc [ 18.525454] ^ [ 18.525516] fff00000c65c4d00: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.525558] fff00000c65c4d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.525597] ==================================================================
[ 14.270074] ================================================================== [ 14.270661] BUG: KASAN: slab-use-after-free in workqueue_uaf+0x4d6/0x560 [ 14.270947] Read of size 8 at addr ffff8881029fd180 by task kunit_try_catch/218 [ 14.271393] [ 14.272125] CPU: 1 UID: 0 PID: 218 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 14.272211] Tainted: [B]=BAD_PAGE, [N]=TEST [ 14.272225] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 14.272251] Call Trace: [ 14.272267] <TASK> [ 14.272289] dump_stack_lvl+0x73/0xb0 [ 14.272332] print_report+0xd1/0x650 [ 14.272360] ? __virt_addr_valid+0x1db/0x2d0 [ 14.272388] ? workqueue_uaf+0x4d6/0x560 [ 14.272413] ? kasan_complete_mode_report_info+0x64/0x200 [ 14.272437] ? workqueue_uaf+0x4d6/0x560 [ 14.272461] kasan_report+0x141/0x180 [ 14.272486] ? workqueue_uaf+0x4d6/0x560 [ 14.272515] __asan_report_load8_noabort+0x18/0x20 [ 14.272542] workqueue_uaf+0x4d6/0x560 [ 14.272567] ? __pfx_workqueue_uaf+0x10/0x10 [ 14.272592] ? __schedule+0x10cc/0x2b60 [ 14.272617] ? __pfx_read_tsc+0x10/0x10 [ 14.272642] ? ktime_get_ts64+0x86/0x230 [ 14.272670] kunit_try_run_case+0x1a5/0x480 [ 14.272699] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.272724] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 14.272752] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 14.272779] ? __kthread_parkme+0x82/0x180 [ 14.272817] ? preempt_count_sub+0x50/0x80 [ 14.272845] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.272871] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.272897] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 14.272922] kthread+0x337/0x6f0 [ 14.272944] ? trace_preempt_on+0x20/0xc0 [ 14.272970] ? __pfx_kthread+0x10/0x10 [ 14.272993] ? _raw_spin_unlock_irq+0x47/0x80 [ 14.273017] ? calculate_sigpending+0x7b/0xa0 [ 14.273044] ? __pfx_kthread+0x10/0x10 [ 14.273068] ret_from_fork+0x116/0x1d0 [ 14.273104] ? __pfx_kthread+0x10/0x10 [ 14.273127] ret_from_fork_asm+0x1a/0x30 [ 14.273184] </TASK> [ 14.273199] [ 14.285400] Allocated by task 218: [ 14.285624] kasan_save_stack+0x45/0x70 [ 14.285869] kasan_save_track+0x18/0x40 [ 14.286326] kasan_save_alloc_info+0x3b/0x50 [ 14.286576] __kasan_kmalloc+0xb7/0xc0 [ 14.286741] __kmalloc_cache_noprof+0x189/0x420 [ 14.286976] workqueue_uaf+0x152/0x560 [ 14.287668] kunit_try_run_case+0x1a5/0x480 [ 14.288057] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.288695] kthread+0x337/0x6f0 [ 14.289049] ret_from_fork+0x116/0x1d0 [ 14.289549] ret_from_fork_asm+0x1a/0x30 [ 14.289780] [ 14.289885] Freed by task 41: [ 14.290461] kasan_save_stack+0x45/0x70 [ 14.290825] kasan_save_track+0x18/0x40 [ 14.291058] kasan_save_free_info+0x3f/0x60 [ 14.291538] __kasan_slab_free+0x56/0x70 [ 14.291987] kfree+0x222/0x3f0 [ 14.292396] workqueue_uaf_work+0x12/0x20 [ 14.292576] process_one_work+0x5ee/0xf60 [ 14.293035] worker_thread+0x758/0x1220 [ 14.293475] kthread+0x337/0x6f0 [ 14.293694] ret_from_fork+0x116/0x1d0 [ 14.293931] ret_from_fork_asm+0x1a/0x30 [ 14.294569] [ 14.294697] Last potentially related work creation: [ 14.294933] kasan_save_stack+0x45/0x70 [ 14.295435] kasan_record_aux_stack+0xb2/0xc0 [ 14.296304] __queue_work+0x626/0xeb0 [ 14.296483] queue_work_on+0xb6/0xc0 [ 14.296631] workqueue_uaf+0x26d/0x560 [ 14.296780] kunit_try_run_case+0x1a5/0x480 [ 14.297142] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.297354] kthread+0x337/0x6f0 [ 14.297492] ret_from_fork+0x116/0x1d0 [ 14.297642] ret_from_fork_asm+0x1a/0x30 [ 14.298561] [ 14.299420] The buggy address belongs to the object at ffff8881029fd180 [ 14.299420] which belongs to the cache kmalloc-32 of size 32 [ 14.301341] The buggy address is located 0 bytes inside of [ 14.301341] freed 32-byte region [ffff8881029fd180, ffff8881029fd1a0) [ 14.302037] [ 14.302758] The buggy address belongs to the physical page: [ 14.303622] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029fd [ 14.303940] flags: 0x200000000000000(node=0|zone=2) [ 14.304149] page_type: f5(slab) [ 14.304315] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 14.304713] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 14.307058] page dumped because: kasan: bad access detected [ 14.307919] [ 14.308010] Memory state around the buggy address: [ 14.308543] ffff8881029fd080: 00 00 05 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 14.308947] ffff8881029fd100: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 14.309483] >ffff8881029fd180: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 14.309815] ^ [ 14.310003] ffff8881029fd200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 14.310608] ffff8881029fd280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 14.310965] ==================================================================