Date
June 2, 2025, 2:13 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 20.897945] ================================================================== [ 20.899271] BUG: KASAN: slab-use-after-free in strnlen+0x80/0x88 [ 20.899778] Read of size 1 at addr fff00000c3f46150 by task kunit_try_catch/249 [ 20.900294] [ 20.900569] CPU: 1 UID: 0 PID: 249 Comm: kunit_try_catch Tainted: G B N 6.14.10-rc1 #1 [ 20.900674] Tainted: [B]=BAD_PAGE, [N]=TEST [ 20.900711] Hardware name: linux,dummy-virt (DT) [ 20.900753] Call trace: [ 20.900782] show_stack+0x20/0x38 (C) [ 20.900849] dump_stack_lvl+0x8c/0xd0 [ 20.900908] print_report+0x118/0x608 [ 20.900967] kasan_report+0xdc/0x128 [ 20.901022] __asan_report_load1_noabort+0x20/0x30 [ 20.901079] strnlen+0x80/0x88 [ 20.901129] kasan_strings+0x364/0x8d8 [ 20.901327] kunit_try_run_case+0x170/0x3f0 [ 20.901417] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.901482] kthread+0x318/0x620 [ 20.901555] ret_from_fork+0x10/0x20 [ 20.901619] [ 20.905749] Allocated by task 249: [ 20.906319] kasan_save_stack+0x3c/0x68 [ 20.906609] kasan_save_track+0x20/0x40 [ 20.906854] kasan_save_alloc_info+0x40/0x58 [ 20.907096] __kasan_kmalloc+0xd4/0xd8 [ 20.907335] __kmalloc_cache_noprof+0x16c/0x3c0 [ 20.907592] kasan_strings+0xb0/0x8d8 [ 20.907827] kunit_try_run_case+0x170/0x3f0 [ 20.908065] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.908488] kthread+0x318/0x620 [ 20.908722] ret_from_fork+0x10/0x20 [ 20.909065] [ 20.909239] Freed by task 249: [ 20.909447] kasan_save_stack+0x3c/0x68 [ 20.909740] kasan_save_track+0x20/0x40 [ 20.909991] kasan_save_free_info+0x4c/0x78 [ 20.910312] __kasan_slab_free+0x6c/0x98 [ 20.910628] kfree+0x214/0x3c8 [ 20.911224] kasan_strings+0x124/0x8d8 [ 20.911685] kunit_try_run_case+0x170/0x3f0 [ 20.911976] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.912218] kthread+0x318/0x620 [ 20.912425] ret_from_fork+0x10/0x20 [ 20.912656] [ 20.912772] The buggy address belongs to the object at fff00000c3f46140 [ 20.912772] which belongs to the cache kmalloc-32 of size 32 [ 20.913717] The buggy address is located 16 bytes inside of [ 20.913717] freed 32-byte region [fff00000c3f46140, fff00000c3f46160) [ 20.914072] [ 20.914696] The buggy address belongs to the physical page: [ 20.915086] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103f46 [ 20.915578] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 20.916111] page_type: f5(slab) [ 20.916490] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 20.916953] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 20.917483] page dumped because: kasan: bad access detected [ 20.917891] [ 20.918055] Memory state around the buggy address: [ 20.919417] fff00000c3f46000: fa fb fb fb fc fc fc fc 00 00 07 fc fc fc fc fc [ 20.919940] fff00000c3f46080: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 20.920307] >fff00000c3f46100: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 20.920813] ^ [ 20.921259] fff00000c3f46180: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.921763] fff00000c3f46200: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 20.922088] ==================================================================
[ 14.674219] ================================================================== [ 14.674557] BUG: KASAN: slab-use-after-free in strnlen+0x73/0x80 [ 14.674984] Read of size 1 at addr ffff888101bf5750 by task kunit_try_catch/267 [ 14.675270] [ 14.675371] CPU: 1 UID: 0 PID: 267 Comm: kunit_try_catch Tainted: G B N 6.14.10-rc1 #1 [ 14.675409] Tainted: [B]=BAD_PAGE, [N]=TEST [ 14.675420] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 14.675441] Call Trace: [ 14.675456] <TASK> [ 14.675470] dump_stack_lvl+0x73/0xb0 [ 14.675492] print_report+0xd1/0x650 [ 14.675512] ? __virt_addr_valid+0x1db/0x2d0 [ 14.675532] ? strnlen+0x73/0x80 [ 14.675550] ? kasan_complete_mode_report_info+0x64/0x200 [ 14.675627] ? strnlen+0x73/0x80 [ 14.675648] kasan_report+0x140/0x180 [ 14.675669] ? strnlen+0x73/0x80 [ 14.675693] __asan_report_load1_noabort+0x18/0x20 [ 14.675717] strnlen+0x73/0x80 [ 14.675738] kasan_strings+0x4c3/0xb60 [ 14.675760] ? __pfx_kasan_strings+0x10/0x10 [ 14.675780] ? __schedule+0xce8/0x2840 [ 14.675802] ? __pfx_read_tsc+0x10/0x10 [ 14.675822] ? ktime_get_ts64+0x86/0x230 [ 14.675847] kunit_try_run_case+0x1a6/0x480 [ 14.675869] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.675891] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 14.675914] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 14.675937] ? __kthread_parkme+0x82/0x160 [ 14.675959] ? preempt_count_sub+0x50/0x80 [ 14.675984] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.676007] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.676043] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 14.676069] kthread+0x324/0x6e0 [ 14.676090] ? trace_preempt_on+0x20/0xc0 [ 14.676112] ? __pfx_kthread+0x10/0x10 [ 14.676134] ? _raw_spin_unlock_irq+0x47/0x80 [ 14.676156] ? calculate_sigpending+0x7b/0xa0 [ 14.676176] ? __pfx_kthread+0x10/0x10 [ 14.676198] ret_from_fork+0x41/0x80 [ 14.676217] ? __pfx_kthread+0x10/0x10 [ 14.676239] ret_from_fork_asm+0x1a/0x30 [ 14.676269] </TASK> [ 14.676279] [ 14.683262] Allocated by task 267: [ 14.683390] kasan_save_stack+0x45/0x70 [ 14.683534] kasan_save_track+0x18/0x40 [ 14.683666] kasan_save_alloc_info+0x3b/0x50 [ 14.683872] __kasan_kmalloc+0xb7/0xc0 [ 14.684146] __kmalloc_cache_noprof+0x18a/0x420 [ 14.684370] kasan_strings+0xb9/0xb60 [ 14.684551] kunit_try_run_case+0x1a6/0x480 [ 14.684755] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.685001] kthread+0x324/0x6e0 [ 14.685178] ret_from_fork+0x41/0x80 [ 14.685356] ret_from_fork_asm+0x1a/0x30 [ 14.685555] [ 14.685649] Freed by task 267: [ 14.685807] kasan_save_stack+0x45/0x70 [ 14.685977] kasan_save_track+0x18/0x40 [ 14.686203] kasan_save_free_info+0x3f/0x60 [ 14.686387] __kasan_slab_free+0x56/0x70 [ 14.686558] kfree+0x224/0x3f0 [ 14.686873] kasan_strings+0x13c/0xb60 [ 14.687075] kunit_try_run_case+0x1a6/0x480 [ 14.687268] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.687494] kthread+0x324/0x6e0 [ 14.687733] ret_from_fork+0x41/0x80 [ 14.687865] ret_from_fork_asm+0x1a/0x30 [ 14.688003] [ 14.688087] The buggy address belongs to the object at ffff888101bf5740 [ 14.688087] which belongs to the cache kmalloc-32 of size 32 [ 14.688550] The buggy address is located 16 bytes inside of [ 14.688550] freed 32-byte region [ffff888101bf5740, ffff888101bf5760) [ 14.689523] [ 14.689620] The buggy address belongs to the physical page: [ 14.689847] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101bf5 [ 14.690195] flags: 0x200000000000000(node=0|zone=2) [ 14.690367] page_type: f5(slab) [ 14.690485] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 14.690871] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 14.691198] page dumped because: kasan: bad access detected [ 14.691784] [ 14.691894] Memory state around the buggy address: [ 14.692067] ffff888101bf5600: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.692297] ffff888101bf5680: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 14.692607] >ffff888101bf5700: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 14.693025] ^ [ 14.693203] ffff888101bf5780: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.693415] ffff888101bf5800: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 14.693623] ==================================================================