Date
July 8, 2025, 7:07 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 19.806239] ================================================================== [ 19.806374] BUG: KASAN: slab-use-after-free in workqueue_uaf+0x480/0x4a8 [ 19.806681] Read of size 8 at addr fff00000c5707f40 by task kunit_try_catch/200 [ 19.806804] [ 19.806839] CPU: 1 UID: 0 PID: 200 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT [ 19.806930] Tainted: [B]=BAD_PAGE, [N]=TEST [ 19.806975] Hardware name: linux,dummy-virt (DT) [ 19.807104] Call trace: [ 19.807260] show_stack+0x20/0x38 (C) [ 19.807332] dump_stack_lvl+0x8c/0xd0 [ 19.807381] print_report+0x118/0x608 [ 19.807424] kasan_report+0xdc/0x128 [ 19.807525] __asan_report_load8_noabort+0x20/0x30 [ 19.807573] workqueue_uaf+0x480/0x4a8 [ 19.807617] kunit_try_run_case+0x170/0x3f0 [ 19.807664] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.807732] kthread+0x328/0x630 [ 19.807772] ret_from_fork+0x10/0x20 [ 19.808197] [ 19.808290] Allocated by task 200: [ 19.808382] kasan_save_stack+0x3c/0x68 [ 19.808455] kasan_save_track+0x20/0x40 [ 19.808547] kasan_save_alloc_info+0x40/0x58 [ 19.808604] __kasan_kmalloc+0xd4/0xd8 [ 19.808672] __kmalloc_cache_noprof+0x16c/0x3c0 [ 19.808782] workqueue_uaf+0x13c/0x4a8 [ 19.808880] kunit_try_run_case+0x170/0x3f0 [ 19.808945] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.809192] kthread+0x328/0x630 [ 19.809325] ret_from_fork+0x10/0x20 [ 19.809444] [ 19.809506] Freed by task 47: [ 19.809551] kasan_save_stack+0x3c/0x68 [ 19.809632] kasan_save_track+0x20/0x40 [ 19.809745] kasan_save_free_info+0x4c/0x78 [ 19.809785] __kasan_slab_free+0x6c/0x98 [ 19.809822] kfree+0x214/0x3c8 [ 19.809886] workqueue_uaf_work+0x18/0x30 [ 19.809925] process_one_work+0x530/0xf98 [ 19.809961] worker_thread+0x618/0xf38 [ 19.809996] kthread+0x328/0x630 [ 19.810029] ret_from_fork+0x10/0x20 [ 19.810285] [ 19.810347] Last potentially related work creation: [ 19.810386] kasan_save_stack+0x3c/0x68 [ 19.810463] kasan_record_aux_stack+0xb4/0xc8 [ 19.810550] __queue_work+0x65c/0x1008 [ 19.810608] queue_work_on+0xbc/0xf8 [ 19.810681] workqueue_uaf+0x210/0x4a8 [ 19.810793] kunit_try_run_case+0x170/0x3f0 [ 19.810869] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.810932] kthread+0x328/0x630 [ 19.811240] ret_from_fork+0x10/0x20 [ 19.811382] [ 19.811431] The buggy address belongs to the object at fff00000c5707f40 [ 19.811431] which belongs to the cache kmalloc-32 of size 32 [ 19.811559] The buggy address is located 0 bytes inside of [ 19.811559] freed 32-byte region [fff00000c5707f40, fff00000c5707f60) [ 19.811660] [ 19.811681] The buggy address belongs to the physical page: [ 19.811732] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105707 [ 19.811793] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 19.811840] page_type: f5(slab) [ 19.811897] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 19.811948] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 19.812002] page dumped because: kasan: bad access detected [ 19.812034] [ 19.812052] Memory state around the buggy address: [ 19.812093] fff00000c5707e00: 00 00 03 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 19.812150] fff00000c5707e80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 19.812192] >fff00000c5707f00: 00 00 00 07 fc fc fc fc fa fb fb fb fc fc fc fc [ 19.812235] ^ [ 19.813520] fff00000c5707f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.813607] fff00000c5708000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.813645] ==================================================================
[ 13.571212] ================================================================== [ 13.571819] BUG: KASAN: slab-use-after-free in workqueue_uaf+0x4d6/0x560 [ 13.572735] Read of size 8 at addr ffff88810260e7c0 by task kunit_try_catch/217 [ 13.573570] [ 13.573759] CPU: 1 UID: 0 PID: 217 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT(voluntary) [ 13.573806] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.573817] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.573837] Call Trace: [ 13.573851] <TASK> [ 13.573868] dump_stack_lvl+0x73/0xb0 [ 13.573898] print_report+0xd1/0x650 [ 13.573919] ? __virt_addr_valid+0x1db/0x2d0 [ 13.573940] ? workqueue_uaf+0x4d6/0x560 [ 13.573961] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.573985] ? workqueue_uaf+0x4d6/0x560 [ 13.574005] kasan_report+0x141/0x180 [ 13.574027] ? workqueue_uaf+0x4d6/0x560 [ 13.574066] __asan_report_load8_noabort+0x18/0x20 [ 13.574090] workqueue_uaf+0x4d6/0x560 [ 13.574111] ? __pfx_workqueue_uaf+0x10/0x10 [ 13.574135] ? __pfx_workqueue_uaf+0x10/0x10 [ 13.574160] kunit_try_run_case+0x1a5/0x480 [ 13.574182] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.574203] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 13.574227] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.574248] ? __kthread_parkme+0x82/0x180 [ 13.574267] ? preempt_count_sub+0x50/0x80 [ 13.574290] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.574312] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.574335] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 13.574356] kthread+0x337/0x6f0 [ 13.574374] ? trace_preempt_on+0x20/0xc0 [ 13.574397] ? __pfx_kthread+0x10/0x10 [ 13.574417] ? _raw_spin_unlock_irq+0x47/0x80 [ 13.574436] ? calculate_sigpending+0x7b/0xa0 [ 13.574459] ? __pfx_kthread+0x10/0x10 [ 13.574479] ret_from_fork+0x116/0x1d0 [ 13.574496] ? __pfx_kthread+0x10/0x10 [ 13.574524] ret_from_fork_asm+0x1a/0x30 [ 13.574555] </TASK> [ 13.574566] [ 13.586697] Allocated by task 217: [ 13.586920] kasan_save_stack+0x45/0x70 [ 13.587142] kasan_save_track+0x18/0x40 [ 13.587497] kasan_save_alloc_info+0x3b/0x50 [ 13.587889] __kasan_kmalloc+0xb7/0xc0 [ 13.588306] __kmalloc_cache_noprof+0x189/0x420 [ 13.588521] workqueue_uaf+0x152/0x560 [ 13.588656] kunit_try_run_case+0x1a5/0x480 [ 13.588802] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.588976] kthread+0x337/0x6f0 [ 13.589208] ret_from_fork+0x116/0x1d0 [ 13.589365] ret_from_fork_asm+0x1a/0x30 [ 13.589596] [ 13.589683] Freed by task 44: [ 13.589801] kasan_save_stack+0x45/0x70 [ 13.589944] kasan_save_track+0x18/0x40 [ 13.590223] kasan_save_free_info+0x3f/0x60 [ 13.590440] __kasan_slab_free+0x56/0x70 [ 13.590578] kfree+0x222/0x3f0 [ 13.590709] workqueue_uaf_work+0x12/0x20 [ 13.590923] process_one_work+0x5ee/0xf60 [ 13.591134] worker_thread+0x758/0x1220 [ 13.591284] kthread+0x337/0x6f0 [ 13.591448] ret_from_fork+0x116/0x1d0 [ 13.591814] ret_from_fork_asm+0x1a/0x30 [ 13.592008] [ 13.592186] Last potentially related work creation: [ 13.592346] kasan_save_stack+0x45/0x70 [ 13.592509] kasan_record_aux_stack+0xb2/0xc0 [ 13.592723] __queue_work+0x626/0xeb0 [ 13.592929] queue_work_on+0xb6/0xc0 [ 13.593254] workqueue_uaf+0x26d/0x560 [ 13.593402] kunit_try_run_case+0x1a5/0x480 [ 13.593548] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.593934] kthread+0x337/0x6f0 [ 13.594119] ret_from_fork+0x116/0x1d0 [ 13.594394] ret_from_fork_asm+0x1a/0x30 [ 13.594625] [ 13.594697] The buggy address belongs to the object at ffff88810260e7c0 [ 13.594697] which belongs to the cache kmalloc-32 of size 32 [ 13.595170] The buggy address is located 0 bytes inside of [ 13.595170] freed 32-byte region [ffff88810260e7c0, ffff88810260e7e0) [ 13.595584] [ 13.595658] The buggy address belongs to the physical page: [ 13.596261] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10260e [ 13.596657] flags: 0x200000000000000(node=0|zone=2) [ 13.596858] page_type: f5(slab) [ 13.596982] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 13.597536] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 13.597834] page dumped because: kasan: bad access detected [ 13.598132] [ 13.598212] Memory state around the buggy address: [ 13.598431] ffff88810260e680: fa fb fb fb fc fc fc fc 00 00 07 fc fc fc fc fc [ 13.598748] ffff88810260e700: 00 00 00 fc fc fc fc fc 00 00 03 fc fc fc fc fc [ 13.599006] >ffff88810260e780: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 13.599231] ^ [ 13.599508] ffff88810260e800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.599830] ffff88810260e880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.600300] ==================================================================