Date
July 1, 2025, 3:08 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 19.227438] ================================================================== [ 19.227631] BUG: KASAN: slab-use-after-free in strlen+0xa8/0xb0 [ 19.227728] Read of size 1 at addr fff00000c57eabd0 by task kunit_try_catch/260 [ 19.227794] [ 19.227827] CPU: 0 UID: 0 PID: 260 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 19.227917] Tainted: [B]=BAD_PAGE, [N]=TEST [ 19.227947] Hardware name: linux,dummy-virt (DT) [ 19.227981] Call trace: [ 19.228004] show_stack+0x20/0x38 (C) [ 19.228055] dump_stack_lvl+0x8c/0xd0 [ 19.228105] print_report+0x118/0x608 [ 19.228161] kasan_report+0xdc/0x128 [ 19.228208] __asan_report_load1_noabort+0x20/0x30 [ 19.228262] strlen+0xa8/0xb0 [ 19.228304] kasan_strings+0x418/0xb00 [ 19.228349] kunit_try_run_case+0x170/0x3f0 [ 19.228399] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.228460] kthread+0x328/0x630 [ 19.228503] ret_from_fork+0x10/0x20 [ 19.228553] [ 19.228904] Allocated by task 260: [ 19.228950] kasan_save_stack+0x3c/0x68 [ 19.229214] kasan_save_track+0x20/0x40 [ 19.229468] kasan_save_alloc_info+0x40/0x58 [ 19.229675] __kasan_kmalloc+0xd4/0xd8 [ 19.229783] __kmalloc_cache_noprof+0x16c/0x3c0 [ 19.229930] kasan_strings+0xc8/0xb00 [ 19.230017] kunit_try_run_case+0x170/0x3f0 [ 19.230126] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.230249] kthread+0x328/0x630 [ 19.230413] ret_from_fork+0x10/0x20 [ 19.230458] [ 19.230479] Freed by task 260: [ 19.230681] kasan_save_stack+0x3c/0x68 [ 19.230798] kasan_save_track+0x20/0x40 [ 19.230879] kasan_save_free_info+0x4c/0x78 [ 19.231033] __kasan_slab_free+0x6c/0x98 [ 19.231177] kfree+0x214/0x3c8 [ 19.231320] kasan_strings+0x24c/0xb00 [ 19.231386] kunit_try_run_case+0x170/0x3f0 [ 19.231661] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.231864] kthread+0x328/0x630 [ 19.231984] ret_from_fork+0x10/0x20 [ 19.232145] [ 19.232216] The buggy address belongs to the object at fff00000c57eabc0 [ 19.232216] which belongs to the cache kmalloc-32 of size 32 [ 19.232612] The buggy address is located 16 bytes inside of [ 19.232612] freed 32-byte region [fff00000c57eabc0, fff00000c57eabe0) [ 19.232752] [ 19.232834] The buggy address belongs to the physical page: [ 19.232869] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1057ea [ 19.233081] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 19.233301] page_type: f5(slab) [ 19.233392] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 19.233558] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 19.233749] page dumped because: kasan: bad access detected [ 19.233827] [ 19.233849] Memory state around the buggy address: [ 19.233885] fff00000c57eaa80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 19.233933] fff00000c57eab00: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 19.234334] >fff00000c57eab80: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 19.234440] ^ [ 19.234530] fff00000c57eac00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 19.234714] fff00000c57eac80: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 19.234804] ==================================================================
[ 13.612459] ================================================================== [ 13.613267] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0 [ 13.613736] Read of size 1 at addr ffff8881033c1910 by task kunit_try_catch/276 [ 13.614080] [ 13.614197] CPU: 0 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 13.614241] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.614254] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.614276] Call Trace: [ 13.614293] <TASK> [ 13.614309] dump_stack_lvl+0x73/0xb0 [ 13.614338] print_report+0xd1/0x650 [ 13.614361] ? __virt_addr_valid+0x1db/0x2d0 [ 13.614384] ? strlen+0x8f/0xb0 [ 13.614402] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.614425] ? strlen+0x8f/0xb0 [ 13.614443] kasan_report+0x141/0x180 [ 13.614464] ? strlen+0x8f/0xb0 [ 13.614485] __asan_report_load1_noabort+0x18/0x20 [ 13.614508] strlen+0x8f/0xb0 [ 13.614526] kasan_strings+0x57b/0xe80 [ 13.614544] ? trace_hardirqs_on+0x37/0xe0 [ 13.614568] ? __pfx_kasan_strings+0x10/0x10 [ 13.614587] ? finish_task_switch.isra.0+0x153/0x700 [ 13.614609] ? __switch_to+0x47/0xf50 [ 13.614635] ? __schedule+0x10cc/0x2b60 [ 13.614658] ? __pfx_read_tsc+0x10/0x10 [ 13.614678] ? ktime_get_ts64+0x86/0x230 [ 13.614701] kunit_try_run_case+0x1a5/0x480 [ 13.614725] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.614746] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 13.614769] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.614791] ? __kthread_parkme+0x82/0x180 [ 13.614811] ? preempt_count_sub+0x50/0x80 [ 13.614832] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.614855] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.614877] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 13.614900] kthread+0x337/0x6f0 [ 13.614919] ? trace_preempt_on+0x20/0xc0 [ 13.614939] ? __pfx_kthread+0x10/0x10 [ 13.614959] ? _raw_spin_unlock_irq+0x47/0x80 [ 13.614979] ? calculate_sigpending+0x7b/0xa0 [ 13.615003] ? __pfx_kthread+0x10/0x10 [ 13.615035] ret_from_fork+0x116/0x1d0 [ 13.615053] ? __pfx_kthread+0x10/0x10 [ 13.615073] ret_from_fork_asm+0x1a/0x30 [ 13.615103] </TASK> [ 13.615115] [ 13.625136] Allocated by task 276: [ 13.625339] kasan_save_stack+0x45/0x70 [ 13.625539] kasan_save_track+0x18/0x40 [ 13.626071] kasan_save_alloc_info+0x3b/0x50 [ 13.626334] __kasan_kmalloc+0xb7/0xc0 [ 13.626511] __kmalloc_cache_noprof+0x189/0x420 [ 13.627348] kasan_strings+0xc0/0xe80 [ 13.627608] kunit_try_run_case+0x1a5/0x480 [ 13.627982] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.628240] kthread+0x337/0x6f0 [ 13.628398] ret_from_fork+0x116/0x1d0 [ 13.628568] ret_from_fork_asm+0x1a/0x30 [ 13.629190] [ 13.629276] Freed by task 276: [ 13.629547] kasan_save_stack+0x45/0x70 [ 13.630037] kasan_save_track+0x18/0x40 [ 13.630324] kasan_save_free_info+0x3f/0x60 [ 13.630774] __kasan_slab_free+0x56/0x70 [ 13.631101] kfree+0x222/0x3f0 [ 13.631269] kasan_strings+0x2aa/0xe80 [ 13.631445] kunit_try_run_case+0x1a5/0x480 [ 13.632086] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.632434] kthread+0x337/0x6f0 [ 13.632599] ret_from_fork+0x116/0x1d0 [ 13.633126] ret_from_fork_asm+0x1a/0x30 [ 13.633362] [ 13.633454] The buggy address belongs to the object at ffff8881033c1900 [ 13.633454] which belongs to the cache kmalloc-32 of size 32 [ 13.634132] The buggy address is located 16 bytes inside of [ 13.634132] freed 32-byte region [ffff8881033c1900, ffff8881033c1920) [ 13.634608] [ 13.635170] The buggy address belongs to the physical page: [ 13.635480] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1033c1 [ 13.636002] flags: 0x200000000000000(node=0|zone=2) [ 13.636246] page_type: f5(slab) [ 13.636408] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 13.637139] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 13.637631] page dumped because: kasan: bad access detected [ 13.638286] [ 13.638525] Memory state around the buggy address: [ 13.639165] ffff8881033c1800: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.639480] ffff8881033c1880: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.640192] >ffff8881033c1900: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.640699] ^ [ 13.640883] ffff8881033c1980: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 13.641187] ffff8881033c1a00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.641474] ==================================================================