Date
July 10, 2025, 6:10 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 17.425089] ================================================================== [ 17.425947] BUG: KASAN: slab-use-after-free in workqueue_uaf+0x480/0x4a8 [ 17.426036] Read of size 8 at addr fff00000c5a2dd80 by task kunit_try_catch/200 [ 17.426086] [ 17.426125] CPU: 1 UID: 0 PID: 200 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT [ 17.426212] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.426240] Hardware name: linux,dummy-virt (DT) [ 17.426271] Call trace: [ 17.426295] show_stack+0x20/0x38 (C) [ 17.426359] dump_stack_lvl+0x8c/0xd0 [ 17.426408] print_report+0x118/0x608 [ 17.426456] kasan_report+0xdc/0x128 [ 17.426501] __asan_report_load8_noabort+0x20/0x30 [ 17.426554] workqueue_uaf+0x480/0x4a8 [ 17.426600] kunit_try_run_case+0x170/0x3f0 [ 17.426650] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.426709] kthread+0x328/0x630 [ 17.426754] ret_from_fork+0x10/0x20 [ 17.426802] [ 17.426820] Allocated by task 200: [ 17.426852] kasan_save_stack+0x3c/0x68 [ 17.426897] kasan_save_track+0x20/0x40 [ 17.426937] kasan_save_alloc_info+0x40/0x58 [ 17.426976] __kasan_kmalloc+0xd4/0xd8 [ 17.427013] __kmalloc_cache_noprof+0x16c/0x3c0 [ 17.427053] workqueue_uaf+0x13c/0x4a8 [ 17.427089] kunit_try_run_case+0x170/0x3f0 [ 17.427127] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.427170] kthread+0x328/0x630 [ 17.427203] ret_from_fork+0x10/0x20 [ 17.427239] [ 17.427257] Freed by task 48: [ 17.427284] kasan_save_stack+0x3c/0x68 [ 17.427320] kasan_save_track+0x20/0x40 [ 17.427368] kasan_save_free_info+0x4c/0x78 [ 17.427412] __kasan_slab_free+0x6c/0x98 [ 17.427449] kfree+0x214/0x3c8 [ 17.427483] workqueue_uaf_work+0x18/0x30 [ 17.427519] process_one_work+0x530/0xf98 [ 17.427557] worker_thread+0x618/0xf38 [ 17.427595] kthread+0x328/0x630 [ 17.427628] ret_from_fork+0x10/0x20 [ 17.427665] [ 17.427685] Last potentially related work creation: [ 17.427711] kasan_save_stack+0x3c/0x68 [ 17.427750] kasan_record_aux_stack+0xb4/0xc8 [ 17.427791] __queue_work+0x65c/0x1008 [ 17.427828] queue_work_on+0xbc/0xf8 [ 17.427863] workqueue_uaf+0x210/0x4a8 [ 17.427899] kunit_try_run_case+0x170/0x3f0 [ 17.427938] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.427983] kthread+0x328/0x630 [ 17.428016] ret_from_fork+0x10/0x20 [ 17.428054] [ 17.428072] The buggy address belongs to the object at fff00000c5a2dd80 [ 17.428072] which belongs to the cache kmalloc-32 of size 32 [ 17.428130] The buggy address is located 0 bytes inside of [ 17.428130] freed 32-byte region [fff00000c5a2dd80, fff00000c5a2dda0) [ 17.428189] [ 17.428212] The buggy address belongs to the physical page: [ 17.428245] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105a2d [ 17.428300] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 17.428424] page_type: f5(slab) [ 17.428483] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 17.428997] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 17.429044] page dumped because: kasan: bad access detected [ 17.429078] [ 17.429097] Memory state around the buggy address: [ 17.429132] fff00000c5a2dc80: 00 00 03 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 17.429175] fff00000c5a2dd00: 00 00 00 fc fc fc fc fc 00 00 00 07 fc fc fc fc [ 17.429435] >fff00000c5a2dd80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 17.429888] ^ [ 17.430422] fff00000c5a2de00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.430469] fff00000c5a2de80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.430508] ==================================================================
[ 13.086858] ================================================================== [ 13.087623] BUG: KASAN: slab-use-after-free in workqueue_uaf+0x4d6/0x560 [ 13.087907] Read of size 8 at addr ffff88810279cfc0 by task kunit_try_catch/217 [ 13.088353] [ 13.088469] CPU: 1 UID: 0 PID: 217 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT(voluntary) [ 13.088513] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.088524] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.088543] Call Trace: [ 13.088555] <TASK> [ 13.088570] dump_stack_lvl+0x73/0xb0 [ 13.088599] print_report+0xd1/0x650 [ 13.088620] ? __virt_addr_valid+0x1db/0x2d0 [ 13.088664] ? workqueue_uaf+0x4d6/0x560 [ 13.088685] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.088708] ? workqueue_uaf+0x4d6/0x560 [ 13.088729] kasan_report+0x141/0x180 [ 13.088750] ? workqueue_uaf+0x4d6/0x560 [ 13.088776] __asan_report_load8_noabort+0x18/0x20 [ 13.088801] workqueue_uaf+0x4d6/0x560 [ 13.088822] ? __pfx_workqueue_uaf+0x10/0x10 [ 13.088844] ? __schedule+0x10cc/0x2b60 [ 13.088917] ? __pfx_read_tsc+0x10/0x10 [ 13.088972] ? ktime_get_ts64+0x86/0x230 [ 13.088997] kunit_try_run_case+0x1a5/0x480 [ 13.089021] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.089054] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 13.089078] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.089102] ? __kthread_parkme+0x82/0x180 [ 13.089122] ? preempt_count_sub+0x50/0x80 [ 13.089145] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.089170] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.089194] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 13.089221] kthread+0x337/0x6f0 [ 13.089241] ? trace_preempt_on+0x20/0xc0 [ 13.089265] ? __pfx_kthread+0x10/0x10 [ 13.089285] ? _raw_spin_unlock_irq+0x47/0x80 [ 13.089307] ? calculate_sigpending+0x7b/0xa0 [ 13.089331] ? __pfx_kthread+0x10/0x10 [ 13.089351] ret_from_fork+0x116/0x1d0 [ 13.089369] ? __pfx_kthread+0x10/0x10 [ 13.089389] ret_from_fork_asm+0x1a/0x30 [ 13.089419] </TASK> [ 13.089429] [ 13.099164] Allocated by task 217: [ 13.099312] kasan_save_stack+0x45/0x70 [ 13.099587] kasan_save_track+0x18/0x40 [ 13.099779] kasan_save_alloc_info+0x3b/0x50 [ 13.100059] __kasan_kmalloc+0xb7/0xc0 [ 13.100322] __kmalloc_cache_noprof+0x189/0x420 [ 13.100542] workqueue_uaf+0x152/0x560 [ 13.100689] kunit_try_run_case+0x1a5/0x480 [ 13.101056] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.101350] kthread+0x337/0x6f0 [ 13.101494] ret_from_fork+0x116/0x1d0 [ 13.101700] ret_from_fork_asm+0x1a/0x30 [ 13.101893] [ 13.101985] Freed by task 44: [ 13.102162] kasan_save_stack+0x45/0x70 [ 13.102295] kasan_save_track+0x18/0x40 [ 13.102644] kasan_save_free_info+0x3f/0x60 [ 13.103087] __kasan_slab_free+0x56/0x70 [ 13.103305] kfree+0x222/0x3f0 [ 13.103530] workqueue_uaf_work+0x12/0x20 [ 13.103791] process_one_work+0x5ee/0xf60 [ 13.103935] worker_thread+0x758/0x1220 [ 13.104659] kthread+0x337/0x6f0 [ 13.104862] ret_from_fork+0x116/0x1d0 [ 13.105278] ret_from_fork_asm+0x1a/0x30 [ 13.105498] [ 13.105588] Last potentially related work creation: [ 13.105793] kasan_save_stack+0x45/0x70 [ 13.106202] kasan_record_aux_stack+0xb2/0xc0 [ 13.106554] __queue_work+0x626/0xeb0 [ 13.106923] queue_work_on+0xb6/0xc0 [ 13.107360] workqueue_uaf+0x26d/0x560 [ 13.107545] kunit_try_run_case+0x1a5/0x480 [ 13.107742] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.108292] kthread+0x337/0x6f0 [ 13.108584] ret_from_fork+0x116/0x1d0 [ 13.109005] ret_from_fork_asm+0x1a/0x30 [ 13.109225] [ 13.109315] The buggy address belongs to the object at ffff88810279cfc0 [ 13.109315] which belongs to the cache kmalloc-32 of size 32 [ 13.109791] The buggy address is located 0 bytes inside of [ 13.109791] freed 32-byte region [ffff88810279cfc0, ffff88810279cfe0) [ 13.110770] [ 13.111096] The buggy address belongs to the physical page: [ 13.111561] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10279c [ 13.112205] flags: 0x200000000000000(node=0|zone=2) [ 13.112433] page_type: f5(slab) [ 13.112583] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 13.113389] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 13.113902] page dumped because: kasan: bad access detected [ 13.114137] [ 13.114226] Memory state around the buggy address: [ 13.114435] ffff88810279ce80: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 13.114720] ffff88810279cf00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.115372] >ffff88810279cf80: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 13.115653] ^ [ 13.116265] ffff88810279d000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 13.116569] ffff88810279d080: fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.116951] ==================================================================