Date
July 17, 2025, 10:12 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 30.022691] ================================================================== [ 30.022765] BUG: KASAN: slab-use-after-free in workqueue_uaf+0x480/0x4a8 [ 30.022837] Read of size 8 at addr fff00000c9ab5b00 by task kunit_try_catch/231 [ 30.022889] [ 30.022925] CPU: 1 UID: 0 PID: 231 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6-next-20250717 #1 PREEMPT [ 30.023015] Tainted: [B]=BAD_PAGE, [N]=TEST [ 30.023370] Hardware name: linux,dummy-virt (DT) [ 30.023750] Call trace: [ 30.024220] show_stack+0x20/0x38 (C) [ 30.024446] dump_stack_lvl+0x8c/0xd0 [ 30.024498] print_report+0x118/0x5d0 [ 30.024550] kasan_report+0xdc/0x128 [ 30.024947] __asan_report_load8_noabort+0x20/0x30 [ 30.025305] workqueue_uaf+0x480/0x4a8 [ 30.025368] kunit_try_run_case+0x170/0x3f0 [ 30.025419] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 30.025888] kthread+0x328/0x630 [ 30.026159] ret_from_fork+0x10/0x20 [ 30.026212] [ 30.026588] Allocated by task 231: [ 30.026635] kasan_save_stack+0x3c/0x68 [ 30.026680] kasan_save_track+0x20/0x40 [ 30.026715] kasan_save_alloc_info+0x40/0x58 [ 30.026752] __kasan_kmalloc+0xd4/0xd8 [ 30.026794] __kmalloc_cache_noprof+0x16c/0x3c0 [ 30.026836] workqueue_uaf+0x13c/0x4a8 [ 30.027550] kunit_try_run_case+0x170/0x3f0 [ 30.027809] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 30.028171] kthread+0x328/0x630 [ 30.028351] ret_from_fork+0x10/0x20 [ 30.028462] [ 30.028494] Freed by task 75: [ 30.028521] kasan_save_stack+0x3c/0x68 [ 30.028665] kasan_save_track+0x20/0x40 [ 30.028706] kasan_save_free_info+0x4c/0x78 [ 30.028745] __kasan_slab_free+0x6c/0x98 [ 30.028890] kfree+0x214/0x3c8 [ 30.028927] workqueue_uaf_work+0x18/0x30 [ 30.028965] process_one_work+0x530/0xf88 [ 30.029005] worker_thread+0x618/0xf38 [ 30.029041] kthread+0x328/0x630 [ 30.029086] ret_from_fork+0x10/0x20 [ 30.029120] [ 30.029140] Last potentially related work creation: [ 30.029167] kasan_save_stack+0x3c/0x68 [ 30.030017] kasan_record_aux_stack+0xb4/0xc8 [ 30.030084] __queue_work+0x65c/0xfe0 [ 30.030123] queue_work_on+0xbc/0xf8 [ 30.030164] workqueue_uaf+0x210/0x4a8 [ 30.030202] kunit_try_run_case+0x170/0x3f0 [ 30.030511] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 30.030766] kthread+0x328/0x630 [ 30.030984] ret_from_fork+0x10/0x20 [ 30.031023] [ 30.031043] The buggy address belongs to the object at fff00000c9ab5b00 [ 30.031043] which belongs to the cache kmalloc-32 of size 32 [ 30.031508] The buggy address is located 0 bytes inside of [ 30.031508] freed 32-byte region [fff00000c9ab5b00, fff00000c9ab5b20) [ 30.031576] [ 30.031599] The buggy address belongs to the physical page: [ 30.031854] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109ab5 [ 30.032072] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 30.032220] page_type: f5(slab) [ 30.032290] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 30.032658] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 30.032718] page dumped because: kasan: bad access detected [ 30.032775] [ 30.032803] Memory state around the buggy address: [ 30.032839] fff00000c9ab5a00: 00 00 03 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 30.033136] fff00000c9ab5a80: 00 00 00 fc fc fc fc fc 00 00 00 07 fc fc fc fc [ 30.033184] >fff00000c9ab5b00: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 30.033530] ^ [ 30.033632] fff00000c9ab5b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 30.033675] fff00000c9ab5c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 30.033714] ==================================================================
[ 26.248066] ================================================================== [ 26.248600] BUG: KASAN: slab-use-after-free in workqueue_uaf+0x4d6/0x560 [ 26.248827] Read of size 8 at addr ffff88810613bf00 by task kunit_try_catch/249 [ 26.249041] [ 26.249174] CPU: 0 UID: 0 PID: 249 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6-next-20250717 #1 PREEMPT(voluntary) [ 26.249457] Tainted: [B]=BAD_PAGE, [N]=TEST [ 26.249475] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 26.249498] Call Trace: [ 26.249511] <TASK> [ 26.249529] dump_stack_lvl+0x73/0xb0 [ 26.249562] print_report+0xd1/0x610 [ 26.249583] ? __virt_addr_valid+0x1db/0x2d0 [ 26.249607] ? workqueue_uaf+0x4d6/0x560 [ 26.249627] ? kasan_complete_mode_report_info+0x64/0x200 [ 26.249651] ? workqueue_uaf+0x4d6/0x560 [ 26.249672] kasan_report+0x141/0x180 [ 26.249693] ? workqueue_uaf+0x4d6/0x560 [ 26.249718] __asan_report_load8_noabort+0x18/0x20 [ 26.249740] workqueue_uaf+0x4d6/0x560 [ 26.249761] ? __pfx_workqueue_uaf+0x10/0x10 [ 26.249782] ? __schedule+0x10c6/0x2b60 [ 26.249804] ? __pfx_read_tsc+0x10/0x10 [ 26.249825] ? ktime_get_ts64+0x86/0x230 [ 26.249850] kunit_try_run_case+0x1a5/0x480 [ 26.249874] ? __pfx_kunit_try_run_case+0x10/0x10 [ 26.249895] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 26.249917] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 26.249945] ? __kthread_parkme+0x82/0x180 [ 26.249970] ? preempt_count_sub+0x50/0x80 [ 26.249993] ? __pfx_kunit_try_run_case+0x10/0x10 [ 26.250015] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 26.250037] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 26.250059] kthread+0x337/0x6f0 [ 26.250462] ? trace_preempt_on+0x20/0xc0 [ 26.250522] ? __pfx_kthread+0x10/0x10 [ 26.250557] ? _raw_spin_unlock_irq+0x47/0x80 [ 26.250578] ? calculate_sigpending+0x7b/0xa0 [ 26.250602] ? __pfx_kthread+0x10/0x10 [ 26.250622] ret_from_fork+0x116/0x1d0 [ 26.250640] ? __pfx_kthread+0x10/0x10 [ 26.250660] ret_from_fork_asm+0x1a/0x30 [ 26.250691] </TASK> [ 26.250702] [ 26.265124] Allocated by task 249: [ 26.265668] kasan_save_stack+0x45/0x70 [ 26.266225] kasan_save_track+0x18/0x40 [ 26.266721] kasan_save_alloc_info+0x3b/0x50 [ 26.267053] __kasan_kmalloc+0xb7/0xc0 [ 26.267197] __kmalloc_cache_noprof+0x189/0x420 [ 26.267355] workqueue_uaf+0x152/0x560 [ 26.267630] kunit_try_run_case+0x1a5/0x480 [ 26.268322] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 26.268869] kthread+0x337/0x6f0 [ 26.269299] ret_from_fork+0x116/0x1d0 [ 26.269739] ret_from_fork_asm+0x1a/0x30 [ 26.270197] [ 26.270507] Freed by task 9: [ 26.270856] kasan_save_stack+0x45/0x70 [ 26.270995] kasan_save_track+0x18/0x40 [ 26.271137] kasan_save_free_info+0x3f/0x60 [ 26.271327] __kasan_slab_free+0x56/0x70 [ 26.271976] kfree+0x222/0x3f0 [ 26.272451] workqueue_uaf_work+0x12/0x20 [ 26.272948] process_one_work+0x5ee/0xf60 [ 26.273521] worker_thread+0x758/0x1220 [ 26.273976] kthread+0x337/0x6f0 [ 26.274390] ret_from_fork+0x116/0x1d0 [ 26.274765] ret_from_fork_asm+0x1a/0x30 [ 26.274912] [ 26.274978] Last potentially related work creation: [ 26.275136] kasan_save_stack+0x45/0x70 [ 26.275287] kasan_record_aux_stack+0xb2/0xc0 [ 26.275987] __queue_work+0x61a/0xe70 [ 26.276596] queue_work_on+0xb6/0xc0 [ 26.277060] workqueue_uaf+0x26d/0x560 [ 26.277578] kunit_try_run_case+0x1a5/0x480 [ 26.278065] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 26.278697] kthread+0x337/0x6f0 [ 26.279094] ret_from_fork+0x116/0x1d0 [ 26.279526] ret_from_fork_asm+0x1a/0x30 [ 26.279886] [ 26.280042] The buggy address belongs to the object at ffff88810613bf00 [ 26.280042] which belongs to the cache kmalloc-32 of size 32 [ 26.281056] The buggy address is located 0 bytes inside of [ 26.281056] freed 32-byte region [ffff88810613bf00, ffff88810613bf20) [ 26.281890] [ 26.281973] The buggy address belongs to the physical page: [ 26.282159] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10613b [ 26.282406] flags: 0x200000000000000(node=0|zone=2) [ 26.282566] page_type: f5(slab) [ 26.282688] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 26.282918] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 26.283146] page dumped because: kasan: bad access detected [ 26.283309] [ 26.283370] Memory state around the buggy address: [ 26.283519] ffff88810613be00: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc [ 26.283725] ffff88810613be80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 26.283930] >ffff88810613bf00: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 26.284262] ^ [ 26.284540] ffff88810613bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.285659] ffff88810613c000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.285940] ==================================================================