Date
July 23, 2025, 2:10 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 17.701341] ================================================================== [ 17.701722] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8 [ 17.701802] Read of size 1 at addr fff00000c3f8c510 by task kunit_try_catch/259 [ 17.701935] [ 17.701980] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc7 #1 PREEMPT [ 17.702068] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.702105] Hardware name: linux,dummy-virt (DT) [ 17.702140] Call trace: [ 17.702167] show_stack+0x20/0x38 (C) [ 17.702515] dump_stack_lvl+0x8c/0xd0 [ 17.702604] print_report+0x118/0x5d0 [ 17.702931] kasan_report+0xdc/0x128 [ 17.703062] __asan_report_load1_noabort+0x20/0x30 [ 17.703187] strcmp+0xc0/0xc8 [ 17.703547] kasan_strings+0x340/0xb00 [ 17.703701] kunit_try_run_case+0x170/0x3f0 [ 17.703799] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.704215] kthread+0x328/0x630 [ 17.704358] ret_from_fork+0x10/0x20 [ 17.704517] [ 17.704607] Allocated by task 259: [ 17.705009] kasan_save_stack+0x3c/0x68 [ 17.705168] kasan_save_track+0x20/0x40 [ 17.705297] kasan_save_alloc_info+0x40/0x58 [ 17.705394] __kasan_kmalloc+0xd4/0xd8 [ 17.705513] __kmalloc_cache_noprof+0x16c/0x3c0 [ 17.705595] kasan_strings+0xc8/0xb00 [ 17.705660] kunit_try_run_case+0x170/0x3f0 [ 17.705897] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.706128] kthread+0x328/0x630 [ 17.706235] ret_from_fork+0x10/0x20 [ 17.706408] [ 17.706491] Freed by task 259: [ 17.706531] kasan_save_stack+0x3c/0x68 [ 17.706771] kasan_save_track+0x20/0x40 [ 17.707039] kasan_save_free_info+0x4c/0x78 [ 17.707517] __kasan_slab_free+0x6c/0x98 [ 17.707659] kfree+0x214/0x3c8 [ 17.707780] kasan_strings+0x24c/0xb00 [ 17.707897] kunit_try_run_case+0x170/0x3f0 [ 17.707966] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.708015] kthread+0x328/0x630 [ 17.708061] ret_from_fork+0x10/0x20 [ 17.708136] [ 17.708159] The buggy address belongs to the object at fff00000c3f8c500 [ 17.708159] which belongs to the cache kmalloc-32 of size 32 [ 17.708235] The buggy address is located 16 bytes inside of [ 17.708235] freed 32-byte region [fff00000c3f8c500, fff00000c3f8c520) [ 17.708304] [ 17.708337] The buggy address belongs to the physical page: [ 17.708382] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103f8c [ 17.708448] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 17.708504] page_type: f5(slab) [ 17.708566] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 17.708636] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 17.708687] page dumped because: kasan: bad access detected [ 17.708743] [ 17.708773] Memory state around the buggy address: [ 17.708809] fff00000c3f8c400: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 17.708868] fff00000c3f8c480: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 17.708915] >fff00000c3f8c500: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 17.708958] ^ [ 17.709011] fff00000c3f8c580: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 17.709057] fff00000c3f8c600: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 17.709108] ==================================================================
[ 14.467740] ================================================================== [ 14.469947] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0 [ 14.470551] Read of size 1 at addr ffff8881025e0a90 by task kunit_try_catch/276 [ 14.470789] [ 14.471822] CPU: 1 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc7 #1 PREEMPT(voluntary) [ 14.471876] Tainted: [B]=BAD_PAGE, [N]=TEST [ 14.471890] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 14.471913] Call Trace: [ 14.471927] <TASK> [ 14.471943] dump_stack_lvl+0x73/0xb0 [ 14.471978] print_report+0xd1/0x610 [ 14.472003] ? __virt_addr_valid+0x1db/0x2d0 [ 14.472025] ? strcmp+0xb0/0xc0 [ 14.472043] ? kasan_complete_mode_report_info+0x64/0x200 [ 14.472065] ? strcmp+0xb0/0xc0 [ 14.472090] kasan_report+0x141/0x180 [ 14.472113] ? strcmp+0xb0/0xc0 [ 14.472134] __asan_report_load1_noabort+0x18/0x20 [ 14.472158] strcmp+0xb0/0xc0 [ 14.472177] kasan_strings+0x431/0xe80 [ 14.472197] ? trace_hardirqs_on+0x37/0xe0 [ 14.472221] ? __pfx_kasan_strings+0x10/0x10 [ 14.472242] ? finish_task_switch.isra.0+0x153/0x700 [ 14.472263] ? __switch_to+0x47/0xf50 [ 14.472288] ? __schedule+0x10c6/0x2b60 [ 14.472310] ? __pfx_read_tsc+0x10/0x10 [ 14.472331] ? ktime_get_ts64+0x86/0x230 [ 14.472353] kunit_try_run_case+0x1a5/0x480 [ 14.472378] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.472401] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 14.472423] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 14.472447] ? __kthread_parkme+0x82/0x180 [ 14.472468] ? preempt_count_sub+0x50/0x80 [ 14.472490] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.472514] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.472538] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 14.472561] kthread+0x337/0x6f0 [ 14.472580] ? trace_preempt_on+0x20/0xc0 [ 14.472601] ? __pfx_kthread+0x10/0x10 [ 14.472621] ? _raw_spin_unlock_irq+0x47/0x80 [ 14.472642] ? calculate_sigpending+0x7b/0xa0 [ 14.472666] ? __pfx_kthread+0x10/0x10 [ 14.472687] ret_from_fork+0x116/0x1d0 [ 14.472705] ? __pfx_kthread+0x10/0x10 [ 14.472725] ret_from_fork_asm+0x1a/0x30 [ 14.472755] </TASK> [ 14.472765] [ 14.488184] Allocated by task 276: [ 14.488650] kasan_save_stack+0x45/0x70 [ 14.488888] kasan_save_track+0x18/0x40 [ 14.489030] kasan_save_alloc_info+0x3b/0x50 [ 14.489217] __kasan_kmalloc+0xb7/0xc0 [ 14.489355] __kmalloc_cache_noprof+0x189/0x420 [ 14.489513] kasan_strings+0xc0/0xe80 [ 14.489646] kunit_try_run_case+0x1a5/0x480 [ 14.489794] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.489984] kthread+0x337/0x6f0 [ 14.490488] ret_from_fork+0x116/0x1d0 [ 14.490857] ret_from_fork_asm+0x1a/0x30 [ 14.491206] [ 14.491372] Freed by task 276: [ 14.491688] kasan_save_stack+0x45/0x70 [ 14.492086] kasan_save_track+0x18/0x40 [ 14.492471] kasan_save_free_info+0x3f/0x60 [ 14.492873] __kasan_slab_free+0x56/0x70 [ 14.493316] kfree+0x222/0x3f0 [ 14.493603] kasan_strings+0x2aa/0xe80 [ 14.493964] kunit_try_run_case+0x1a5/0x480 [ 14.494430] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.495029] kthread+0x337/0x6f0 [ 14.495379] ret_from_fork+0x116/0x1d0 [ 14.495735] ret_from_fork_asm+0x1a/0x30 [ 14.496092] [ 14.496272] The buggy address belongs to the object at ffff8881025e0a80 [ 14.496272] which belongs to the cache kmalloc-32 of size 32 [ 14.496672] The buggy address is located 16 bytes inside of [ 14.496672] freed 32-byte region [ffff8881025e0a80, ffff8881025e0aa0) [ 14.497032] [ 14.497411] The buggy address belongs to the physical page: [ 14.497624] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1025e0 [ 14.497953] flags: 0x200000000000000(node=0|zone=2) [ 14.498511] page_type: f5(slab) [ 14.498771] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 14.499332] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 14.499646] page dumped because: kasan: bad access detected [ 14.499896] [ 14.499985] Memory state around the buggy address: [ 14.500477] ffff8881025e0980: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.501156] ffff8881025e0a00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.501659] >ffff8881025e0a80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.501974] ^ [ 14.502327] ffff8881025e0b00: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 14.502829] ffff8881025e0b80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.503299] ==================================================================