Date
June 17, 2025, 3:39 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 94.606150] ================================================================== [ 94.608096] BUG: KASAN: slab-use-after-free in strchr+0x20/0x80 [ 94.609290] Read of size 1 at addr ffff0000c60910d0 by task kunit_try_catch/205 [ 94.610538] [ 94.611496] CPU: 0 PID: 205 Comm: kunit_try_catch Tainted: G B N 6.6.94-rc1 #1 [ 94.612709] Hardware name: linux,dummy-virt (DT) [ 94.613550] Call trace: [ 94.613957] dump_backtrace+0x9c/0x128 [ 94.614567] show_stack+0x20/0x38 [ 94.615164] dump_stack_lvl+0x60/0xb0 [ 94.616327] print_report+0xf8/0x5e8 [ 94.617280] kasan_report+0xdc/0x128 [ 94.618109] __asan_load1+0x60/0x70 [ 94.619085] strchr+0x20/0x80 [ 94.619949] kasan_strings+0xdc/0x478 [ 94.620796] kunit_try_run_case+0x114/0x298 [ 94.621651] kunit_generic_run_threadfn_adapter+0x38/0x60 [ 94.622573] kthread+0x18c/0x1a8 [ 94.623372] ret_from_fork+0x10/0x20 [ 94.624714] [ 94.625217] Allocated by task 205: [ 94.625764] kasan_save_stack+0x3c/0x68 [ 94.627231] kasan_set_track+0x2c/0x40 [ 94.628043] kasan_save_alloc_info+0x24/0x38 [ 94.628785] __kasan_kmalloc+0xd4/0xd8 [ 94.629827] kmalloc_trace+0x68/0x130 [ 94.630443] kasan_strings+0xa0/0x478 [ 94.631972] kunit_try_run_case+0x114/0x298 [ 94.632932] kunit_generic_run_threadfn_adapter+0x38/0x60 [ 94.633948] kthread+0x18c/0x1a8 [ 94.634601] ret_from_fork+0x10/0x20 [ 94.635221] [ 94.635645] Freed by task 205: [ 94.636309] kasan_save_stack+0x3c/0x68 [ 94.637194] kasan_set_track+0x2c/0x40 [ 94.638134] kasan_save_free_info+0x38/0x60 [ 94.638837] __kasan_slab_free+0x100/0x170 [ 94.639763] __kmem_cache_free+0x178/0x2c8 [ 94.641643] kfree+0x74/0x138 [ 94.642370] kasan_strings+0xbc/0x478 [ 94.643204] kunit_try_run_case+0x114/0x298 [ 94.644079] kunit_generic_run_threadfn_adapter+0x38/0x60 [ 94.645199] kthread+0x18c/0x1a8 [ 94.645924] ret_from_fork+0x10/0x20 [ 94.646648] [ 94.647059] The buggy address belongs to the object at ffff0000c60910c0 [ 94.647059] which belongs to the cache kmalloc-32 of size 32 [ 94.648863] The buggy address is located 16 bytes inside of [ 94.648863] freed 32-byte region [ffff0000c60910c0, ffff0000c60910e0) [ 94.650804] [ 94.651210] The buggy address belongs to the physical page: [ 94.651944] page:0000000008bc5175 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106091 [ 94.653606] flags: 0xbfffc0000000800(slab|node=0|zone=2|lastcpupid=0xffff) [ 94.654855] page_type: 0xffffffff() [ 94.655746] raw: 0bfffc0000000800 ffff0000c0001500 dead000000000122 0000000000000000 [ 94.657097] raw: 0000000000000000 0000000080400040 00000001ffffffff 0000000000000000 [ 94.658163] page dumped because: kasan: bad access detected [ 94.659520] [ 94.659891] Memory state around the buggy address: [ 94.660795] ffff0000c6090f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 94.661987] ffff0000c6091000: fa fb fb fb fc fc fc fc 00 00 07 fc fc fc fc fc [ 94.664031] >ffff0000c6091080: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 94.665103] ^ [ 94.665961] ffff0000c6091100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 94.667785] ffff0000c6091180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 94.668702] ==================================================================
[ 35.498940] ================================================================== [ 35.499553] BUG: KASAN: slab-use-after-free in strchr+0x18/0x60 [ 35.500084] Read of size 1 at addr ffff888102869450 by task kunit_try_catch/220 [ 35.500586] [ 35.501255] CPU: 0 PID: 220 Comm: kunit_try_catch Tainted: G B N 6.6.94-rc1 #1 [ 35.502090] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 35.502886] Call Trace: [ 35.503253] <TASK> [ 35.503582] dump_stack_lvl+0x4e/0x90 [ 35.503846] print_report+0xd2/0x650 [ 35.504389] ? __virt_addr_valid+0x156/0x1e0 [ 35.504707] ? strchr+0x18/0x60 [ 35.505162] ? kasan_complete_mode_report_info+0x64/0x200 [ 35.505672] ? strchr+0x18/0x60 [ 35.506125] kasan_report+0x147/0x180 [ 35.506611] ? strchr+0x18/0x60 [ 35.507017] __asan_load1+0x66/0x70 [ 35.507265] strchr+0x18/0x60 [ 35.507717] kasan_strings+0xdf/0x510 [ 35.508123] ? __pfx_kasan_strings+0x10/0x10 [ 35.508678] ? __schedule+0x715/0x11a0 [ 35.509227] ? ktime_get_ts64+0x118/0x140 [ 35.509644] kunit_try_run_case+0x120/0x290 [ 35.510113] ? __pfx_kunit_try_run_case+0x10/0x10 [ 35.510688] ? __kasan_check_write+0x18/0x20 [ 35.511014] ? trace_preempt_on+0x20/0xa0 [ 35.511471] ? __kthread_parkme+0x4f/0xd0 [ 35.512021] ? preempt_count_sub+0x50/0x80 [ 35.512527] ? __pfx_kunit_try_run_case+0x10/0x10 [ 35.513005] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 35.513600] kunit_generic_run_threadfn_adapter+0x33/0x50 [ 35.513911] kthread+0x19e/0x1e0 [ 35.514438] ? __pfx_kthread+0x10/0x10 [ 35.514842] ret_from_fork+0x41/0x70 [ 35.515138] ? __pfx_kthread+0x10/0x10 [ 35.515629] ret_from_fork_asm+0x1b/0x30 [ 35.516222] </TASK> [ 35.516465] [ 35.516576] Allocated by task 220: [ 35.517041] kasan_save_stack+0x44/0x70 [ 35.517516] kasan_set_track+0x29/0x40 [ 35.517967] kasan_save_alloc_info+0x22/0x30 [ 35.518459] __kasan_kmalloc+0xb7/0xc0 [ 35.518703] kmalloc_trace+0x4c/0xb0 [ 35.519261] kasan_strings+0x9f/0x510 [ 35.519627] kunit_try_run_case+0x120/0x290 [ 35.520124] kunit_generic_run_threadfn_adapter+0x33/0x50 [ 35.520683] kthread+0x19e/0x1e0 [ 35.521093] ret_from_fork+0x41/0x70 [ 35.521566] ret_from_fork_asm+0x1b/0x30 [ 35.521904] [ 35.522258] Freed by task 220: [ 35.522629] kasan_save_stack+0x44/0x70 [ 35.523051] kasan_set_track+0x29/0x40 [ 35.523362] kasan_save_free_info+0x2f/0x50 [ 35.523885] ____kasan_slab_free+0x172/0x1d0 [ 35.524315] __kasan_slab_free+0x16/0x20 [ 35.524728] __kmem_cache_free+0x190/0x310 [ 35.525115] kfree+0x7c/0x120 [ 35.525323] kasan_strings+0xc3/0x510 [ 35.525933] kunit_try_run_case+0x120/0x290 [ 35.526382] kunit_generic_run_threadfn_adapter+0x33/0x50 [ 35.526921] kthread+0x19e/0x1e0 [ 35.527317] ret_from_fork+0x41/0x70 [ 35.527701] ret_from_fork_asm+0x1b/0x30 [ 35.528193] [ 35.528479] The buggy address belongs to the object at ffff888102869440 [ 35.528479] which belongs to the cache kmalloc-32 of size 32 [ 35.529462] The buggy address is located 16 bytes inside of [ 35.529462] freed 32-byte region [ffff888102869440, ffff888102869460) [ 35.530228] [ 35.530653] The buggy address belongs to the physical page: [ 35.531016] page:(____ptrval____) refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102869 [ 35.531839] flags: 0x200000000000800(slab|node=0|zone=2) [ 35.532331] page_type: 0xffffffff() [ 35.532731] raw: 0200000000000800 ffff888100041500 dead000000000122 0000000000000000 [ 35.533305] raw: 0000000000000000 0000000080400040 00000001ffffffff 0000000000000000 [ 35.533905] page dumped because: kasan: bad access detected [ 35.534486] [ 35.534764] Memory state around the buggy address: [ 35.535253] ffff888102869300: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 35.535948] ffff888102869380: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 35.536621] >ffff888102869400: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 35.537184] ^ [ 35.537848] ffff888102869480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 35.538554] ffff888102869500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 35.539031] ==================================================================