Date
July 25, 2025, 3:13 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 32.915256] ================================================================== [ 32.915328] BUG: KASAN: slab-use-after-free in workqueue_uaf+0x480/0x4a8 [ 32.916242] Read of size 8 at addr fff00000c9b21780 by task kunit_try_catch/232 [ 32.916410] [ 32.916445] CPU: 1 UID: 0 PID: 232 Comm: kunit_try_catch Tainted: G B W N 6.16.0-rc7-next-20250725 #1 PREEMPT [ 32.916536] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST [ 32.916564] Hardware name: linux,dummy-virt (DT) [ 32.916594] Call trace: [ 32.916618] show_stack+0x20/0x38 (C) [ 32.916681] dump_stack_lvl+0x8c/0xd0 [ 32.916726] print_report+0x118/0x5e8 [ 32.916771] kasan_report+0xdc/0x128 [ 32.916813] __asan_report_load8_noabort+0x20/0x30 [ 32.916861] workqueue_uaf+0x480/0x4a8 [ 32.916907] kunit_try_run_case+0x170/0x3f0 [ 32.916954] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 32.917005] kthread+0x328/0x630 [ 32.917047] ret_from_fork+0x10/0x20 [ 32.917094] [ 32.917113] Allocated by task 232: [ 32.917142] kasan_save_stack+0x3c/0x68 [ 32.917192] kasan_save_track+0x20/0x40 [ 32.917229] kasan_save_alloc_info+0x40/0x58 [ 32.917268] __kasan_kmalloc+0xd4/0xd8 [ 32.917624] __kmalloc_cache_noprof+0x16c/0x3c0 [ 32.917874] workqueue_uaf+0x13c/0x4a8 [ 32.917921] kunit_try_run_case+0x170/0x3f0 [ 32.918052] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 32.918103] kthread+0x328/0x630 [ 32.918259] ret_from_fork+0x10/0x20 [ 32.918318] [ 32.918344] Freed by task 47: [ 32.918471] kasan_save_stack+0x3c/0x68 [ 32.918508] kasan_save_track+0x20/0x40 [ 32.918583] kasan_save_free_info+0x4c/0x78 [ 32.918622] __kasan_slab_free+0x7c/0xa8 [ 32.918665] kfree+0x214/0x3c8 [ 32.918705] workqueue_uaf_work+0x18/0x30 [ 32.918879] process_one_work+0x530/0xf88 [ 32.918932] worker_thread+0x618/0xf38 [ 32.919451] kthread+0x328/0x630 [ 32.919687] ret_from_fork+0x10/0x20 [ 32.919728] [ 32.920309] Last potentially related work creation: [ 32.920345] kasan_save_stack+0x3c/0x68 [ 32.920996] kasan_record_aux_stack+0xb4/0xc8 [ 32.921227] __queue_work+0x65c/0xfe0 [ 32.921270] queue_work_on+0xbc/0xf8 [ 32.921513] workqueue_uaf+0x210/0x4a8 [ 32.921625] kunit_try_run_case+0x170/0x3f0 [ 32.922252] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 32.922438] kthread+0x328/0x630 [ 32.922712] ret_from_fork+0x10/0x20 [ 32.923019] [ 32.923158] The buggy address belongs to the object at fff00000c9b21780 [ 32.923158] which belongs to the cache kmalloc-32 of size 32 [ 32.923658] The buggy address is located 0 bytes inside of [ 32.923658] freed 32-byte region [fff00000c9b21780, fff00000c9b217a0) [ 32.923761] [ 32.924147] The buggy address belongs to the physical page: [ 32.924684] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109b21 [ 32.925248] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 32.925464] page_type: f5(slab) [ 32.926059] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 32.926461] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 32.926507] page dumped because: kasan: bad access detected [ 32.926540] [ 32.926558] Memory state around the buggy address: [ 32.927669] fff00000c9b21680: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 32.928654] fff00000c9b21700: 00 00 00 fc fc fc fc fc 00 00 00 07 fc fc fc fc [ 32.928825] >fff00000c9b21780: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 32.928986] ^ [ 32.929135] fff00000c9b21800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 32.929348] fff00000c9b21880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 32.929438] ==================================================================
[ 26.377691] ================================================================== [ 26.378644] BUG: KASAN: slab-use-after-free in workqueue_uaf+0x4d6/0x560 [ 26.378888] Read of size 8 at addr ffff888105810700 by task kunit_try_catch/249 [ 26.379728] [ 26.380102] CPU: 0 UID: 0 PID: 249 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc7-next-20250725 #1 PREEMPT(voluntary) [ 26.380156] Tainted: [B]=BAD_PAGE, [N]=TEST [ 26.380169] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 26.380337] Call Trace: [ 26.380354] <TASK> [ 26.380384] dump_stack_lvl+0x73/0xb0 [ 26.380418] print_report+0xd1/0x640 [ 26.380478] ? __virt_addr_valid+0x1db/0x2d0 [ 26.380504] ? workqueue_uaf+0x4d6/0x560 [ 26.380526] ? kasan_complete_mode_report_info+0x64/0x200 [ 26.380552] ? workqueue_uaf+0x4d6/0x560 [ 26.380575] kasan_report+0x141/0x180 [ 26.380598] ? workqueue_uaf+0x4d6/0x560 [ 26.380624] __asan_report_load8_noabort+0x18/0x20 [ 26.380649] workqueue_uaf+0x4d6/0x560 [ 26.380671] ? __pfx_workqueue_uaf+0x10/0x10 [ 26.380694] ? __schedule+0x10da/0x2b60 [ 26.380716] ? __pfx_read_tsc+0x10/0x10 [ 26.380738] ? ktime_get_ts64+0x86/0x230 [ 26.380764] kunit_try_run_case+0x1a5/0x480 [ 26.380860] ? __pfx_kunit_try_run_case+0x10/0x10 [ 26.380885] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 26.380908] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 26.380934] ? __kthread_parkme+0x82/0x180 [ 26.380967] ? preempt_count_sub+0x50/0x80 [ 26.380991] ? __pfx_kunit_try_run_case+0x10/0x10 [ 26.381016] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 26.381040] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 26.381072] kthread+0x337/0x6f0 [ 26.381092] ? trace_preempt_on+0x20/0xc0 [ 26.381116] ? __pfx_kthread+0x10/0x10 [ 26.381142] ? _raw_spin_unlock_irq+0x47/0x80 [ 26.381167] ? calculate_sigpending+0x7b/0xa0 [ 26.381191] ? __pfx_kthread+0x10/0x10 [ 26.381213] ret_from_fork+0x116/0x1d0 [ 26.381232] ? __pfx_kthread+0x10/0x10 [ 26.381253] ret_from_fork_asm+0x1a/0x30 [ 26.381284] </TASK> [ 26.381296] [ 26.397636] Allocated by task 249: [ 26.397773] kasan_save_stack+0x45/0x70 [ 26.397920] kasan_save_track+0x18/0x40 [ 26.398305] kasan_save_alloc_info+0x3b/0x50 [ 26.398640] __kasan_kmalloc+0xb7/0xc0 [ 26.398775] __kmalloc_cache_noprof+0x189/0x420 [ 26.399332] workqueue_uaf+0x152/0x560 [ 26.399740] kunit_try_run_case+0x1a5/0x480 [ 26.400117] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 26.400302] kthread+0x337/0x6f0 [ 26.400423] ret_from_fork+0x116/0x1d0 [ 26.400555] ret_from_fork_asm+0x1a/0x30 [ 26.400693] [ 26.400758] Freed by task 9: [ 26.400894] kasan_save_stack+0x45/0x70 [ 26.401037] kasan_save_track+0x18/0x40 [ 26.401236] kasan_save_free_info+0x3f/0x60 [ 26.401504] __kasan_slab_free+0x5e/0x80 [ 26.401699] kfree+0x222/0x3f0 [ 26.401957] workqueue_uaf_work+0x12/0x20 [ 26.402363] process_one_work+0x5ee/0xf60 [ 26.402603] worker_thread+0x758/0x1220 [ 26.402753] kthread+0x337/0x6f0 [ 26.402872] ret_from_fork+0x116/0x1d0 [ 26.403144] ret_from_fork_asm+0x1a/0x30 [ 26.403486] [ 26.403727] Last potentially related work creation: [ 26.404576] kasan_save_stack+0x45/0x70 [ 26.404848] kasan_record_aux_stack+0xb2/0xc0 [ 26.405254] __queue_work+0x61a/0xe70 [ 26.405473] queue_work_on+0xb6/0xc0 [ 26.405954] workqueue_uaf+0x26d/0x560 [ 26.406163] kunit_try_run_case+0x1a5/0x480 [ 26.406721] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 26.407260] kthread+0x337/0x6f0 [ 26.407816] ret_from_fork+0x116/0x1d0 [ 26.408287] ret_from_fork_asm+0x1a/0x30 [ 26.408441] [ 26.408510] The buggy address belongs to the object at ffff888105810700 [ 26.408510] which belongs to the cache kmalloc-32 of size 32 [ 26.409203] The buggy address is located 0 bytes inside of [ 26.409203] freed 32-byte region [ffff888105810700, ffff888105810720) [ 26.410590] [ 26.410895] The buggy address belongs to the physical page: [ 26.411581] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105810 [ 26.412109] flags: 0x200000000000000(node=0|zone=2) [ 26.412290] page_type: f5(slab) [ 26.412416] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 26.412652] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 26.413497] page dumped because: kasan: bad access detected [ 26.414169] [ 26.414482] Memory state around the buggy address: [ 26.415044] ffff888105810600: 00 00 03 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 26.415801] ffff888105810680: 00 00 00 fc fc fc fc fc 00 00 00 07 fc fc fc fc [ 26.416628] >ffff888105810700: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 26.417396] ^ [ 26.417711] ffff888105810780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.418579] ffff888105810800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.419173] ==================================================================