Date
June 17, 2025, 3:39 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 94.874591] ================================================================== [ 94.875670] BUG: KASAN: slab-use-after-free in strlen+0x18/0x68 [ 94.876776] Read of size 1 at addr ffff0000c60910d0 by task kunit_try_catch/205 [ 94.877837] [ 94.878311] CPU: 0 PID: 205 Comm: kunit_try_catch Tainted: G B N 6.6.94-rc1 #1 [ 94.879479] Hardware name: linux,dummy-virt (DT) [ 94.880178] Call trace: [ 94.880612] dump_backtrace+0x9c/0x128 [ 94.881301] show_stack+0x20/0x38 [ 94.882093] dump_stack_lvl+0x60/0xb0 [ 94.883561] print_report+0xf8/0x5e8 [ 94.884597] kasan_report+0xdc/0x128 [ 94.885498] __asan_load1+0x60/0x70 [ 94.886300] strlen+0x18/0x68 [ 94.887059] kasan_strings+0x17c/0x478 [ 94.887813] kunit_try_run_case+0x114/0x298 [ 94.888927] kunit_generic_run_threadfn_adapter+0x38/0x60 [ 94.890118] kthread+0x18c/0x1a8 [ 94.891134] ret_from_fork+0x10/0x20 [ 94.891660] [ 94.891851] Allocated by task 205: [ 94.892145] kasan_save_stack+0x3c/0x68 [ 94.892659] kasan_set_track+0x2c/0x40 [ 94.893931] kasan_save_alloc_info+0x24/0x38 [ 94.895060] __kasan_kmalloc+0xd4/0xd8 [ 94.895828] kmalloc_trace+0x68/0x130 [ 94.896622] kasan_strings+0xa0/0x478 [ 94.897464] kunit_try_run_case+0x114/0x298 [ 94.898259] kunit_generic_run_threadfn_adapter+0x38/0x60 [ 94.899204] kthread+0x18c/0x1a8 [ 94.899975] ret_from_fork+0x10/0x20 [ 94.900754] [ 94.901156] Freed by task 205: [ 94.901701] kasan_save_stack+0x3c/0x68 [ 94.902457] kasan_set_track+0x2c/0x40 [ 94.903402] kasan_save_free_info+0x38/0x60 [ 94.904321] __kasan_slab_free+0x100/0x170 [ 94.905073] __kmem_cache_free+0x178/0x2c8 [ 94.905979] kfree+0x74/0x138 [ 94.906826] kasan_strings+0xbc/0x478 [ 94.907763] kunit_try_run_case+0x114/0x298 [ 94.908603] kunit_generic_run_threadfn_adapter+0x38/0x60 [ 94.909598] kthread+0x18c/0x1a8 [ 94.910246] ret_from_fork+0x10/0x20 [ 94.910999] [ 94.911325] The buggy address belongs to the object at ffff0000c60910c0 [ 94.911325] which belongs to the cache kmalloc-32 of size 32 [ 94.913215] The buggy address is located 16 bytes inside of [ 94.913215] freed 32-byte region [ffff0000c60910c0, ffff0000c60910e0) [ 94.914659] [ 94.915069] The buggy address belongs to the physical page: [ 94.916111] page:0000000008bc5175 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106091 [ 94.917247] flags: 0xbfffc0000000800(slab|node=0|zone=2|lastcpupid=0xffff) [ 94.917903] page_type: 0xffffffff() [ 94.918312] raw: 0bfffc0000000800 ffff0000c0001500 dead000000000122 0000000000000000 [ 94.919603] raw: 0000000000000000 0000000080400040 00000001ffffffff 0000000000000000 [ 94.920786] page dumped because: kasan: bad access detected [ 94.921817] [ 94.922188] Memory state around the buggy address: [ 94.923600] ffff0000c6090f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 94.924614] ffff0000c6091000: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 94.925705] >ffff0000c6091080: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 94.926723] ^ [ 94.928546] ffff0000c6091100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 94.929621] ffff0000c6091180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 94.930710] ==================================================================
[ 35.656042] ================================================================== [ 35.656456] BUG: KASAN: slab-use-after-free in strlen+0x13/0x50 [ 35.656969] Read of size 1 at addr ffff888102869450 by task kunit_try_catch/220 [ 35.657773] [ 35.657917] CPU: 0 PID: 220 Comm: kunit_try_catch Tainted: G B N 6.6.94-rc1 #1 [ 35.658655] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 35.659294] Call Trace: [ 35.659599] <TASK> [ 35.659771] dump_stack_lvl+0x4e/0x90 [ 35.660279] print_report+0xd2/0x650 [ 35.660687] ? __virt_addr_valid+0x156/0x1e0 [ 35.661109] ? strlen+0x13/0x50 [ 35.661523] ? kasan_complete_mode_report_info+0x64/0x200 [ 35.662015] ? strlen+0x13/0x50 [ 35.662222] kasan_report+0x147/0x180 [ 35.662496] ? strlen+0x13/0x50 [ 35.663046] __asan_load1+0x66/0x70 [ 35.663660] strlen+0x13/0x50 [ 35.664017] kasan_strings+0x1dc/0x510 [ 35.664267] ? __pfx_kasan_strings+0x10/0x10 [ 35.664726] ? __schedule+0x715/0x11a0 [ 35.665188] ? ktime_get_ts64+0x118/0x140 [ 35.665668] kunit_try_run_case+0x120/0x290 [ 35.666093] ? __pfx_kunit_try_run_case+0x10/0x10 [ 35.666517] ? __kasan_check_write+0x18/0x20 [ 35.667021] ? trace_preempt_on+0x20/0xa0 [ 35.667259] ? __kthread_parkme+0x4f/0xd0 [ 35.667645] ? preempt_count_sub+0x50/0x80 [ 35.667946] ? __pfx_kunit_try_run_case+0x10/0x10 [ 35.668604] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 35.669089] kunit_generic_run_threadfn_adapter+0x33/0x50 [ 35.669615] kthread+0x19e/0x1e0 [ 35.670019] ? __pfx_kthread+0x10/0x10 [ 35.670402] ret_from_fork+0x41/0x70 [ 35.670789] ? __pfx_kthread+0x10/0x10 [ 35.671177] ret_from_fork_asm+0x1b/0x30 [ 35.671642] </TASK> [ 35.671882] [ 35.672013] Allocated by task 220: [ 35.672184] kasan_save_stack+0x44/0x70 [ 35.672712] kasan_set_track+0x29/0x40 [ 35.673129] kasan_save_alloc_info+0x22/0x30 [ 35.673554] __kasan_kmalloc+0xb7/0xc0 [ 35.673915] kmalloc_trace+0x4c/0xb0 [ 35.674145] kasan_strings+0x9f/0x510 [ 35.674380] kunit_try_run_case+0x120/0x290 [ 35.674668] kunit_generic_run_threadfn_adapter+0x33/0x50 [ 35.675294] kthread+0x19e/0x1e0 [ 35.675672] ret_from_fork+0x41/0x70 [ 35.676145] ret_from_fork_asm+0x1b/0x30 [ 35.676501] [ 35.676816] Freed by task 220: [ 35.677114] kasan_save_stack+0x44/0x70 [ 35.677465] kasan_set_track+0x29/0x40 [ 35.677881] kasan_save_free_info+0x2f/0x50 [ 35.678261] ____kasan_slab_free+0x172/0x1d0 [ 35.678567] __kasan_slab_free+0x16/0x20 [ 35.679093] __kmem_cache_free+0x190/0x310 [ 35.679545] kfree+0x7c/0x120 [ 35.679871] kasan_strings+0xc3/0x510 [ 35.680167] kunit_try_run_case+0x120/0x290 [ 35.680461] kunit_generic_run_threadfn_adapter+0x33/0x50 [ 35.681043] kthread+0x19e/0x1e0 [ 35.681436] ret_from_fork+0x41/0x70 [ 35.681799] ret_from_fork_asm+0x1b/0x30 [ 35.682185] [ 35.682330] The buggy address belongs to the object at ffff888102869440 [ 35.682330] which belongs to the cache kmalloc-32 of size 32 [ 35.683045] The buggy address is located 16 bytes inside of [ 35.683045] freed 32-byte region [ffff888102869440, ffff888102869460) [ 35.684124] [ 35.684473] The buggy address belongs to the physical page: [ 35.685064] page:(____ptrval____) refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102869 [ 35.685798] flags: 0x200000000000800(slab|node=0|zone=2) [ 35.686297] page_type: 0xffffffff() [ 35.686732] raw: 0200000000000800 ffff888100041500 dead000000000122 0000000000000000 [ 35.687319] raw: 0000000000000000 0000000080400040 00000001ffffffff 0000000000000000 [ 35.687929] page dumped because: kasan: bad access detected [ 35.688186] [ 35.688312] Memory state around the buggy address: [ 35.688812] ffff888102869300: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 35.689327] ffff888102869380: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 35.690143] >ffff888102869400: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 35.690774] ^ [ 35.691607] ffff888102869480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 35.692203] ffff888102869500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 35.692827] ==================================================================