Date
June 20, 2025, 12:38 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 35.161130] ================================================================== [ 35.161505] BUG: KASAN: slab-use-after-free in strlen+0xa8/0xb0 [ 35.161931] Read of size 1 at addr fff00000c7699cd0 by task kunit_try_catch/270 [ 35.162347] [ 35.162672] CPU: 0 UID: 0 PID: 270 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc2-next-20250620 #1 PREEMPT [ 35.163239] Tainted: [B]=BAD_PAGE, [N]=TEST [ 35.163356] Hardware name: linux,dummy-virt (DT) [ 35.163459] Call trace: [ 35.163534] show_stack+0x20/0x38 (C) [ 35.163704] dump_stack_lvl+0x8c/0xd0 [ 35.163819] print_report+0x118/0x608 [ 35.163951] kasan_report+0xdc/0x128 [ 35.164078] __asan_report_load1_noabort+0x20/0x30 [ 35.164211] strlen+0xa8/0xb0 [ 35.164725] kasan_strings+0x418/0xb00 [ 35.164965] kunit_try_run_case+0x170/0x3f0 [ 35.165352] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 35.165820] kthread+0x328/0x630 [ 35.166239] ret_from_fork+0x10/0x20 [ 35.166813] [ 35.167055] Allocated by task 270: [ 35.167256] kasan_save_stack+0x3c/0x68 [ 35.167628] kasan_save_track+0x20/0x40 [ 35.168162] kasan_save_alloc_info+0x40/0x58 [ 35.168439] __kasan_kmalloc+0xd4/0xd8 [ 35.168685] __kmalloc_cache_noprof+0x16c/0x3c0 [ 35.168839] kasan_strings+0xc8/0xb00 [ 35.168911] kunit_try_run_case+0x170/0x3f0 [ 35.168987] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 35.169081] kthread+0x328/0x630 [ 35.169165] ret_from_fork+0x10/0x20 [ 35.169847] [ 35.170037] Freed by task 270: [ 35.170185] kasan_save_stack+0x3c/0x68 [ 35.170320] kasan_save_track+0x20/0x40 [ 35.170419] kasan_save_free_info+0x4c/0x78 [ 35.170527] __kasan_slab_free+0x6c/0x98 [ 35.170645] kfree+0x214/0x3c8 [ 35.170743] kasan_strings+0x24c/0xb00 [ 35.170843] kunit_try_run_case+0x170/0x3f0 [ 35.171310] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 35.171579] kthread+0x328/0x630 [ 35.172220] ret_from_fork+0x10/0x20 [ 35.172407] [ 35.172483] The buggy address belongs to the object at fff00000c7699cc0 [ 35.172483] which belongs to the cache kmalloc-32 of size 32 [ 35.172643] The buggy address is located 16 bytes inside of [ 35.172643] freed 32-byte region [fff00000c7699cc0, fff00000c7699ce0) [ 35.172767] [ 35.172812] The buggy address belongs to the physical page: [ 35.173408] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107699 [ 35.173800] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 35.174145] page_type: f5(slab) [ 35.174269] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 35.174416] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 35.174538] page dumped because: kasan: bad access detected [ 35.174640] [ 35.175104] Memory state around the buggy address: [ 35.175536] fff00000c7699b80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 35.175681] fff00000c7699c00: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 35.176370] >fff00000c7699c80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 35.176602] ^ [ 35.176859] fff00000c7699d00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 35.177097] fff00000c7699d80: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 35.177211] ==================================================================
[ 27.900946] ================================================================== [ 27.901492] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0 [ 27.902721] Read of size 1 at addr ffff888102336390 by task kunit_try_catch/288 [ 27.903328] [ 27.903484] CPU: 0 UID: 0 PID: 288 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc2-next-20250620 #1 PREEMPT(voluntary) [ 27.903579] Tainted: [B]=BAD_PAGE, [N]=TEST [ 27.903603] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 27.903641] Call Trace: [ 27.903676] <TASK> [ 27.903709] dump_stack_lvl+0x73/0xb0 [ 27.903768] print_report+0xd1/0x650 [ 27.903809] ? __virt_addr_valid+0x1db/0x2d0 [ 27.903851] ? strlen+0x8f/0xb0 [ 27.903884] ? kasan_complete_mode_report_info+0x64/0x200 [ 27.903937] ? strlen+0x8f/0xb0 [ 27.903974] kasan_report+0x141/0x180 [ 27.904021] ? strlen+0x8f/0xb0 [ 27.904072] __asan_report_load1_noabort+0x18/0x20 [ 27.904113] strlen+0x8f/0xb0 [ 27.904145] kasan_strings+0x57b/0xe80 [ 27.904180] ? trace_hardirqs_on+0x37/0xe0 [ 27.904219] ? __pfx_kasan_strings+0x10/0x10 [ 27.904253] ? finish_task_switch.isra.0+0x153/0x700 [ 27.904295] ? __switch_to+0x47/0xf50 [ 27.904341] ? __schedule+0x10cc/0x2b60 [ 27.904377] ? __pfx_read_tsc+0x10/0x10 [ 27.904412] ? ktime_get_ts64+0x86/0x230 [ 27.904524] kunit_try_run_case+0x1a5/0x480 [ 27.904586] ? __pfx_kunit_try_run_case+0x10/0x10 [ 27.904629] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 27.904675] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 27.904727] ? __kthread_parkme+0x82/0x180 [ 27.904773] ? preempt_count_sub+0x50/0x80 [ 27.904827] ? __pfx_kunit_try_run_case+0x10/0x10 [ 27.904864] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.904900] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 27.904939] kthread+0x337/0x6f0 [ 27.904973] ? trace_preempt_on+0x20/0xc0 [ 27.905011] ? __pfx_kthread+0x10/0x10 [ 27.905044] ? _raw_spin_unlock_irq+0x47/0x80 [ 27.905068] ? calculate_sigpending+0x7b/0xa0 [ 27.905096] ? __pfx_kthread+0x10/0x10 [ 27.905119] ret_from_fork+0x116/0x1d0 [ 27.905144] ? __pfx_kthread+0x10/0x10 [ 27.905181] ret_from_fork_asm+0x1a/0x30 [ 27.905222] </TASK> [ 27.905237] [ 27.915356] Allocated by task 288: [ 27.915708] kasan_save_stack+0x45/0x70 [ 27.915948] kasan_save_track+0x18/0x40 [ 27.916130] kasan_save_alloc_info+0x3b/0x50 [ 27.916482] __kasan_kmalloc+0xb7/0xc0 [ 27.916918] __kmalloc_cache_noprof+0x189/0x420 [ 27.917355] kasan_strings+0xc0/0xe80 [ 27.917691] kunit_try_run_case+0x1a5/0x480 [ 27.918056] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.918659] kthread+0x337/0x6f0 [ 27.918922] ret_from_fork+0x116/0x1d0 [ 27.919330] ret_from_fork_asm+0x1a/0x30 [ 27.919691] [ 27.919856] Freed by task 288: [ 27.920187] kasan_save_stack+0x45/0x70 [ 27.920472] kasan_save_track+0x18/0x40 [ 27.920792] kasan_save_free_info+0x3f/0x60 [ 27.921021] __kasan_slab_free+0x56/0x70 [ 27.921348] kfree+0x222/0x3f0 [ 27.921720] kasan_strings+0x2aa/0xe80 [ 27.922059] kunit_try_run_case+0x1a5/0x480 [ 27.922553] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.923054] kthread+0x337/0x6f0 [ 27.923363] ret_from_fork+0x116/0x1d0 [ 27.923728] ret_from_fork_asm+0x1a/0x30 [ 27.924093] [ 27.924300] The buggy address belongs to the object at ffff888102336380 [ 27.924300] which belongs to the cache kmalloc-32 of size 32 [ 27.925186] The buggy address is located 16 bytes inside of [ 27.925186] freed 32-byte region [ffff888102336380, ffff8881023363a0) [ 27.925600] [ 27.925716] The buggy address belongs to the physical page: [ 27.925935] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102336 [ 27.926244] flags: 0x200000000000000(node=0|zone=2) [ 27.926474] page_type: f5(slab) [ 27.926981] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 27.927904] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 27.928690] page dumped because: kasan: bad access detected [ 27.929178] [ 27.929350] Memory state around the buggy address: [ 27.929787] ffff888102336280: 00 00 00 04 fc fc fc fc fa fb fb fb fc fc fc fc [ 27.930068] ffff888102336300: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 27.930676] >ffff888102336380: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 27.931018] ^ [ 27.931270] ffff888102336400: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 27.931875] ffff888102336480: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 27.932510] ==================================================================