Date
May 26, 2025, 9:10 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 20.332786] ================================================================== [ 20.332908] BUG: KASAN: slab-use-after-free in strlen+0xa8/0xb0 [ 20.333024] Read of size 1 at addr fff00000c7896b90 by task kunit_try_catch/259 [ 20.333146] [ 20.333471] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G B N 6.15.0-rc7-next-20250526 #1 PREEMPT [ 20.333752] Tainted: [B]=BAD_PAGE, [N]=TEST [ 20.333998] Hardware name: linux,dummy-virt (DT) [ 20.334096] Call trace: [ 20.334155] show_stack+0x20/0x38 (C) [ 20.334276] dump_stack_lvl+0x8c/0xd0 [ 20.334440] print_report+0x118/0x608 [ 20.334570] kasan_report+0xdc/0x128 [ 20.334738] __asan_report_load1_noabort+0x20/0x30 [ 20.335017] strlen+0xa8/0xb0 [ 20.335108] kasan_strings+0x418/0xb00 [ 20.335796] kunit_try_run_case+0x170/0x3f0 [ 20.335923] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.336054] kthread+0x328/0x630 [ 20.336185] ret_from_fork+0x10/0x20 [ 20.336315] [ 20.336378] Allocated by task 259: [ 20.336439] kasan_save_stack+0x3c/0x68 [ 20.336543] kasan_save_track+0x20/0x40 [ 20.336852] kasan_save_alloc_info+0x40/0x58 [ 20.336998] __kasan_kmalloc+0xd4/0xd8 [ 20.337115] __kmalloc_cache_noprof+0x15c/0x3c0 [ 20.337230] kasan_strings+0xc8/0xb00 [ 20.337342] kunit_try_run_case+0x170/0x3f0 [ 20.337450] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.337541] kthread+0x328/0x630 [ 20.337618] ret_from_fork+0x10/0x20 [ 20.337693] [ 20.337737] Freed by task 259: [ 20.337806] kasan_save_stack+0x3c/0x68 [ 20.337883] kasan_save_track+0x20/0x40 [ 20.338159] kasan_save_free_info+0x4c/0x78 [ 20.338267] __kasan_slab_free+0x6c/0x98 [ 20.338363] kfree+0x214/0x3c8 [ 20.338436] kasan_strings+0x24c/0xb00 [ 20.338506] kunit_try_run_case+0x170/0x3f0 [ 20.338592] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.338699] kthread+0x328/0x630 [ 20.338767] ret_from_fork+0x10/0x20 [ 20.339031] [ 20.339076] The buggy address belongs to the object at fff00000c7896b80 [ 20.339076] which belongs to the cache kmalloc-32 of size 32 [ 20.339244] The buggy address is located 16 bytes inside of [ 20.339244] freed 32-byte region [fff00000c7896b80, fff00000c7896ba0) [ 20.339434] [ 20.339482] The buggy address belongs to the physical page: [ 20.339556] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107896 [ 20.339672] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 20.339766] page_type: f5(slab) [ 20.340165] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 20.340347] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 20.340480] page dumped because: kasan: bad access detected [ 20.340569] [ 20.340628] Memory state around the buggy address: [ 20.340711] fff00000c7896a80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 20.340824] fff00000c7896b00: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 20.340973] >fff00000c7896b80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.341064] ^ [ 20.341336] fff00000c7896c00: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 20.341549] fff00000c7896c80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.341771] ==================================================================
[ 12.995348] ================================================================== [ 12.995998] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0 [ 12.996589] Read of size 1 at addr ffff8881039b9850 by task kunit_try_catch/277 [ 12.997360] [ 12.997556] CPU: 1 UID: 0 PID: 277 Comm: kunit_try_catch Tainted: G B N 6.15.0-rc7-next-20250526 #1 PREEMPT(voluntary) [ 12.997604] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.997617] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.997639] Call Trace: [ 12.997652] <TASK> [ 12.997667] dump_stack_lvl+0x73/0xb0 [ 12.997694] print_report+0xd1/0x650 [ 12.997718] ? __virt_addr_valid+0x1db/0x2d0 [ 12.997741] ? strlen+0x8f/0xb0 [ 12.997760] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.997783] ? strlen+0x8f/0xb0 [ 12.997802] kasan_report+0x141/0x180 [ 12.997824] ? strlen+0x8f/0xb0 [ 12.997848] __asan_report_load1_noabort+0x18/0x20 [ 12.997869] strlen+0x8f/0xb0 [ 12.997889] kasan_strings+0x57b/0xe80 [ 12.997909] ? trace_hardirqs_on+0x37/0xe0 [ 12.997931] ? __pfx_kasan_strings+0x10/0x10 [ 12.997952] ? finish_task_switch.isra.0+0x153/0x700 [ 12.997973] ? __switch_to+0x47/0xf50 [ 12.997998] ? __schedule+0x10cc/0x2b60 [ 12.998030] ? __pfx_read_tsc+0x10/0x10 [ 12.998051] ? ktime_get_ts64+0x86/0x230 [ 12.998076] kunit_try_run_case+0x1a5/0x480 [ 12.998097] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.998116] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.998140] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.998164] ? __kthread_parkme+0x82/0x180 [ 12.998184] ? preempt_count_sub+0x50/0x80 [ 12.998207] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.998227] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.998250] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.998275] kthread+0x337/0x6f0 [ 12.998294] ? trace_preempt_on+0x20/0xc0 [ 12.998315] ? __pfx_kthread+0x10/0x10 [ 12.998336] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.998358] ? calculate_sigpending+0x7b/0xa0 [ 12.998394] ? __pfx_kthread+0x10/0x10 [ 12.998415] ret_from_fork+0x116/0x1d0 [ 12.998433] ? __pfx_kthread+0x10/0x10 [ 12.998453] ret_from_fork_asm+0x1a/0x30 [ 12.998486] </TASK> [ 12.998497] [ 13.012434] Allocated by task 277: [ 13.012890] kasan_save_stack+0x45/0x70 [ 13.013347] kasan_save_track+0x18/0x40 [ 13.013507] kasan_save_alloc_info+0x3b/0x50 [ 13.013844] __kasan_kmalloc+0xb7/0xc0 [ 13.014155] __kmalloc_cache_noprof+0x189/0x420 [ 13.014322] kasan_strings+0xc0/0xe80 [ 13.014476] kunit_try_run_case+0x1a5/0x480 [ 13.014633] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.014995] kthread+0x337/0x6f0 [ 13.015505] ret_from_fork+0x116/0x1d0 [ 13.015935] ret_from_fork_asm+0x1a/0x30 [ 13.016219] [ 13.016391] Freed by task 277: [ 13.016693] kasan_save_stack+0x45/0x70 [ 13.017099] kasan_save_track+0x18/0x40 [ 13.017247] kasan_save_free_info+0x3f/0x60 [ 13.017402] __kasan_slab_free+0x56/0x70 [ 13.017541] kfree+0x222/0x3f0 [ 13.017656] kasan_strings+0x2aa/0xe80 [ 13.017823] kunit_try_run_case+0x1a5/0x480 [ 13.017967] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.018509] kthread+0x337/0x6f0 [ 13.018654] ret_from_fork+0x116/0x1d0 [ 13.018966] ret_from_fork_asm+0x1a/0x30 [ 13.019138] [ 13.019361] The buggy address belongs to the object at ffff8881039b9840 [ 13.019361] which belongs to the cache kmalloc-32 of size 32 [ 13.019888] The buggy address is located 16 bytes inside of [ 13.019888] freed 32-byte region [ffff8881039b9840, ffff8881039b9860) [ 13.020309] [ 13.020417] The buggy address belongs to the physical page: [ 13.020732] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1039b9 [ 13.021059] flags: 0x200000000000000(node=0|zone=2) [ 13.021308] page_type: f5(slab) [ 13.021481] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 13.021828] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 13.022083] page dumped because: kasan: bad access detected [ 13.022257] [ 13.022370] Memory state around the buggy address: [ 13.022604] ffff8881039b9700: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.023077] ffff8881039b9780: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 13.023568] >ffff8881039b9800: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 13.024111] ^ [ 13.024345] ffff8881039b9880: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.024664] ffff8881039b9900: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 13.024881] ==================================================================