Date
July 19, 2025, 11:11 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 15.744664] ================================================================== [ 15.744884] BUG: KASAN: slab-use-after-free in workqueue_uaf+0x480/0x4a8 [ 15.745088] Read of size 8 at addr fff00000c6e664c0 by task kunit_try_catch/201 [ 15.745681] [ 15.745720] CPU: 1 UID: 0 PID: 201 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT [ 15.746033] Tainted: [B]=BAD_PAGE, [N]=TEST [ 15.746172] Hardware name: linux,dummy-virt (DT) [ 15.746265] Call trace: [ 15.746290] show_stack+0x20/0x38 (C) [ 15.746339] dump_stack_lvl+0x8c/0xd0 [ 15.746387] print_report+0x118/0x5d0 [ 15.746439] kasan_report+0xdc/0x128 [ 15.746484] __asan_report_load8_noabort+0x20/0x30 [ 15.746545] workqueue_uaf+0x480/0x4a8 [ 15.746591] kunit_try_run_case+0x170/0x3f0 [ 15.746643] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.746698] kthread+0x328/0x630 [ 15.746740] ret_from_fork+0x10/0x20 [ 15.746786] [ 15.746806] Allocated by task 201: [ 15.746835] kasan_save_stack+0x3c/0x68 [ 15.746884] kasan_save_track+0x20/0x40 [ 15.747082] kasan_save_alloc_info+0x40/0x58 [ 15.747129] __kasan_kmalloc+0xd4/0xd8 [ 15.747166] __kmalloc_cache_noprof+0x16c/0x3c0 [ 15.747212] workqueue_uaf+0x13c/0x4a8 [ 15.747304] kunit_try_run_case+0x170/0x3f0 [ 15.747392] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.747555] kthread+0x328/0x630 [ 15.747589] ret_from_fork+0x10/0x20 [ 15.747625] [ 15.747643] Freed by task 24: [ 15.747786] kasan_save_stack+0x3c/0x68 [ 15.748278] kasan_save_track+0x20/0x40 [ 15.748389] kasan_save_free_info+0x4c/0x78 [ 15.748433] __kasan_slab_free+0x6c/0x98 [ 15.748515] kfree+0x214/0x3c8 [ 15.748560] workqueue_uaf_work+0x18/0x30 [ 15.748596] process_one_work+0x530/0xf98 [ 15.748633] worker_thread+0x618/0xf38 [ 15.748667] kthread+0x328/0x630 [ 15.748700] ret_from_fork+0x10/0x20 [ 15.748736] [ 15.748756] Last potentially related work creation: [ 15.748783] kasan_save_stack+0x3c/0x68 [ 15.748820] kasan_record_aux_stack+0xb4/0xc8 [ 15.748861] __queue_work+0x65c/0x1008 [ 15.748900] queue_work_on+0xbc/0xf8 [ 15.748936] workqueue_uaf+0x210/0x4a8 [ 15.748970] kunit_try_run_case+0x170/0x3f0 [ 15.749194] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.749294] kthread+0x328/0x630 [ 15.749348] ret_from_fork+0x10/0x20 [ 15.749477] [ 15.749609] The buggy address belongs to the object at fff00000c6e664c0 [ 15.749609] which belongs to the cache kmalloc-32 of size 32 [ 15.749777] The buggy address is located 0 bytes inside of [ 15.749777] freed 32-byte region [fff00000c6e664c0, fff00000c6e664e0) [ 15.749843] [ 15.749872] The buggy address belongs to the physical page: [ 15.749903] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106e66 [ 15.749954] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 15.750001] page_type: f5(slab) [ 15.750038] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 15.750087] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 15.750127] page dumped because: kasan: bad access detected [ 15.750158] [ 15.750175] Memory state around the buggy address: [ 15.750205] fff00000c6e66380: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 15.750248] fff00000c6e66400: 00 00 03 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 15.750291] >fff00000c6e66480: 00 00 00 07 fc fc fc fc fa fb fb fb fc fc fc fc [ 15.750328] ^ [ 15.750362] fff00000c6e66500: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.750406] fff00000c6e66580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.750450] ==================================================================
[ 12.645298] ================================================================== [ 12.645756] BUG: KASAN: slab-use-after-free in workqueue_uaf+0x4d6/0x560 [ 12.645990] Read of size 8 at addr ffff8881027ec480 by task kunit_try_catch/218 [ 12.647453] [ 12.647840] CPU: 0 UID: 0 PID: 218 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT(voluntary) [ 12.647900] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.647912] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.647933] Call Trace: [ 12.647948] <TASK> [ 12.647967] dump_stack_lvl+0x73/0xb0 [ 12.647998] print_report+0xd1/0x610 [ 12.648020] ? __virt_addr_valid+0x1db/0x2d0 [ 12.648043] ? workqueue_uaf+0x4d6/0x560 [ 12.648063] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.648085] ? workqueue_uaf+0x4d6/0x560 [ 12.648105] kasan_report+0x141/0x180 [ 12.648126] ? workqueue_uaf+0x4d6/0x560 [ 12.648372] __asan_report_load8_noabort+0x18/0x20 [ 12.648403] workqueue_uaf+0x4d6/0x560 [ 12.648470] ? __pfx_workqueue_uaf+0x10/0x10 [ 12.648502] ? __schedule+0x10cc/0x2b60 [ 12.648525] ? __pfx_read_tsc+0x10/0x10 [ 12.648545] ? ktime_get_ts64+0x86/0x230 [ 12.648570] kunit_try_run_case+0x1a5/0x480 [ 12.648595] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.648617] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.648640] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.648662] ? __kthread_parkme+0x82/0x180 [ 12.648682] ? preempt_count_sub+0x50/0x80 [ 12.648706] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.648728] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.648751] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.648774] kthread+0x337/0x6f0 [ 12.648792] ? trace_preempt_on+0x20/0xc0 [ 12.648815] ? __pfx_kthread+0x10/0x10 [ 12.648834] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.648854] ? calculate_sigpending+0x7b/0xa0 [ 12.648878] ? __pfx_kthread+0x10/0x10 [ 12.648898] ret_from_fork+0x116/0x1d0 [ 12.648916] ? __pfx_kthread+0x10/0x10 [ 12.648934] ret_from_fork_asm+0x1a/0x30 [ 12.648965] </TASK> [ 12.648975] [ 12.661800] Allocated by task 218: [ 12.662074] kasan_save_stack+0x45/0x70 [ 12.662451] kasan_save_track+0x18/0x40 [ 12.662601] kasan_save_alloc_info+0x3b/0x50 [ 12.662751] __kasan_kmalloc+0xb7/0xc0 [ 12.662882] __kmalloc_cache_noprof+0x189/0x420 [ 12.663044] workqueue_uaf+0x152/0x560 [ 12.663176] kunit_try_run_case+0x1a5/0x480 [ 12.663322] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.663705] kthread+0x337/0x6f0 [ 12.664119] ret_from_fork+0x116/0x1d0 [ 12.664477] ret_from_fork_asm+0x1a/0x30 [ 12.664872] [ 12.665092] Freed by task 9: [ 12.665408] kasan_save_stack+0x45/0x70 [ 12.665783] kasan_save_track+0x18/0x40 [ 12.666232] kasan_save_free_info+0x3f/0x60 [ 12.666633] __kasan_slab_free+0x56/0x70 [ 12.667002] kfree+0x222/0x3f0 [ 12.667379] workqueue_uaf_work+0x12/0x20 [ 12.667770] process_one_work+0x5ee/0xf60 [ 12.668349] worker_thread+0x758/0x1220 [ 12.668729] kthread+0x337/0x6f0 [ 12.669125] ret_from_fork+0x116/0x1d0 [ 12.669514] ret_from_fork_asm+0x1a/0x30 [ 12.669824] [ 12.669896] Last potentially related work creation: [ 12.670116] kasan_save_stack+0x45/0x70 [ 12.670568] kasan_record_aux_stack+0xb2/0xc0 [ 12.670979] __queue_work+0x626/0xeb0 [ 12.671419] queue_work_on+0xb6/0xc0 [ 12.671669] workqueue_uaf+0x26d/0x560 [ 12.671807] kunit_try_run_case+0x1a5/0x480 [ 12.671953] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.672642] kthread+0x337/0x6f0 [ 12.672969] ret_from_fork+0x116/0x1d0 [ 12.673562] ret_from_fork_asm+0x1a/0x30 [ 12.673940] [ 12.674037] The buggy address belongs to the object at ffff8881027ec480 [ 12.674037] which belongs to the cache kmalloc-32 of size 32 [ 12.674401] The buggy address is located 0 bytes inside of [ 12.674401] freed 32-byte region [ffff8881027ec480, ffff8881027ec4a0) [ 12.675509] [ 12.675676] The buggy address belongs to the physical page: [ 12.676211] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1027ec [ 12.676887] flags: 0x200000000000000(node=0|zone=2) [ 12.677311] page_type: f5(slab) [ 12.677437] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 12.677679] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 12.677905] page dumped because: kasan: bad access detected [ 12.678075] [ 12.678143] Memory state around the buggy address: [ 12.678694] ffff8881027ec380: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 12.679397] ffff8881027ec400: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 12.680007] >ffff8881027ec480: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 12.680800] ^ [ 12.681129] ffff8881027ec500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.681824] ffff8881027ec580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.682513] ==================================================================