Date
July 8, 2025, 4:38 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 18.211099] ================================================================== [ 18.211183] BUG: KASAN: slab-use-after-free in workqueue_uaf+0x480/0x4a8 [ 18.211251] Read of size 8 at addr fff00000c6385540 by task kunit_try_catch/202 [ 18.211312] [ 18.211633] CPU: 1 UID: 0 PID: 202 Comm: kunit_try_catch Tainted: G B N 6.15.6-rc1 #1 PREEMPT [ 18.211741] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.211787] Hardware name: linux,dummy-virt (DT) [ 18.211841] Call trace: [ 18.211866] show_stack+0x20/0x38 (C) [ 18.211926] dump_stack_lvl+0x8c/0xd0 [ 18.212009] print_report+0x118/0x608 [ 18.212056] kasan_report+0xdc/0x128 [ 18.212102] __asan_report_load8_noabort+0x20/0x30 [ 18.212181] workqueue_uaf+0x480/0x4a8 [ 18.212438] kunit_try_run_case+0x170/0x3f0 [ 18.212535] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.212724] kthread+0x328/0x630 [ 18.212800] ret_from_fork+0x10/0x20 [ 18.212886] [ 18.212906] Allocated by task 202: [ 18.212961] kasan_save_stack+0x3c/0x68 [ 18.213084] kasan_save_track+0x20/0x40 [ 18.213154] kasan_save_alloc_info+0x40/0x58 [ 18.213291] __kasan_kmalloc+0xd4/0xd8 [ 18.213612] __kmalloc_cache_noprof+0x16c/0x3c0 [ 18.213691] workqueue_uaf+0x13c/0x4a8 [ 18.213857] kunit_try_run_case+0x170/0x3f0 [ 18.213993] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.214070] kthread+0x328/0x630 [ 18.214143] ret_from_fork+0x10/0x20 [ 18.214279] [ 18.214380] Freed by task 51: [ 18.214458] kasan_save_stack+0x3c/0x68 [ 18.214497] kasan_save_track+0x20/0x40 [ 18.214756] kasan_save_free_info+0x4c/0x78 [ 18.214841] __kasan_slab_free+0x6c/0x98 [ 18.214905] kfree+0x214/0x3c8 [ 18.215016] workqueue_uaf_work+0x18/0x30 [ 18.215103] process_one_work+0x530/0xf98 [ 18.215219] worker_thread+0x618/0xf38 [ 18.215303] kthread+0x328/0x630 [ 18.215402] ret_from_fork+0x10/0x20 [ 18.215480] [ 18.215537] Last potentially related work creation: [ 18.215566] kasan_save_stack+0x3c/0x68 [ 18.215603] kasan_record_aux_stack+0xb4/0xc8 [ 18.215761] __queue_work+0x65c/0x1008 [ 18.215807] queue_work_on+0xbc/0xf8 [ 18.215841] workqueue_uaf+0x210/0x4a8 [ 18.215985] kunit_try_run_case+0x170/0x3f0 [ 18.216065] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.216201] kthread+0x328/0x630 [ 18.216327] ret_from_fork+0x10/0x20 [ 18.216454] [ 18.216533] The buggy address belongs to the object at fff00000c6385540 [ 18.216533] which belongs to the cache kmalloc-32 of size 32 [ 18.216683] The buggy address is located 0 bytes inside of [ 18.216683] freed 32-byte region [fff00000c6385540, fff00000c6385560) [ 18.216745] [ 18.216775] The buggy address belongs to the physical page: [ 18.216950] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106385 [ 18.217017] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 18.217094] page_type: f5(slab) [ 18.217143] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 18.217260] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 18.217403] page dumped because: kasan: bad access detected [ 18.217502] [ 18.217574] Memory state around the buggy address: [ 18.217685] fff00000c6385400: 00 00 00 fc fc fc fc fc 00 00 03 fc fc fc fc fc [ 18.217751] fff00000c6385480: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 18.217810] >fff00000c6385500: 00 00 00 07 fc fc fc fc fa fb fb fb fc fc fc fc [ 18.218073] ^ [ 18.218211] fff00000c6385580: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.218287] fff00000c6385600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.218362] ==================================================================
[ 11.919402] ================================================================== [ 11.920419] BUG: KASAN: slab-use-after-free in workqueue_uaf+0x4d6/0x560 [ 11.921395] Read of size 8 at addr ffff8881035f8a40 by task kunit_try_catch/220 [ 11.922051] [ 11.922171] CPU: 0 UID: 0 PID: 220 Comm: kunit_try_catch Tainted: G B N 6.15.6-rc1 #1 PREEMPT(voluntary) [ 11.922380] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.922398] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.922421] Call Trace: [ 11.922435] <TASK> [ 11.922450] dump_stack_lvl+0x73/0xb0 [ 11.922478] print_report+0xd1/0x650 [ 11.922502] ? __virt_addr_valid+0x1db/0x2d0 [ 11.922576] ? workqueue_uaf+0x4d6/0x560 [ 11.922602] ? kasan_complete_mode_report_info+0x64/0x200 [ 11.922625] ? workqueue_uaf+0x4d6/0x560 [ 11.922649] kasan_report+0x141/0x180 [ 11.922672] ? workqueue_uaf+0x4d6/0x560 [ 11.922699] __asan_report_load8_noabort+0x18/0x20 [ 11.922719] workqueue_uaf+0x4d6/0x560 [ 11.922742] ? __pfx_workqueue_uaf+0x10/0x10 [ 11.922765] ? __schedule+0x10cc/0x2b60 [ 11.922789] ? __pfx_read_tsc+0x10/0x10 [ 11.922810] ? ktime_get_ts64+0x86/0x230 [ 11.922844] kunit_try_run_case+0x1a5/0x480 [ 11.922866] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.922896] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 11.922922] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 11.922947] ? __kthread_parkme+0x82/0x180 [ 11.922970] ? preempt_count_sub+0x50/0x80 [ 11.922996] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.923017] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.923040] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 11.923064] kthread+0x337/0x6f0 [ 11.923081] ? trace_preempt_on+0x20/0xc0 [ 11.923104] ? __pfx_kthread+0x10/0x10 [ 11.923122] ? _raw_spin_unlock_irq+0x47/0x80 [ 11.923145] ? calculate_sigpending+0x7b/0xa0 [ 11.923166] ? __pfx_kthread+0x10/0x10 [ 11.923185] ret_from_fork+0x41/0x80 [ 11.923206] ? __pfx_kthread+0x10/0x10 [ 11.923224] ret_from_fork_asm+0x1a/0x30 [ 11.923255] </TASK> [ 11.923267] [ 11.934481] Allocated by task 220: [ 11.934854] kasan_save_stack+0x45/0x70 [ 11.935204] kasan_save_track+0x18/0x40 [ 11.935447] kasan_save_alloc_info+0x3b/0x50 [ 11.935781] __kasan_kmalloc+0xb7/0xc0 [ 11.936340] __kmalloc_cache_noprof+0x189/0x420 [ 11.936598] workqueue_uaf+0x152/0x560 [ 11.936986] kunit_try_run_case+0x1a5/0x480 [ 11.937219] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.937466] kthread+0x337/0x6f0 [ 11.937767] ret_from_fork+0x41/0x80 [ 11.938173] ret_from_fork_asm+0x1a/0x30 [ 11.938391] [ 11.938486] Freed by task 86: [ 11.938780] kasan_save_stack+0x45/0x70 [ 11.939104] kasan_save_track+0x18/0x40 [ 11.939290] kasan_save_free_info+0x3f/0x60 [ 11.939486] __kasan_slab_free+0x56/0x70 [ 11.939945] kfree+0x222/0x3f0 [ 11.940239] workqueue_uaf_work+0x12/0x20 [ 11.940602] process_one_work+0x5ee/0xf60 [ 11.940803] worker_thread+0x758/0x1220 [ 11.941233] kthread+0x337/0x6f0 [ 11.941620] ret_from_fork+0x41/0x80 [ 11.941809] ret_from_fork_asm+0x1a/0x30 [ 11.942062] [ 11.942161] Last potentially related work creation: [ 11.942367] kasan_save_stack+0x45/0x70 [ 11.942833] kasan_record_aux_stack+0xb2/0xc0 [ 11.943308] __queue_work+0x626/0xeb0 [ 11.943637] queue_work_on+0xb6/0xc0 [ 11.944050] workqueue_uaf+0x26d/0x560 [ 11.944244] kunit_try_run_case+0x1a5/0x480 [ 11.944430] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.944851] kthread+0x337/0x6f0 [ 11.945242] ret_from_fork+0x41/0x80 [ 11.945586] ret_from_fork_asm+0x1a/0x30 [ 11.945783] [ 11.946109] The buggy address belongs to the object at ffff8881035f8a40 [ 11.946109] which belongs to the cache kmalloc-32 of size 32 [ 11.947055] The buggy address is located 0 bytes inside of [ 11.947055] freed 32-byte region [ffff8881035f8a40, ffff8881035f8a60) [ 11.947812] [ 11.947996] The buggy address belongs to the physical page: [ 11.948233] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1035f8 [ 11.948786] flags: 0x200000000000000(node=0|zone=2) [ 11.949260] page_type: f5(slab) [ 11.949575] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 11.950323] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 11.950793] page dumped because: kasan: bad access detected [ 11.951206] [ 11.951303] Memory state around the buggy address: [ 11.951719] ffff8881035f8900: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 11.952307] ffff8881035f8980: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 11.952759] >ffff8881035f8a00: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 11.953438] ^ [ 11.953883] ffff8881035f8a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.954272] ffff8881035f8b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.954768] ==================================================================