Date
July 20, 2025, 11:12 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 15.658225] ================================================================== [ 15.659536] BUG: KASAN: slab-use-after-free in workqueue_uaf+0x480/0x4a8 [ 15.660011] Read of size 8 at addr fff00000c700ffc0 by task kunit_try_catch/200 [ 15.660251] [ 15.660394] CPU: 0 UID: 0 PID: 200 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT [ 15.660497] Tainted: [B]=BAD_PAGE, [N]=TEST [ 15.660524] Hardware name: linux,dummy-virt (DT) [ 15.661116] Call trace: [ 15.661383] show_stack+0x20/0x38 (C) [ 15.661439] dump_stack_lvl+0x8c/0xd0 [ 15.661487] print_report+0x118/0x5d0 [ 15.661535] kasan_report+0xdc/0x128 [ 15.662628] __asan_report_load8_noabort+0x20/0x30 [ 15.663304] workqueue_uaf+0x480/0x4a8 [ 15.664294] kunit_try_run_case+0x170/0x3f0 [ 15.664592] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.664703] kthread+0x328/0x630 [ 15.665469] ret_from_fork+0x10/0x20 [ 15.665828] [ 15.665848] Allocated by task 200: [ 15.665930] kasan_save_stack+0x3c/0x68 [ 15.666337] kasan_save_track+0x20/0x40 [ 15.666657] kasan_save_alloc_info+0x40/0x58 [ 15.667110] __kasan_kmalloc+0xd4/0xd8 [ 15.667311] __kmalloc_cache_noprof+0x16c/0x3c0 [ 15.667364] workqueue_uaf+0x13c/0x4a8 [ 15.667805] kunit_try_run_case+0x170/0x3f0 [ 15.668575] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.668959] kthread+0x328/0x630 [ 15.669267] ret_from_fork+0x10/0x20 [ 15.669791] [ 15.669840] Freed by task 9: [ 15.670064] kasan_save_stack+0x3c/0x68 [ 15.670453] kasan_save_track+0x20/0x40 [ 15.670617] kasan_save_free_info+0x4c/0x78 [ 15.670832] __kasan_slab_free+0x6c/0x98 [ 15.671099] kfree+0x214/0x3c8 [ 15.671753] workqueue_uaf_work+0x18/0x30 [ 15.672768] process_one_work+0x530/0xf98 [ 15.672865] worker_thread+0x618/0xf38 [ 15.672902] kthread+0x328/0x630 [ 15.672940] ret_from_fork+0x10/0x20 [ 15.672978] [ 15.673026] Last potentially related work creation: [ 15.673559] kasan_save_stack+0x3c/0x68 [ 15.673611] kasan_record_aux_stack+0xb4/0xc8 [ 15.673652] __queue_work+0x65c/0x1008 [ 15.673861] queue_work_on+0xbc/0xf8 [ 15.673900] workqueue_uaf+0x210/0x4a8 [ 15.673935] kunit_try_run_case+0x170/0x3f0 [ 15.674091] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.674148] kthread+0x328/0x630 [ 15.674180] ret_from_fork+0x10/0x20 [ 15.674501] [ 15.674702] The buggy address belongs to the object at fff00000c700ffc0 [ 15.674702] which belongs to the cache kmalloc-32 of size 32 [ 15.675366] The buggy address is located 0 bytes inside of [ 15.675366] freed 32-byte region [fff00000c700ffc0, fff00000c700ffe0) [ 15.675444] [ 15.675468] The buggy address belongs to the physical page: [ 15.675501] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10700f [ 15.676121] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 15.676222] page_type: f5(slab) [ 15.676869] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 15.677028] raw: 0000000000000000 0000000000400040 00000000f5000000 0000000000000000 [ 15.677523] page dumped because: kasan: bad access detected [ 15.678005] [ 15.678057] Memory state around the buggy address: [ 15.678095] fff00000c700fe80: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 15.678743] fff00000c700ff00: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 15.678869] >fff00000c700ff80: 00 00 00 07 fc fc fc fc fa fb fb fb fc fc fc fc [ 15.679075] ^ [ 15.679115] fff00000c7010000: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 15.679612] fff00000c7010080: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 15.680003] ==================================================================
[ 12.917483] ================================================================== [ 12.918091] BUG: KASAN: slab-use-after-free in workqueue_uaf+0x4d6/0x560 [ 12.918314] Read of size 8 at addr ffff888102ad8c40 by task kunit_try_catch/217 [ 12.919387] [ 12.919756] CPU: 0 UID: 0 PID: 217 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT(voluntary) [ 12.919803] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.919814] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.919835] Call Trace: [ 12.919846] <TASK> [ 12.919862] dump_stack_lvl+0x73/0xb0 [ 12.919892] print_report+0xd1/0x610 [ 12.919926] ? __virt_addr_valid+0x1db/0x2d0 [ 12.919947] ? workqueue_uaf+0x4d6/0x560 [ 12.919967] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.919987] ? workqueue_uaf+0x4d6/0x560 [ 12.920007] kasan_report+0x141/0x180 [ 12.920027] ? workqueue_uaf+0x4d6/0x560 [ 12.920052] __asan_report_load8_noabort+0x18/0x20 [ 12.920074] workqueue_uaf+0x4d6/0x560 [ 12.920095] ? __pfx_workqueue_uaf+0x10/0x10 [ 12.920115] ? __schedule+0x10cc/0x2b60 [ 12.920136] ? __pfx_read_tsc+0x10/0x10 [ 12.920156] ? ktime_get_ts64+0x86/0x230 [ 12.920179] kunit_try_run_case+0x1a5/0x480 [ 12.920202] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.920223] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.920245] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.920267] ? __kthread_parkme+0x82/0x180 [ 12.920285] ? preempt_count_sub+0x50/0x80 [ 12.920307] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.920329] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.920358] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.920380] kthread+0x337/0x6f0 [ 12.920398] ? trace_preempt_on+0x20/0xc0 [ 12.920422] ? __pfx_kthread+0x10/0x10 [ 12.920441] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.920460] ? calculate_sigpending+0x7b/0xa0 [ 12.920482] ? __pfx_kthread+0x10/0x10 [ 12.920502] ret_from_fork+0x116/0x1d0 [ 12.920519] ? __pfx_kthread+0x10/0x10 [ 12.920538] ret_from_fork_asm+0x1a/0x30 [ 12.920567] </TASK> [ 12.920577] [ 12.932583] Allocated by task 217: [ 12.932879] kasan_save_stack+0x45/0x70 [ 12.933169] kasan_save_track+0x18/0x40 [ 12.933344] kasan_save_alloc_info+0x3b/0x50 [ 12.933543] __kasan_kmalloc+0xb7/0xc0 [ 12.934115] __kmalloc_cache_noprof+0x189/0x420 [ 12.934950] workqueue_uaf+0x152/0x560 [ 12.935150] kunit_try_run_case+0x1a5/0x480 [ 12.935330] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.935790] kthread+0x337/0x6f0 [ 12.936088] ret_from_fork+0x116/0x1d0 [ 12.936281] ret_from_fork_asm+0x1a/0x30 [ 12.936620] [ 12.936734] Freed by task 9: [ 12.937049] kasan_save_stack+0x45/0x70 [ 12.937234] kasan_save_track+0x18/0x40 [ 12.937578] kasan_save_free_info+0x3f/0x60 [ 12.937944] __kasan_slab_free+0x56/0x70 [ 12.938133] kfree+0x222/0x3f0 [ 12.938282] workqueue_uaf_work+0x12/0x20 [ 12.938721] process_one_work+0x5ee/0xf60 [ 12.939114] worker_thread+0x758/0x1220 [ 12.939453] kthread+0x337/0x6f0 [ 12.939948] ret_from_fork+0x116/0x1d0 [ 12.940267] ret_from_fork_asm+0x1a/0x30 [ 12.940602] [ 12.940866] Last potentially related work creation: [ 12.941096] kasan_save_stack+0x45/0x70 [ 12.941273] kasan_record_aux_stack+0xb2/0xc0 [ 12.941656] __queue_work+0x626/0xeb0 [ 12.942037] queue_work_on+0xb6/0xc0 [ 12.942225] workqueue_uaf+0x26d/0x560 [ 12.942577] kunit_try_run_case+0x1a5/0x480 [ 12.942974] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.943677] kthread+0x337/0x6f0 [ 12.943936] ret_from_fork+0x116/0x1d0 [ 12.944250] ret_from_fork_asm+0x1a/0x30 [ 12.944682] [ 12.944841] The buggy address belongs to the object at ffff888102ad8c40 [ 12.944841] which belongs to the cache kmalloc-32 of size 32 [ 12.945341] The buggy address is located 0 bytes inside of [ 12.945341] freed 32-byte region [ffff888102ad8c40, ffff888102ad8c60) [ 12.946522] [ 12.946764] The buggy address belongs to the physical page: [ 12.947012] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102ad8 [ 12.947327] flags: 0x200000000000000(node=0|zone=2) [ 12.947854] page_type: f5(slab) [ 12.948155] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 12.948599] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 12.949077] page dumped because: kasan: bad access detected [ 12.949297] [ 12.949623] Memory state around the buggy address: [ 12.949894] ffff888102ad8b00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 12.950420] ffff888102ad8b80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 12.950726] >ffff888102ad8c00: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 12.951008] ^ [ 12.951226] ffff888102ad8c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.951878] ffff888102ad8d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.952347] ==================================================================