Date
June 2, 2025, 2:10 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 22.284982] ================================================================== [ 22.286059] BUG: KASAN: slab-use-after-free in strnlen+0x80/0x88 [ 22.286815] Read of size 1 at addr fff00000c6cfdcd0 by task kunit_try_catch/246 [ 22.288233] [ 22.288710] CPU: 0 UID: 0 PID: 246 Comm: kunit_try_catch Tainted: G B N 6.12.32-rc1 #1 [ 22.289020] Tainted: [B]=BAD_PAGE, [N]=TEST [ 22.289060] Hardware name: linux,dummy-virt (DT) [ 22.289107] Call trace: [ 22.289140] dump_backtrace+0x9c/0x128 [ 22.289206] show_stack+0x20/0x38 [ 22.289277] dump_stack_lvl+0x8c/0xd0 [ 22.289330] print_report+0x118/0x5f0 [ 22.289378] kasan_report+0xdc/0x128 [ 22.289422] __asan_report_load1_noabort+0x20/0x30 [ 22.289474] strnlen+0x80/0x88 [ 22.289550] kasan_strings+0x398/0x938 [ 22.289597] kunit_try_run_case+0x170/0x3f0 [ 22.289648] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 22.289700] kthread+0x24c/0x2d0 [ 22.289747] ret_from_fork+0x10/0x20 [ 22.289798] [ 22.296306] Allocated by task 246: [ 22.297116] kasan_save_stack+0x3c/0x68 [ 22.297655] kasan_save_track+0x20/0x40 [ 22.298026] kasan_save_alloc_info+0x40/0x58 [ 22.298480] __kasan_kmalloc+0xd4/0xd8 [ 22.298906] __kmalloc_cache_noprof+0x154/0x320 [ 22.299496] kasan_strings+0xb0/0x938 [ 22.299971] kunit_try_run_case+0x170/0x3f0 [ 22.300483] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 22.300991] kthread+0x24c/0x2d0 [ 22.301725] ret_from_fork+0x10/0x20 [ 22.302644] [ 22.302893] Freed by task 246: [ 22.303219] kasan_save_stack+0x3c/0x68 [ 22.304102] kasan_save_track+0x20/0x40 [ 22.304427] kasan_save_free_info+0x4c/0x78 [ 22.304934] __kasan_slab_free+0x6c/0x98 [ 22.305371] kfree+0x110/0x3b8 [ 22.305790] kasan_strings+0x128/0x938 [ 22.306267] kunit_try_run_case+0x170/0x3f0 [ 22.306659] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 22.307578] kthread+0x24c/0x2d0 [ 22.308455] ret_from_fork+0x10/0x20 [ 22.308920] [ 22.309468] The buggy address belongs to the object at fff00000c6cfdcc0 [ 22.309468] which belongs to the cache kmalloc-32 of size 32 [ 22.310469] The buggy address is located 16 bytes inside of [ 22.310469] freed 32-byte region [fff00000c6cfdcc0, fff00000c6cfdce0) [ 22.311385] [ 22.311619] The buggy address belongs to the physical page: [ 22.312075] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106cfd [ 22.313362] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 22.313999] page_type: f5(slab) [ 22.314424] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 22.315033] raw: 0000000000000000 0000000080400040 00000001f5000000 0000000000000000 [ 22.315791] page dumped because: kasan: bad access detected [ 22.317017] [ 22.317320] Memory state around the buggy address: [ 22.317698] fff00000c6cfdb80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 22.318448] fff00000c6cfdc00: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 22.319105] >fff00000c6cfdc80: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 22.319693] ^ [ 22.320436] fff00000c6cfdd00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.321295] fff00000c6cfdd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.321885] ==================================================================
[ 14.109225] ================================================================== [ 14.109670] BUG: KASAN: slab-use-after-free in strnlen+0x73/0x80 [ 14.109954] Read of size 1 at addr ffff888102632890 by task kunit_try_catch/264 [ 14.110487] [ 14.110609] CPU: 0 UID: 0 PID: 264 Comm: kunit_try_catch Tainted: G B N 6.12.32-rc1 #1 [ 14.110654] Tainted: [B]=BAD_PAGE, [N]=TEST [ 14.110674] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 14.110696] Call Trace: [ 14.110712] <TASK> [ 14.110728] dump_stack_lvl+0x73/0xb0 [ 14.110754] print_report+0xd1/0x640 [ 14.110777] ? __virt_addr_valid+0x1db/0x2d0 [ 14.110798] ? strnlen+0x73/0x80 [ 14.110817] ? kasan_complete_mode_report_info+0x64/0x200 [ 14.110839] ? strnlen+0x73/0x80 [ 14.110857] kasan_report+0x140/0x180 [ 14.110881] ? strnlen+0x73/0x80 [ 14.110903] __asan_report_load1_noabort+0x18/0x20 [ 14.110924] strnlen+0x73/0x80 [ 14.110943] kasan_strings+0x4cc/0xb60 [ 14.110964] ? __pfx_kasan_strings+0x10/0x10 [ 14.110985] ? __schedule+0xc49/0x27a0 [ 14.111004] ? __pfx_read_tsc+0x10/0x10 [ 14.111022] ? ktime_get_ts64+0x84/0x230 [ 14.111047] kunit_try_run_case+0x1a6/0x480 [ 14.111091] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.111111] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 14.111129] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 14.111153] ? __kthread_parkme+0x82/0x160 [ 14.111172] ? preempt_count_sub+0x50/0x80 [ 14.111192] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.111212] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 14.111236] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.111260] kthread+0x257/0x310 [ 14.111277] ? __pfx_kthread+0x10/0x10 [ 14.111295] ret_from_fork+0x41/0x80 [ 14.111315] ? __pfx_kthread+0x10/0x10 [ 14.111334] ret_from_fork_asm+0x1a/0x30 [ 14.111363] </TASK> [ 14.111373] [ 14.116384] Allocated by task 264: [ 14.116576] kasan_save_stack+0x45/0x70 [ 14.116821] kasan_save_track+0x18/0x40 [ 14.117068] kasan_save_alloc_info+0x3b/0x50 [ 14.117326] __kasan_kmalloc+0xb7/0xc0 [ 14.117559] __kmalloc_cache_noprof+0x168/0x350 [ 14.117838] kasan_strings+0xb3/0xb60 [ 14.119119] kunit_try_run_case+0x1a6/0x480 [ 14.119245] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.119354] kthread+0x257/0x310 [ 14.119429] ret_from_fork+0x41/0x80 [ 14.119508] ret_from_fork_asm+0x1a/0x30 [ 14.119608] [ 14.119660] Freed by task 264: [ 14.119740] kasan_save_stack+0x45/0x70 [ 14.119956] kasan_save_track+0x18/0x40 [ 14.120167] kasan_save_free_info+0x3f/0x60 [ 14.120311] __kasan_slab_free+0x56/0x70 [ 14.120457] kfree+0x123/0x3d0 [ 14.120564] kasan_strings+0x13a/0xb60 [ 14.120704] kunit_try_run_case+0x1a6/0x480 [ 14.120879] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.121074] kthread+0x257/0x310 [ 14.121240] ret_from_fork+0x41/0x80 [ 14.121372] ret_from_fork_asm+0x1a/0x30 [ 14.121457] [ 14.121505] The buggy address belongs to the object at ffff888102632880 [ 14.121505] which belongs to the cache kmalloc-32 of size 32 [ 14.121701] The buggy address is located 16 bytes inside of [ 14.121701] freed 32-byte region [ffff888102632880, ffff8881026328a0) [ 14.122088] [ 14.122185] The buggy address belongs to the physical page: [ 14.122493] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102632 [ 14.122921] flags: 0x200000000000000(node=0|zone=2) [ 14.123177] page_type: f5(slab) [ 14.123327] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 14.123458] raw: 0000000000000000 0000000080400040 00000001f5000000 0000000000000000 [ 14.123580] page dumped because: kasan: bad access detected [ 14.123692] [ 14.123807] Memory state around the buggy address: [ 14.124080] ffff888102632780: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.124464] ffff888102632800: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 14.124717] >ffff888102632880: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 14.124919] ^ [ 14.125114] ffff888102632900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 14.125343] ffff888102632980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 14.125537] ==================================================================