Date
July 8, 2025, 11:09 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 21.497416] ================================================================== [ 21.497472] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8 [ 21.498040] Read of size 1 at addr fff00000c63c9810 by task kunit_try_catch/259 [ 21.498123] [ 21.498190] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT [ 21.498280] Tainted: [B]=BAD_PAGE, [N]=TEST [ 21.498332] Hardware name: linux,dummy-virt (DT) [ 21.498367] Call trace: [ 21.498394] show_stack+0x20/0x38 (C) [ 21.498483] dump_stack_lvl+0x8c/0xd0 [ 21.498543] print_report+0x118/0x608 [ 21.498595] kasan_report+0xdc/0x128 [ 21.498641] __asan_report_load1_noabort+0x20/0x30 [ 21.498693] strcmp+0xc0/0xc8 [ 21.498736] kasan_strings+0x340/0xb00 [ 21.498782] kunit_try_run_case+0x170/0x3f0 [ 21.498832] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 21.498886] kthread+0x328/0x630 [ 21.498933] ret_from_fork+0x10/0x20 [ 21.499519] [ 21.499586] Allocated by task 259: [ 21.499703] kasan_save_stack+0x3c/0x68 [ 21.499938] kasan_save_track+0x20/0x40 [ 21.500124] kasan_save_alloc_info+0x40/0x58 [ 21.500241] __kasan_kmalloc+0xd4/0xd8 [ 21.500361] __kmalloc_cache_noprof+0x16c/0x3c0 [ 21.500427] kasan_strings+0xc8/0xb00 [ 21.500768] kunit_try_run_case+0x170/0x3f0 [ 21.500874] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 21.500983] kthread+0x328/0x630 [ 21.501100] ret_from_fork+0x10/0x20 [ 21.501144] [ 21.501217] Freed by task 259: [ 21.501532] kasan_save_stack+0x3c/0x68 [ 21.501676] kasan_save_track+0x20/0x40 [ 21.501762] kasan_save_free_info+0x4c/0x78 [ 21.501880] __kasan_slab_free+0x6c/0x98 [ 21.501925] kfree+0x214/0x3c8 [ 21.502250] kasan_strings+0x24c/0xb00 [ 21.502386] kunit_try_run_case+0x170/0x3f0 [ 21.502484] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 21.502709] kthread+0x328/0x630 [ 21.502875] ret_from_fork+0x10/0x20 [ 21.502977] [ 21.503038] The buggy address belongs to the object at fff00000c63c9800 [ 21.503038] which belongs to the cache kmalloc-32 of size 32 [ 21.503247] The buggy address is located 16 bytes inside of [ 21.503247] freed 32-byte region [fff00000c63c9800, fff00000c63c9820) [ 21.503461] [ 21.503613] The buggy address belongs to the physical page: [ 21.503686] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1063c9 [ 21.503793] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 21.503846] page_type: f5(slab) [ 21.503888] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 21.503948] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 21.504277] page dumped because: kasan: bad access detected [ 21.504446] [ 21.504510] Memory state around the buggy address: [ 21.504659] fff00000c63c9700: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 21.504749] fff00000c63c9780: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 21.504817] >fff00000c63c9800: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 21.504859] ^ [ 21.504901] fff00000c63c9880: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 21.504956] fff00000c63c9900: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 21.504999] ==================================================================
[ 14.432821] ================================================================== [ 14.434044] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0 [ 14.434333] Read of size 1 at addr ffff88810267d890 by task kunit_try_catch/277 [ 14.434761] [ 14.434895] CPU: 1 UID: 0 PID: 277 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT(voluntary) [ 14.434985] Tainted: [B]=BAD_PAGE, [N]=TEST [ 14.434999] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 14.435021] Call Trace: [ 14.435033] <TASK> [ 14.435048] dump_stack_lvl+0x73/0xb0 [ 14.435102] print_report+0xd1/0x650 [ 14.435126] ? __virt_addr_valid+0x1db/0x2d0 [ 14.435150] ? strcmp+0xb0/0xc0 [ 14.435179] ? kasan_complete_mode_report_info+0x64/0x200 [ 14.435203] ? strcmp+0xb0/0xc0 [ 14.435220] kasan_report+0x141/0x180 [ 14.435242] ? strcmp+0xb0/0xc0 [ 14.435264] __asan_report_load1_noabort+0x18/0x20 [ 14.435289] strcmp+0xb0/0xc0 [ 14.435308] kasan_strings+0x431/0xe80 [ 14.435328] ? trace_hardirqs_on+0x37/0xe0 [ 14.435352] ? __pfx_kasan_strings+0x10/0x10 [ 14.435374] ? finish_task_switch.isra.0+0x153/0x700 [ 14.435398] ? __switch_to+0x47/0xf50 [ 14.435424] ? __schedule+0x10cc/0x2b60 [ 14.435446] ? __pfx_read_tsc+0x10/0x10 [ 14.435469] ? ktime_get_ts64+0x86/0x230 [ 14.435494] kunit_try_run_case+0x1a5/0x480 [ 14.435519] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.435542] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 14.435567] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 14.435591] ? __kthread_parkme+0x82/0x180 [ 14.435624] ? preempt_count_sub+0x50/0x80 [ 14.435658] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.435703] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.435728] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 14.435754] kthread+0x337/0x6f0 [ 14.435772] ? trace_preempt_on+0x20/0xc0 [ 14.435795] ? __pfx_kthread+0x10/0x10 [ 14.435815] ? _raw_spin_unlock_irq+0x47/0x80 [ 14.435836] ? calculate_sigpending+0x7b/0xa0 [ 14.435860] ? __pfx_kthread+0x10/0x10 [ 14.435881] ret_from_fork+0x116/0x1d0 [ 14.435899] ? __pfx_kthread+0x10/0x10 [ 14.435920] ret_from_fork_asm+0x1a/0x30 [ 14.435994] </TASK> [ 14.436004] [ 14.443674] Allocated by task 277: [ 14.443807] kasan_save_stack+0x45/0x70 [ 14.444343] kasan_save_track+0x18/0x40 [ 14.444810] kasan_save_alloc_info+0x3b/0x50 [ 14.445100] __kasan_kmalloc+0xb7/0xc0 [ 14.445253] __kmalloc_cache_noprof+0x189/0x420 [ 14.445481] kasan_strings+0xc0/0xe80 [ 14.445695] kunit_try_run_case+0x1a5/0x480 [ 14.445890] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.446181] kthread+0x337/0x6f0 [ 14.446373] ret_from_fork+0x116/0x1d0 [ 14.446540] ret_from_fork_asm+0x1a/0x30 [ 14.446686] [ 14.446756] Freed by task 277: [ 14.446862] kasan_save_stack+0x45/0x70 [ 14.446993] kasan_save_track+0x18/0x40 [ 14.447241] kasan_save_free_info+0x3f/0x60 [ 14.447448] __kasan_slab_free+0x56/0x70 [ 14.447651] kfree+0x222/0x3f0 [ 14.448017] kasan_strings+0x2aa/0xe80 [ 14.448212] kunit_try_run_case+0x1a5/0x480 [ 14.448398] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.448731] kthread+0x337/0x6f0 [ 14.449049] ret_from_fork+0x116/0x1d0 [ 14.449202] ret_from_fork_asm+0x1a/0x30 [ 14.449401] [ 14.449496] The buggy address belongs to the object at ffff88810267d880 [ 14.449496] which belongs to the cache kmalloc-32 of size 32 [ 14.450045] The buggy address is located 16 bytes inside of [ 14.450045] freed 32-byte region [ffff88810267d880, ffff88810267d8a0) [ 14.450654] [ 14.450726] The buggy address belongs to the physical page: [ 14.450896] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10267d [ 14.451341] flags: 0x200000000000000(node=0|zone=2) [ 14.451583] page_type: f5(slab) [ 14.451762] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 14.452089] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 14.452311] page dumped because: kasan: bad access detected [ 14.452834] [ 14.452931] Memory state around the buggy address: [ 14.453219] ffff88810267d780: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 14.453505] ffff88810267d800: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 14.453802] >ffff88810267d880: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.454148] ^ [ 14.454307] ffff88810267d900: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 14.454564] ffff88810267d980: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.455334] ==================================================================