Date
July 3, 2025, 11:10 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 22.584772] ================================================================== [ 22.584895] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8 [ 22.585017] Read of size 1 at addr fff00000c6376cd0 by task kunit_try_catch/259 [ 22.585142] [ 22.585237] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 22.585430] Tainted: [B]=BAD_PAGE, [N]=TEST [ 22.585715] Hardware name: linux,dummy-virt (DT) [ 22.585883] Call trace: [ 22.585952] show_stack+0x20/0x38 (C) [ 22.586179] dump_stack_lvl+0x8c/0xd0 [ 22.586292] print_report+0x118/0x608 [ 22.586817] kasan_report+0xdc/0x128 [ 22.586997] __asan_report_load1_noabort+0x20/0x30 [ 22.587220] strcmp+0xc0/0xc8 [ 22.587400] kasan_strings+0x340/0xb00 [ 22.587508] kunit_try_run_case+0x170/0x3f0 [ 22.588003] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 22.588210] kthread+0x328/0x630 [ 22.588338] ret_from_fork+0x10/0x20 [ 22.588536] [ 22.588983] Allocated by task 259: [ 22.589100] kasan_save_stack+0x3c/0x68 [ 22.589258] kasan_save_track+0x20/0x40 [ 22.589449] kasan_save_alloc_info+0x40/0x58 [ 22.589555] __kasan_kmalloc+0xd4/0xd8 [ 22.589717] __kmalloc_cache_noprof+0x16c/0x3c0 [ 22.590158] kasan_strings+0xc8/0xb00 [ 22.590264] kunit_try_run_case+0x170/0x3f0 [ 22.590391] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 22.590505] kthread+0x328/0x630 [ 22.590659] ret_from_fork+0x10/0x20 [ 22.591201] [ 22.591299] Freed by task 259: [ 22.591370] kasan_save_stack+0x3c/0x68 [ 22.591556] kasan_save_track+0x20/0x40 [ 22.591720] kasan_save_free_info+0x4c/0x78 [ 22.591813] __kasan_slab_free+0x6c/0x98 [ 22.592464] kfree+0x214/0x3c8 [ 22.592595] kasan_strings+0x24c/0xb00 [ 22.592683] kunit_try_run_case+0x170/0x3f0 [ 22.592950] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 22.593285] kthread+0x328/0x630 [ 22.593373] ret_from_fork+0x10/0x20 [ 22.593549] [ 22.593600] The buggy address belongs to the object at fff00000c6376cc0 [ 22.593600] which belongs to the cache kmalloc-32 of size 32 [ 22.593802] The buggy address is located 16 bytes inside of [ 22.593802] freed 32-byte region [fff00000c6376cc0, fff00000c6376ce0) [ 22.593922] [ 22.593968] The buggy address belongs to the physical page: [ 22.594214] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106376 [ 22.594645] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 22.594816] page_type: f5(slab) [ 22.594996] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 22.595124] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 22.595428] page dumped because: kasan: bad access detected [ 22.595513] [ 22.595560] Memory state around the buggy address: [ 22.595642] fff00000c6376b80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 22.595745] fff00000c6376c00: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 22.596477] >fff00000c6376c80: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 22.596612] ^ [ 22.596720] fff00000c6376d00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 22.596819] fff00000c6376d80: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 22.596912] ==================================================================
[ 13.508778] ================================================================== [ 13.509840] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0 [ 13.510096] Read of size 1 at addr ffff8881039c45d0 by task kunit_try_catch/276 [ 13.510597] [ 13.510718] CPU: 1 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 13.510764] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.510776] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.510797] Call Trace: [ 13.510809] <TASK> [ 13.510825] dump_stack_lvl+0x73/0xb0 [ 13.510852] print_report+0xd1/0x650 [ 13.510875] ? __virt_addr_valid+0x1db/0x2d0 [ 13.510896] ? strcmp+0xb0/0xc0 [ 13.510916] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.510938] ? strcmp+0xb0/0xc0 [ 13.510999] kasan_report+0x141/0x180 [ 13.511046] ? strcmp+0xb0/0xc0 [ 13.511070] __asan_report_load1_noabort+0x18/0x20 [ 13.511095] strcmp+0xb0/0xc0 [ 13.511116] kasan_strings+0x431/0xe80 [ 13.511148] ? trace_hardirqs_on+0x37/0xe0 [ 13.511171] ? __pfx_kasan_strings+0x10/0x10 [ 13.511192] ? __kasan_check_write+0x18/0x20 [ 13.511210] ? queued_spin_lock_slowpath+0x116/0xb40 [ 13.511232] ? irqentry_exit+0x2a/0x60 [ 13.511253] ? sysvec_apic_timer_interrupt+0x50/0x90 [ 13.511275] ? trace_hardirqs_on+0x37/0xe0 [ 13.511296] ? __pfx_read_tsc+0x10/0x10 [ 13.511522] ? ktime_get_ts64+0x86/0x230 [ 13.511550] kunit_try_run_case+0x1a5/0x480 [ 13.511576] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.511599] ? queued_spin_lock_slowpath+0x116/0xb40 [ 13.511621] ? __kthread_parkme+0x82/0x180 [ 13.511642] ? preempt_count_sub+0x50/0x80 [ 13.511665] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.511688] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.511710] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 13.511733] kthread+0x337/0x6f0 [ 13.511751] ? trace_preempt_on+0x20/0xc0 [ 13.511773] ? __pfx_kthread+0x10/0x10 [ 13.511793] ? _raw_spin_unlock_irq+0x47/0x80 [ 13.511813] ? calculate_sigpending+0x7b/0xa0 [ 13.511836] ? __pfx_kthread+0x10/0x10 [ 13.511856] ret_from_fork+0x116/0x1d0 [ 13.511874] ? __pfx_kthread+0x10/0x10 [ 13.511894] ret_from_fork_asm+0x1a/0x30 [ 13.511924] </TASK> [ 13.511936] [ 13.524059] Allocated by task 276: [ 13.524343] kasan_save_stack+0x45/0x70 [ 13.524770] kasan_save_track+0x18/0x40 [ 13.525058] kasan_save_alloc_info+0x3b/0x50 [ 13.525408] __kasan_kmalloc+0xb7/0xc0 [ 13.525698] __kmalloc_cache_noprof+0x189/0x420 [ 13.525933] kasan_strings+0xc0/0xe80 [ 13.526109] kunit_try_run_case+0x1a5/0x480 [ 13.526640] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.526975] kthread+0x337/0x6f0 [ 13.527316] ret_from_fork+0x116/0x1d0 [ 13.527672] ret_from_fork_asm+0x1a/0x30 [ 13.527957] [ 13.528188] Freed by task 276: [ 13.528628] kasan_save_stack+0x45/0x70 [ 13.528814] kasan_save_track+0x18/0x40 [ 13.529007] kasan_save_free_info+0x3f/0x60 [ 13.529736] __kasan_slab_free+0x56/0x70 [ 13.529934] kfree+0x222/0x3f0 [ 13.530257] kasan_strings+0x2aa/0xe80 [ 13.530612] kunit_try_run_case+0x1a5/0x480 [ 13.530958] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.531249] kthread+0x337/0x6f0 [ 13.531587] ret_from_fork+0x116/0x1d0 [ 13.532007] ret_from_fork_asm+0x1a/0x30 [ 13.532236] [ 13.532686] The buggy address belongs to the object at ffff8881039c45c0 [ 13.532686] which belongs to the cache kmalloc-32 of size 32 [ 13.533484] The buggy address is located 16 bytes inside of [ 13.533484] freed 32-byte region [ffff8881039c45c0, ffff8881039c45e0) [ 13.534118] [ 13.534415] The buggy address belongs to the physical page: [ 13.534859] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1039c4 [ 13.535479] flags: 0x200000000000000(node=0|zone=2) [ 13.535803] page_type: f5(slab) [ 13.535965] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 13.536680] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 13.537032] page dumped because: kasan: bad access detected [ 13.537591] [ 13.537688] Memory state around the buggy address: [ 13.538051] ffff8881039c4480: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.538758] ffff8881039c4500: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 13.539090] >ffff8881039c4580: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 13.539687] ^ [ 13.540029] ffff8881039c4600: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.540448] ffff8881039c4680: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 13.541108] ==================================================================