Date
July 22, 2025, 2:40 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 17.748606] ================================================================== [ 17.748678] BUG: KASAN: slab-use-after-free in workqueue_uaf+0x480/0x4a8 [ 17.748937] Read of size 8 at addr fff00000c6fcc500 by task kunit_try_catch/202 [ 17.749103] [ 17.749350] CPU: 0 UID: 0 PID: 202 Comm: kunit_try_catch Tainted: G B N 6.15.8-rc1 #1 PREEMPT [ 17.749464] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.749543] Hardware name: linux,dummy-virt (DT) [ 17.749579] Call trace: [ 17.749605] show_stack+0x20/0x38 (C) [ 17.749885] dump_stack_lvl+0x8c/0xd0 [ 17.750264] print_report+0x118/0x5d0 [ 17.750345] kasan_report+0xdc/0x128 [ 17.750389] __asan_report_load8_noabort+0x20/0x30 [ 17.750442] workqueue_uaf+0x480/0x4a8 [ 17.750863] kunit_try_run_case+0x170/0x3f0 [ 17.751104] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.751306] kthread+0x328/0x630 [ 17.751430] ret_from_fork+0x10/0x20 [ 17.751567] [ 17.751609] Allocated by task 202: [ 17.751639] kasan_save_stack+0x3c/0x68 [ 17.751713] kasan_save_track+0x20/0x40 [ 17.752096] kasan_save_alloc_info+0x40/0x58 [ 17.752190] __kasan_kmalloc+0xd4/0xd8 [ 17.752230] __kmalloc_cache_noprof+0x16c/0x3c0 [ 17.752492] workqueue_uaf+0x13c/0x4a8 [ 17.752691] kunit_try_run_case+0x170/0x3f0 [ 17.752751] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.752934] kthread+0x328/0x630 [ 17.753028] ret_from_fork+0x10/0x20 [ 17.753077] [ 17.753208] Freed by task 9: [ 17.753252] kasan_save_stack+0x3c/0x68 [ 17.753359] kasan_save_track+0x20/0x40 [ 17.753400] kasan_save_free_info+0x4c/0x78 [ 17.753442] __kasan_slab_free+0x6c/0x98 [ 17.753493] kfree+0x214/0x3c8 [ 17.753525] workqueue_uaf_work+0x18/0x30 [ 17.753565] process_one_work+0x530/0xf98 [ 17.753600] worker_thread+0x618/0xf38 [ 17.753646] kthread+0x328/0x630 [ 17.753683] ret_from_fork+0x10/0x20 [ 17.753718] [ 17.753739] Last potentially related work creation: [ 17.753766] kasan_save_stack+0x3c/0x68 [ 17.753819] kasan_record_aux_stack+0xb4/0xc8 [ 17.753857] __queue_work+0x65c/0x1008 [ 17.753893] queue_work_on+0xbc/0xf8 [ 17.753932] workqueue_uaf+0x210/0x4a8 [ 17.753981] kunit_try_run_case+0x170/0x3f0 [ 17.754029] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.754079] kthread+0x328/0x630 [ 17.754114] ret_from_fork+0x10/0x20 [ 17.754148] [ 17.754175] The buggy address belongs to the object at fff00000c6fcc500 [ 17.754175] which belongs to the cache kmalloc-32 of size 32 [ 17.754233] The buggy address is located 0 bytes inside of [ 17.754233] freed 32-byte region [fff00000c6fcc500, fff00000c6fcc520) [ 17.754802] [ 17.755184] The buggy address belongs to the physical page: [ 17.755232] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106fcc [ 17.755312] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 17.755376] page_type: f5(slab) [ 17.755569] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 17.755705] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 17.755782] page dumped because: kasan: bad access detected [ 17.756261] [ 17.756704] Memory state around the buggy address: [ 17.756837] fff00000c6fcc400: 00 00 03 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 17.756885] fff00000c6fcc480: 00 00 00 fc fc fc fc fc 00 00 00 07 fc fc fc fc [ 17.757201] >fff00000c6fcc500: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 17.757310] ^ [ 17.757583] fff00000c6fcc580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.757862] fff00000c6fcc600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.757988] ==================================================================
[ 11.709280] ================================================================== [ 11.710036] BUG: KASAN: slab-use-after-free in workqueue_uaf+0x4d6/0x560 [ 11.710349] Read of size 8 at addr ffff8881028bd3c0 by task kunit_try_catch/220 [ 11.710651] [ 11.711033] CPU: 1 UID: 0 PID: 220 Comm: kunit_try_catch Tainted: G B N 6.15.8-rc1 #1 PREEMPT(voluntary) [ 11.711354] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.711369] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.711392] Call Trace: [ 11.711406] <TASK> [ 11.711423] dump_stack_lvl+0x73/0xb0 [ 11.711453] print_report+0xd1/0x610 [ 11.711484] ? __virt_addr_valid+0x1db/0x2d0 [ 11.711506] ? workqueue_uaf+0x4d6/0x560 [ 11.711527] ? kasan_complete_mode_report_info+0x64/0x200 [ 11.711549] ? workqueue_uaf+0x4d6/0x560 [ 11.711570] kasan_report+0x141/0x180 [ 11.711592] ? workqueue_uaf+0x4d6/0x560 [ 11.711618] __asan_report_load8_noabort+0x18/0x20 [ 11.711638] workqueue_uaf+0x4d6/0x560 [ 11.711693] ? __pfx_workqueue_uaf+0x10/0x10 [ 11.711716] ? __schedule+0x10c6/0x2b60 [ 11.711740] ? __pfx_read_tsc+0x10/0x10 [ 11.711760] ? ktime_get_ts64+0x86/0x230 [ 11.711786] kunit_try_run_case+0x1a5/0x480 [ 11.711807] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.711825] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 11.711846] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 11.711870] ? __kthread_parkme+0x82/0x180 [ 11.711891] ? preempt_count_sub+0x50/0x80 [ 11.711917] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.711936] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.711958] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 11.711980] kthread+0x337/0x6f0 [ 11.711997] ? trace_preempt_on+0x20/0xc0 [ 11.712020] ? __pfx_kthread+0x10/0x10 [ 11.712037] ? _raw_spin_unlock_irq+0x47/0x80 [ 11.712059] ? calculate_sigpending+0x7b/0xa0 [ 11.712082] ? __pfx_kthread+0x10/0x10 [ 11.712099] ret_from_fork+0x41/0x80 [ 11.712119] ? __pfx_kthread+0x10/0x10 [ 11.712136] ret_from_fork_asm+0x1a/0x30 [ 11.712167] </TASK> [ 11.712177] [ 11.724021] Allocated by task 220: [ 11.724190] kasan_save_stack+0x45/0x70 [ 11.724355] kasan_save_track+0x18/0x40 [ 11.724493] kasan_save_alloc_info+0x3b/0x50 [ 11.724786] __kasan_kmalloc+0xb7/0xc0 [ 11.724983] __kmalloc_cache_noprof+0x189/0x420 [ 11.725151] workqueue_uaf+0x152/0x560 [ 11.725293] kunit_try_run_case+0x1a5/0x480 [ 11.725622] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.725856] kthread+0x337/0x6f0 [ 11.726014] ret_from_fork+0x41/0x80 [ 11.726169] ret_from_fork_asm+0x1a/0x30 [ 11.726373] [ 11.726453] Freed by task 105: [ 11.726592] kasan_save_stack+0x45/0x70 [ 11.726724] kasan_save_track+0x18/0x40 [ 11.726902] kasan_save_free_info+0x3f/0x60 [ 11.727111] __kasan_slab_free+0x56/0x70 [ 11.727402] kfree+0x222/0x3f0 [ 11.727595] workqueue_uaf_work+0x12/0x20 [ 11.728019] process_one_work+0x5ee/0xf60 [ 11.728717] worker_thread+0x758/0x1220 [ 11.728907] kthread+0x337/0x6f0 [ 11.729033] ret_from_fork+0x41/0x80 [ 11.730116] ret_from_fork_asm+0x1a/0x30 [ 11.730483] [ 11.730564] Last potentially related work creation: [ 11.730719] kasan_save_stack+0x45/0x70 [ 11.730860] kasan_record_aux_stack+0xb2/0xc0 [ 11.731009] __queue_work+0x626/0xeb0 [ 11.731141] queue_work_on+0xb6/0xc0 [ 11.731281] workqueue_uaf+0x26d/0x560 [ 11.731421] kunit_try_run_case+0x1a5/0x480 [ 11.731564] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.731739] kthread+0x337/0x6f0 [ 11.731856] ret_from_fork+0x41/0x80 [ 11.731985] ret_from_fork_asm+0x1a/0x30 [ 11.732123] [ 11.732191] The buggy address belongs to the object at ffff8881028bd3c0 [ 11.732191] which belongs to the cache kmalloc-32 of size 32 [ 11.734493] The buggy address is located 0 bytes inside of [ 11.734493] freed 32-byte region [ffff8881028bd3c0, ffff8881028bd3e0) [ 11.736304] [ 11.736736] The buggy address belongs to the physical page: [ 11.737609] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1028bd [ 11.738674] flags: 0x200000000000000(node=0|zone=2) [ 11.739306] page_type: f5(slab) [ 11.739838] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 11.740789] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 11.742032] page dumped because: kasan: bad access detected [ 11.742726] [ 11.743209] Memory state around the buggy address: [ 11.743878] ffff8881028bd280: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 11.744645] ffff8881028bd300: 00 00 00 fc fc fc fc fc 00 00 03 fc fc fc fc fc [ 11.745233] >ffff8881028bd380: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 11.745923] ^ [ 11.746649] ffff8881028bd400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.747261] ffff8881028bd480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.747593] ==================================================================