Date
July 3, 2025, 6:13 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 19.141640] ================================================================== [ 19.141699] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8 [ 19.142231] Read of size 1 at addr fff00000c7832b50 by task kunit_try_catch/259 [ 19.142338] [ 19.142376] CPU: 1 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 19.142463] Tainted: [B]=BAD_PAGE, [N]=TEST [ 19.142493] Hardware name: linux,dummy-virt (DT) [ 19.142528] Call trace: [ 19.142551] show_stack+0x20/0x38 (C) [ 19.142604] dump_stack_lvl+0x8c/0xd0 [ 19.142653] print_report+0x118/0x608 [ 19.142712] kasan_report+0xdc/0x128 [ 19.142760] __asan_report_load1_noabort+0x20/0x30 [ 19.142812] strcmp+0xc0/0xc8 [ 19.142855] kasan_strings+0x340/0xb00 [ 19.142901] kunit_try_run_case+0x170/0x3f0 [ 19.142952] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.143013] kthread+0x328/0x630 [ 19.143069] ret_from_fork+0x10/0x20 [ 19.143119] [ 19.143139] Allocated by task 259: [ 19.143171] kasan_save_stack+0x3c/0x68 [ 19.143222] kasan_save_track+0x20/0x40 [ 19.143272] kasan_save_alloc_info+0x40/0x58 [ 19.143317] __kasan_kmalloc+0xd4/0xd8 [ 19.143356] __kmalloc_cache_noprof+0x16c/0x3c0 [ 19.143399] kasan_strings+0xc8/0xb00 [ 19.143436] kunit_try_run_case+0x170/0x3f0 [ 19.143482] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.143528] kthread+0x328/0x630 [ 19.143560] ret_from_fork+0x10/0x20 [ 19.143597] [ 19.143625] Freed by task 259: [ 19.143654] kasan_save_stack+0x3c/0x68 [ 19.143693] kasan_save_track+0x20/0x40 [ 19.143739] kasan_save_free_info+0x4c/0x78 [ 19.143779] __kasan_slab_free+0x6c/0x98 [ 19.143818] kfree+0x214/0x3c8 [ 19.143860] kasan_strings+0x24c/0xb00 [ 19.143897] kunit_try_run_case+0x170/0x3f0 [ 19.143936] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.143979] kthread+0x328/0x630 [ 19.144021] ret_from_fork+0x10/0x20 [ 19.144323] [ 19.144560] The buggy address belongs to the object at fff00000c7832b40 [ 19.144560] which belongs to the cache kmalloc-32 of size 32 [ 19.144719] The buggy address is located 16 bytes inside of [ 19.144719] freed 32-byte region [fff00000c7832b40, fff00000c7832b60) [ 19.145617] [ 19.145667] The buggy address belongs to the physical page: [ 19.145721] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107832 [ 19.145796] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 19.145881] page_type: f5(slab) [ 19.146149] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 19.146227] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 19.146393] page dumped because: kasan: bad access detected [ 19.146594] [ 19.146699] Memory state around the buggy address: [ 19.146989] fff00000c7832a00: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 19.147138] fff00000c7832a80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 19.147602] >fff00000c7832b00: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 19.147668] ^ [ 19.147865] fff00000c7832b80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 19.148224] fff00000c7832c00: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 19.148411] ==================================================================
[ 13.332030] ================================================================== [ 13.333512] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0 [ 13.333908] Read of size 1 at addr ffff8881038e6250 by task kunit_try_catch/277 [ 13.334386] [ 13.334660] CPU: 0 UID: 0 PID: 277 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 13.334708] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.334720] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.334741] Call Trace: [ 13.334753] <TASK> [ 13.334767] dump_stack_lvl+0x73/0xb0 [ 13.334794] print_report+0xd1/0x650 [ 13.334818] ? __virt_addr_valid+0x1db/0x2d0 [ 13.334840] ? strcmp+0xb0/0xc0 [ 13.334860] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.334883] ? strcmp+0xb0/0xc0 [ 13.334903] kasan_report+0x141/0x180 [ 13.334925] ? strcmp+0xb0/0xc0 [ 13.334949] __asan_report_load1_noabort+0x18/0x20 [ 13.334973] strcmp+0xb0/0xc0 [ 13.334994] kasan_strings+0x431/0xe80 [ 13.335013] ? trace_hardirqs_on+0x37/0xe0 [ 13.335037] ? __pfx_kasan_strings+0x10/0x10 [ 13.335057] ? finish_task_switch.isra.0+0x153/0x700 [ 13.335078] ? __switch_to+0x47/0xf50 [ 13.335118] ? __schedule+0x10cc/0x2b60 [ 13.335141] ? __pfx_read_tsc+0x10/0x10 [ 13.335161] ? ktime_get_ts64+0x86/0x230 [ 13.335184] kunit_try_run_case+0x1a5/0x480 [ 13.335212] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.335233] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 13.335256] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.335278] ? __kthread_parkme+0x82/0x180 [ 13.335298] ? preempt_count_sub+0x50/0x80 [ 13.335320] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.335343] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.335365] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 13.335388] kthread+0x337/0x6f0 [ 13.335407] ? trace_preempt_on+0x20/0xc0 [ 13.335428] ? __pfx_kthread+0x10/0x10 [ 13.335448] ? _raw_spin_unlock_irq+0x47/0x80 [ 13.335468] ? calculate_sigpending+0x7b/0xa0 [ 13.335491] ? __pfx_kthread+0x10/0x10 [ 13.335512] ret_from_fork+0x116/0x1d0 [ 13.335530] ? __pfx_kthread+0x10/0x10 [ 13.335550] ret_from_fork_asm+0x1a/0x30 [ 13.335579] </TASK> [ 13.335590] [ 13.344691] Allocated by task 277: [ 13.345052] kasan_save_stack+0x45/0x70 [ 13.345298] kasan_save_track+0x18/0x40 [ 13.345454] kasan_save_alloc_info+0x3b/0x50 [ 13.345744] __kasan_kmalloc+0xb7/0xc0 [ 13.345939] __kmalloc_cache_noprof+0x189/0x420 [ 13.346142] kasan_strings+0xc0/0xe80 [ 13.346403] kunit_try_run_case+0x1a5/0x480 [ 13.346575] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.346832] kthread+0x337/0x6f0 [ 13.346984] ret_from_fork+0x116/0x1d0 [ 13.347169] ret_from_fork_asm+0x1a/0x30 [ 13.347439] [ 13.347560] Freed by task 277: [ 13.347693] kasan_save_stack+0x45/0x70 [ 13.347860] kasan_save_track+0x18/0x40 [ 13.348030] kasan_save_free_info+0x3f/0x60 [ 13.348249] __kasan_slab_free+0x56/0x70 [ 13.348709] kfree+0x222/0x3f0 [ 13.348865] kasan_strings+0x2aa/0xe80 [ 13.349004] kunit_try_run_case+0x1a5/0x480 [ 13.349165] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.349405] kthread+0x337/0x6f0 [ 13.349575] ret_from_fork+0x116/0x1d0 [ 13.349838] ret_from_fork_asm+0x1a/0x30 [ 13.349978] [ 13.350049] The buggy address belongs to the object at ffff8881038e6240 [ 13.350049] which belongs to the cache kmalloc-32 of size 32 [ 13.351249] The buggy address is located 16 bytes inside of [ 13.351249] freed 32-byte region [ffff8881038e6240, ffff8881038e6260) [ 13.352581] [ 13.352706] The buggy address belongs to the physical page: [ 13.352931] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1038e6 [ 13.353679] flags: 0x200000000000000(node=0|zone=2) [ 13.353909] page_type: f5(slab) [ 13.354072] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 13.354885] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 13.355389] page dumped because: kasan: bad access detected [ 13.355634] [ 13.355726] Memory state around the buggy address: [ 13.355939] ffff8881038e6100: 00 00 00 fc fc fc fc fc 00 00 00 04 fc fc fc fc [ 13.356704] ffff8881038e6180: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 13.356959] >ffff8881038e6200: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 13.357473] ^ [ 13.357727] ffff8881038e6280: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.358020] ffff8881038e6300: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 13.358401] ==================================================================