Date
May 13, 2025, 12:07 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 21.454928] ================================================================== [ 21.454986] BUG: KASAN: slab-use-after-free in strlen+0xa8/0xb0 [ 21.455048] Read of size 1 at addr fff00000c7794c90 by task kunit_try_catch/259 [ 21.455105] [ 21.455148] CPU: 1 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G B N 6.15.0-rc6-next-20250513 #1 PREEMPT [ 21.455246] Tainted: [B]=BAD_PAGE, [N]=TEST [ 21.455282] Hardware name: linux,dummy-virt (DT) [ 21.455319] Call trace: [ 21.455349] show_stack+0x20/0x38 (C) [ 21.455413] dump_stack_lvl+0x8c/0xd0 [ 21.455467] print_report+0x118/0x608 [ 21.455539] kasan_report+0xdc/0x128 [ 21.455595] __asan_report_load1_noabort+0x20/0x30 [ 21.455666] strlen+0xa8/0xb0 [ 21.455720] kasan_strings+0x418/0xb00 [ 21.455773] kunit_try_run_case+0x170/0x3f0 [ 21.455826] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 21.455884] kthread+0x328/0x630 [ 21.457716] ret_from_fork+0x10/0x20 [ 21.457830] [ 21.457859] Allocated by task 259: [ 21.457898] kasan_save_stack+0x3c/0x68 [ 21.457951] kasan_save_track+0x20/0x40 [ 21.458013] kasan_save_alloc_info+0x40/0x58 [ 21.458065] __kasan_kmalloc+0xd4/0xd8 [ 21.458107] __kmalloc_cache_noprof+0x15c/0x3c0 [ 21.458154] kasan_strings+0xc8/0xb00 [ 21.458196] kunit_try_run_case+0x170/0x3f0 [ 21.458242] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 21.458291] kthread+0x328/0x630 [ 21.458336] ret_from_fork+0x10/0x20 [ 21.458381] [ 21.458405] Freed by task 259: [ 21.458438] kasan_save_stack+0x3c/0x68 [ 21.458627] kasan_save_track+0x20/0x40 [ 21.458861] kasan_save_free_info+0x4c/0x78 [ 21.458918] __kasan_slab_free+0x6c/0x98 [ 21.458964] kfree+0x214/0x3c8 [ 21.459024] kasan_strings+0x24c/0xb00 [ 21.459067] kunit_try_run_case+0x170/0x3f0 [ 21.459111] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 21.459162] kthread+0x328/0x630 [ 21.459809] ret_from_fork+0x10/0x20 [ 21.460397] [ 21.460541] The buggy address belongs to the object at fff00000c7794c80 [ 21.460541] which belongs to the cache kmalloc-32 of size 32 [ 21.460694] The buggy address is located 16 bytes inside of [ 21.460694] freed 32-byte region [fff00000c7794c80, fff00000c7794ca0) [ 21.460768] [ 21.460796] The buggy address belongs to the physical page: [ 21.460834] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107794 [ 21.460898] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 21.460958] page_type: f5(slab) [ 21.461025] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 21.461443] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 21.461510] page dumped because: kasan: bad access detected [ 21.461554] [ 21.461578] Memory state around the buggy address: [ 21.461682] fff00000c7794b80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 21.461771] fff00000c7794c00: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 21.462032] >fff00000c7794c80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 21.462093] ^ [ 21.462230] fff00000c7794d00: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 21.462495] fff00000c7794d80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 21.462573] ==================================================================
[ 13.094690] ================================================================== [ 13.095060] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0 [ 13.095324] Read of size 1 at addr ffff8881029e6650 by task kunit_try_catch/276 [ 13.095709] [ 13.095848] CPU: 0 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G B N 6.15.0-rc6-next-20250513 #1 PREEMPT(voluntary) [ 13.095928] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.095942] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.095963] Call Trace: [ 13.095976] <TASK> [ 13.095992] dump_stack_lvl+0x73/0xb0 [ 13.096019] print_report+0xd1/0x650 [ 13.096041] ? __virt_addr_valid+0x1db/0x2d0 [ 13.096064] ? strlen+0x8f/0xb0 [ 13.096084] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.096108] ? strlen+0x8f/0xb0 [ 13.096129] kasan_report+0x141/0x180 [ 13.096152] ? strlen+0x8f/0xb0 [ 13.096178] __asan_report_load1_noabort+0x18/0x20 [ 13.096201] strlen+0x8f/0xb0 [ 13.096223] kasan_strings+0x57b/0xe80 [ 13.096243] ? trace_hardirqs_on+0x37/0xe0 [ 13.096265] ? __pfx_kasan_strings+0x10/0x10 [ 13.096286] ? finish_task_switch.isra.0+0x153/0x700 [ 13.096308] ? __switch_to+0x47/0xf50 [ 13.096334] ? __schedule+0x10cc/0x2b60 [ 13.096356] ? __pfx_read_tsc+0x10/0x10 [ 13.096377] ? ktime_get_ts64+0x86/0x230 [ 13.096401] kunit_try_run_case+0x1a5/0x480 [ 13.096425] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.096447] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 13.096480] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.096503] ? __kthread_parkme+0x82/0x180 [ 13.096522] ? preempt_count_sub+0x50/0x80 [ 13.096557] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.096581] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.096604] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 13.096636] kthread+0x337/0x6f0 [ 13.096656] ? trace_preempt_on+0x20/0xc0 [ 13.096678] ? __pfx_kthread+0x10/0x10 [ 13.096700] ? _raw_spin_unlock_irq+0x47/0x80 [ 13.096770] ? calculate_sigpending+0x7b/0xa0 [ 13.096794] ? __pfx_kthread+0x10/0x10 [ 13.096818] ret_from_fork+0x116/0x1d0 [ 13.096836] ? __pfx_kthread+0x10/0x10 [ 13.096857] ret_from_fork_asm+0x1a/0x30 [ 13.096889] </TASK> [ 13.096899] [ 13.105016] Allocated by task 276: [ 13.105255] kasan_save_stack+0x45/0x70 [ 13.105881] kasan_save_track+0x18/0x40 [ 13.106061] kasan_save_alloc_info+0x3b/0x50 [ 13.106208] __kasan_kmalloc+0xb7/0xc0 [ 13.106341] __kmalloc_cache_noprof+0x189/0x420 [ 13.106562] kasan_strings+0xc0/0xe80 [ 13.106915] kunit_try_run_case+0x1a5/0x480 [ 13.107157] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.107386] kthread+0x337/0x6f0 [ 13.107508] ret_from_fork+0x116/0x1d0 [ 13.107723] ret_from_fork_asm+0x1a/0x30 [ 13.107928] [ 13.108025] Freed by task 276: [ 13.108232] kasan_save_stack+0x45/0x70 [ 13.108449] kasan_save_track+0x18/0x40 [ 13.108588] kasan_save_free_info+0x3f/0x60 [ 13.108955] __kasan_slab_free+0x56/0x70 [ 13.109183] kfree+0x222/0x3f0 [ 13.109372] kasan_strings+0x2aa/0xe80 [ 13.109635] kunit_try_run_case+0x1a5/0x480 [ 13.110007] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.110397] kthread+0x337/0x6f0 [ 13.110670] ret_from_fork+0x116/0x1d0 [ 13.110859] ret_from_fork_asm+0x1a/0x30 [ 13.111057] [ 13.111156] The buggy address belongs to the object at ffff8881029e6640 [ 13.111156] which belongs to the cache kmalloc-32 of size 32 [ 13.111892] The buggy address is located 16 bytes inside of [ 13.111892] freed 32-byte region [ffff8881029e6640, ffff8881029e6660) [ 13.112413] [ 13.112489] The buggy address belongs to the physical page: [ 13.112757] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029e6 [ 13.113144] flags: 0x200000000000000(node=0|zone=2) [ 13.113368] page_type: f5(slab) [ 13.113492] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 13.113787] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 13.114205] page dumped because: kasan: bad access detected [ 13.114443] [ 13.114520] Memory state around the buggy address: [ 13.114866] ffff8881029e6500: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.115394] ffff8881029e6580: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 13.115767] >ffff8881029e6600: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 13.116198] ^ [ 13.116637] ffff8881029e6680: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.116861] ffff8881029e6700: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 13.117092] ==================================================================