Date
June 7, 2025, 10:40 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 26.255721] ================================================================== [ 26.257103] BUG: KASAN: slab-use-after-free in strnlen+0x80/0x88 [ 26.258189] Read of size 1 at addr fff00000c64bc790 by task kunit_try_catch/248 [ 26.259501] [ 26.260422] CPU: 0 UID: 0 PID: 248 Comm: kunit_try_catch Tainted: G B N 6.14.11-rc1 #1 [ 26.260639] Tainted: [B]=BAD_PAGE, [N]=TEST [ 26.260727] Hardware name: linux,dummy-virt (DT) [ 26.260794] Call trace: [ 26.260828] show_stack+0x20/0x38 (C) [ 26.260928] dump_stack_lvl+0x8c/0xd0 [ 26.260996] print_report+0x118/0x608 [ 26.261130] kasan_report+0xdc/0x128 [ 26.261260] __asan_report_load1_noabort+0x20/0x30 [ 26.261379] strnlen+0x80/0x88 [ 26.261435] kasan_strings+0x364/0x8d8 [ 26.261493] kunit_try_run_case+0x170/0x3f0 [ 26.261552] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 26.261616] kthread+0x318/0x620 [ 26.261673] ret_from_fork+0x10/0x20 [ 26.261734] [ 26.270210] Allocated by task 248: [ 26.270693] kasan_save_stack+0x3c/0x68 [ 26.271168] kasan_save_track+0x20/0x40 [ 26.271725] kasan_save_alloc_info+0x40/0x58 [ 26.273124] __kasan_kmalloc+0xd4/0xd8 [ 26.273671] __kmalloc_cache_noprof+0x16c/0x3c0 [ 26.274563] kasan_strings+0xb0/0x8d8 [ 26.275167] kunit_try_run_case+0x170/0x3f0 [ 26.275722] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 26.276409] kthread+0x318/0x620 [ 26.276937] ret_from_fork+0x10/0x20 [ 26.278419] [ 26.278700] Freed by task 248: [ 26.279065] kasan_save_stack+0x3c/0x68 [ 26.279660] kasan_save_track+0x20/0x40 [ 26.280237] kasan_save_free_info+0x4c/0x78 [ 26.280831] __kasan_slab_free+0x6c/0x98 [ 26.281626] kfree+0x214/0x3c8 [ 26.282083] kasan_strings+0x124/0x8d8 [ 26.282664] kunit_try_run_case+0x170/0x3f0 [ 26.283299] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 26.284000] kthread+0x318/0x620 [ 26.284977] ret_from_fork+0x10/0x20 [ 26.285505] [ 26.285920] The buggy address belongs to the object at fff00000c64bc780 [ 26.285920] which belongs to the cache kmalloc-32 of size 32 [ 26.287070] The buggy address is located 16 bytes inside of [ 26.287070] freed 32-byte region [fff00000c64bc780, fff00000c64bc7a0) [ 26.288140] [ 26.288414] The buggy address belongs to the physical page: [ 26.289145] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1064bc [ 26.290088] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 26.290815] page_type: f5(slab) [ 26.291288] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 26.292297] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 26.293196] page dumped because: kasan: bad access detected [ 26.294006] [ 26.294484] Memory state around the buggy address: [ 26.295794] fff00000c64bc680: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 26.296554] fff00000c64bc700: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 26.297668] >fff00000c64bc780: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 26.298583] ^ [ 26.299144] fff00000c64bc800: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 26.299978] fff00000c64bc880: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 26.300737] ==================================================================
[ 20.316742] ================================================================== [ 20.317290] BUG: KASAN: slab-use-after-free in strnlen+0x73/0x80 [ 20.317735] Read of size 1 at addr ffff888102bd9550 by task kunit_try_catch/267 [ 20.318437] [ 20.318620] CPU: 0 UID: 0 PID: 267 Comm: kunit_try_catch Tainted: G B N 6.14.11-rc1 #1 [ 20.318720] Tainted: [B]=BAD_PAGE, [N]=TEST [ 20.318751] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 20.318797] Call Trace: [ 20.318836] <TASK> [ 20.318892] dump_stack_lvl+0x73/0xb0 [ 20.318960] print_report+0xd1/0x650 [ 20.319016] ? __virt_addr_valid+0x1db/0x2d0 [ 20.319070] ? strnlen+0x73/0x80 [ 20.319113] ? kasan_complete_mode_report_info+0x64/0x200 [ 20.319169] ? strnlen+0x73/0x80 [ 20.319221] kasan_report+0x140/0x180 [ 20.319277] ? strnlen+0x73/0x80 [ 20.319330] __asan_report_load1_noabort+0x18/0x20 [ 20.319390] strnlen+0x73/0x80 [ 20.319440] kasan_strings+0x4c3/0xb60 [ 20.319496] ? __pfx_kasan_strings+0x10/0x10 [ 20.319552] ? __schedule+0xce8/0x2840 [ 20.319604] ? __pfx_read_tsc+0x10/0x10 [ 20.319653] ? ktime_get_ts64+0x86/0x230 [ 20.319726] kunit_try_run_case+0x1a6/0x480 [ 20.319787] ? __pfx_kunit_try_run_case+0x10/0x10 [ 20.319842] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 20.319920] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 20.319981] ? __kthread_parkme+0x82/0x160 [ 20.320017] ? preempt_count_sub+0x50/0x80 [ 20.320051] ? __pfx_kunit_try_run_case+0x10/0x10 [ 20.320080] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 20.320114] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 20.320147] kthread+0x324/0x6e0 [ 20.320174] ? trace_preempt_on+0x20/0xc0 [ 20.320206] ? __pfx_kthread+0x10/0x10 [ 20.320234] ? _raw_spin_unlock_irq+0x47/0x80 [ 20.320262] ? calculate_sigpending+0x7b/0xa0 [ 20.320289] ? __pfx_kthread+0x10/0x10 [ 20.320335] ret_from_fork+0x41/0x80 [ 20.320362] ? __pfx_kthread+0x10/0x10 [ 20.320390] ret_from_fork_asm+0x1a/0x30 [ 20.320430] </TASK> [ 20.320444] [ 20.331412] Allocated by task 267: [ 20.331779] kasan_save_stack+0x45/0x70 [ 20.332212] kasan_save_track+0x18/0x40 [ 20.333478] kasan_save_alloc_info+0x3b/0x50 [ 20.333827] __kasan_kmalloc+0xb7/0xc0 [ 20.334086] __kmalloc_cache_noprof+0x18a/0x420 [ 20.334390] kasan_strings+0xb9/0xb60 [ 20.334778] kunit_try_run_case+0x1a6/0x480 [ 20.335219] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 20.335566] kthread+0x324/0x6e0 [ 20.335800] ret_from_fork+0x41/0x80 [ 20.336171] ret_from_fork_asm+0x1a/0x30 [ 20.336648] [ 20.336874] Freed by task 267: [ 20.337207] kasan_save_stack+0x45/0x70 [ 20.337639] kasan_save_track+0x18/0x40 [ 20.337940] kasan_save_free_info+0x3f/0x60 [ 20.338242] __kasan_slab_free+0x56/0x70 [ 20.338492] kfree+0x224/0x3f0 [ 20.338804] kasan_strings+0x13c/0xb60 [ 20.339349] kunit_try_run_case+0x1a6/0x480 [ 20.339767] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 20.340294] kthread+0x324/0x6e0 [ 20.340616] ret_from_fork+0x41/0x80 [ 20.340896] ret_from_fork_asm+0x1a/0x30 [ 20.341150] [ 20.341290] The buggy address belongs to the object at ffff888102bd9540 [ 20.341290] which belongs to the cache kmalloc-32 of size 32 [ 20.342252] The buggy address is located 16 bytes inside of [ 20.342252] freed 32-byte region [ffff888102bd9540, ffff888102bd9560) [ 20.342896] [ 20.343049] The buggy address belongs to the physical page: [ 20.343494] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102bd9 [ 20.344177] flags: 0x200000000000000(node=0|zone=2) [ 20.344780] page_type: f5(slab) [ 20.345134] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 20.345526] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 20.345902] page dumped because: kasan: bad access detected [ 20.346544] [ 20.346749] Memory state around the buggy address: [ 20.347177] ffff888102bd9400: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.347849] ffff888102bd9480: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.348207] >ffff888102bd9500: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.348535] ^ [ 20.349209] ffff888102bd9580: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.349825] ffff888102bd9600: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 20.350609] ==================================================================