Date
June 7, 2025, 10:40 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 26.207258] ================================================================== [ 26.207957] BUG: KASAN: slab-use-after-free in strlen+0xa8/0xb0 [ 26.208620] Read of size 1 at addr fff00000c64bc790 by task kunit_try_catch/248 [ 26.210214] [ 26.210554] CPU: 0 UID: 0 PID: 248 Comm: kunit_try_catch Tainted: G B N 6.14.11-rc1 #1 [ 26.210784] Tainted: [B]=BAD_PAGE, [N]=TEST [ 26.210869] Hardware name: linux,dummy-virt (DT) [ 26.210984] Call trace: [ 26.211055] show_stack+0x20/0x38 (C) [ 26.211126] dump_stack_lvl+0x8c/0xd0 [ 26.211189] print_report+0x118/0x608 [ 26.211251] kasan_report+0xdc/0x128 [ 26.211310] __asan_report_load1_noabort+0x20/0x30 [ 26.211371] strlen+0xa8/0xb0 [ 26.211430] kasan_strings+0x304/0x8d8 [ 26.211491] kunit_try_run_case+0x170/0x3f0 [ 26.211552] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 26.211618] kthread+0x318/0x620 [ 26.211676] ret_from_fork+0x10/0x20 [ 26.211737] [ 26.219046] Allocated by task 248: [ 26.219545] kasan_save_stack+0x3c/0x68 [ 26.220412] kasan_save_track+0x20/0x40 [ 26.220916] kasan_save_alloc_info+0x40/0x58 [ 26.221952] __kasan_kmalloc+0xd4/0xd8 [ 26.222488] __kmalloc_cache_noprof+0x16c/0x3c0 [ 26.223146] kasan_strings+0xb0/0x8d8 [ 26.223586] kunit_try_run_case+0x170/0x3f0 [ 26.224179] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 26.224831] kthread+0x318/0x620 [ 26.226226] ret_from_fork+0x10/0x20 [ 26.226729] [ 26.227053] Freed by task 248: [ 26.227523] kasan_save_stack+0x3c/0x68 [ 26.228070] kasan_save_track+0x20/0x40 [ 26.228525] kasan_save_free_info+0x4c/0x78 [ 26.229151] __kasan_slab_free+0x6c/0x98 [ 26.229876] kfree+0x214/0x3c8 [ 26.230321] kasan_strings+0x124/0x8d8 [ 26.230932] kunit_try_run_case+0x170/0x3f0 [ 26.231484] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 26.232195] kthread+0x318/0x620 [ 26.232686] ret_from_fork+0x10/0x20 [ 26.233909] [ 26.234245] The buggy address belongs to the object at fff00000c64bc780 [ 26.234245] which belongs to the cache kmalloc-32 of size 32 [ 26.235316] The buggy address is located 16 bytes inside of [ 26.235316] freed 32-byte region [fff00000c64bc780, fff00000c64bc7a0) [ 26.237267] [ 26.237639] The buggy address belongs to the physical page: [ 26.238690] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1064bc [ 26.239549] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 26.241868] page_type: f5(slab) [ 26.242521] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 26.243320] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 26.244434] page dumped because: kasan: bad access detected [ 26.245394] [ 26.247041] Memory state around the buggy address: [ 26.247871] fff00000c64bc680: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 26.249058] fff00000c64bc700: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 26.250198] >fff00000c64bc780: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 26.250732] ^ [ 26.251407] fff00000c64bc800: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 26.252566] fff00000c64bc880: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 26.253726] ==================================================================
[ 20.275015] ================================================================== [ 20.275545] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0 [ 20.275989] Read of size 1 at addr ffff888102bd9550 by task kunit_try_catch/267 [ 20.276463] [ 20.276642] CPU: 0 UID: 0 PID: 267 Comm: kunit_try_catch Tainted: G B N 6.14.11-rc1 #1 [ 20.276743] Tainted: [B]=BAD_PAGE, [N]=TEST [ 20.276775] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 20.276822] Call Trace: [ 20.276872] <TASK> [ 20.276913] dump_stack_lvl+0x73/0xb0 [ 20.276977] print_report+0xd1/0x650 [ 20.277037] ? __virt_addr_valid+0x1db/0x2d0 [ 20.277090] ? strlen+0x8f/0xb0 [ 20.277136] ? kasan_complete_mode_report_info+0x64/0x200 [ 20.277191] ? strlen+0x8f/0xb0 [ 20.277234] kasan_report+0x140/0x180 [ 20.277291] ? strlen+0x8f/0xb0 [ 20.277351] __asan_report_load1_noabort+0x18/0x20 [ 20.277407] strlen+0x8f/0xb0 [ 20.277457] kasan_strings+0x425/0xb60 [ 20.277512] ? __pfx_kasan_strings+0x10/0x10 [ 20.277567] ? __schedule+0xce8/0x2840 [ 20.277628] ? __pfx_read_tsc+0x10/0x10 [ 20.277677] ? ktime_get_ts64+0x86/0x230 [ 20.277736] kunit_try_run_case+0x1a6/0x480 [ 20.277793] ? __pfx_kunit_try_run_case+0x10/0x10 [ 20.277845] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 20.277926] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 20.277989] ? __kthread_parkme+0x82/0x160 [ 20.278044] ? preempt_count_sub+0x50/0x80 [ 20.278080] ? __pfx_kunit_try_run_case+0x10/0x10 [ 20.278110] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 20.278144] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 20.278176] kthread+0x324/0x6e0 [ 20.278203] ? trace_preempt_on+0x20/0xc0 [ 20.278234] ? __pfx_kthread+0x10/0x10 [ 20.278262] ? _raw_spin_unlock_irq+0x47/0x80 [ 20.278290] ? calculate_sigpending+0x7b/0xa0 [ 20.278334] ? __pfx_kthread+0x10/0x10 [ 20.278365] ret_from_fork+0x41/0x80 [ 20.278389] ? __pfx_kthread+0x10/0x10 [ 20.278417] ret_from_fork_asm+0x1a/0x30 [ 20.278457] </TASK> [ 20.278471] [ 20.292582] Allocated by task 267: [ 20.293171] kasan_save_stack+0x45/0x70 [ 20.293532] kasan_save_track+0x18/0x40 [ 20.293840] kasan_save_alloc_info+0x3b/0x50 [ 20.294206] __kasan_kmalloc+0xb7/0xc0 [ 20.294887] __kmalloc_cache_noprof+0x18a/0x420 [ 20.295234] kasan_strings+0xb9/0xb60 [ 20.295806] kunit_try_run_case+0x1a6/0x480 [ 20.296293] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 20.296876] kthread+0x324/0x6e0 [ 20.297102] ret_from_fork+0x41/0x80 [ 20.297638] ret_from_fork_asm+0x1a/0x30 [ 20.298052] [ 20.298229] Freed by task 267: [ 20.298799] kasan_save_stack+0x45/0x70 [ 20.299050] kasan_save_track+0x18/0x40 [ 20.299755] kasan_save_free_info+0x3f/0x60 [ 20.300153] __kasan_slab_free+0x56/0x70 [ 20.300462] kfree+0x224/0x3f0 [ 20.300754] kasan_strings+0x13c/0xb60 [ 20.301359] kunit_try_run_case+0x1a6/0x480 [ 20.301925] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 20.302435] kthread+0x324/0x6e0 [ 20.302773] ret_from_fork+0x41/0x80 [ 20.303060] ret_from_fork_asm+0x1a/0x30 [ 20.303830] [ 20.304023] The buggy address belongs to the object at ffff888102bd9540 [ 20.304023] which belongs to the cache kmalloc-32 of size 32 [ 20.304776] The buggy address is located 16 bytes inside of [ 20.304776] freed 32-byte region [ffff888102bd9540, ffff888102bd9560) [ 20.305956] [ 20.306094] The buggy address belongs to the physical page: [ 20.306580] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102bd9 [ 20.307226] flags: 0x200000000000000(node=0|zone=2) [ 20.307553] page_type: f5(slab) [ 20.308470] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 20.308909] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 20.309591] page dumped because: kasan: bad access detected [ 20.310090] [ 20.310302] Memory state around the buggy address: [ 20.310938] ffff888102bd9400: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.311585] ffff888102bd9480: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.312273] >ffff888102bd9500: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.312949] ^ [ 20.313310] ffff888102bd9580: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.313829] ffff888102bd9600: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 20.314254] ==================================================================