Date
Feb. 5, 2025, 2:09 p.m.
Environment | |
---|---|
qemu-arm64 |
[ 182.515431] ================================================================== [ 182.516927] BUG: KASAN: slab-use-after-free in strrchr+0x28/0x58 [ 182.518976] Read of size 1 at addr ffff0000c5f6ec10 by task kunit_try_catch/204 [ 182.520242] [ 182.520756] CPU: 1 PID: 204 Comm: kunit_try_catch Tainted: G B N 6.6.76-rc1 #1 [ 182.523406] Hardware name: linux,dummy-virt (DT) [ 182.524594] Call trace: [ 182.525312] dump_backtrace+0x9c/0x128 [ 182.526709] show_stack+0x20/0x38 [ 182.527749] dump_stack_lvl+0x60/0xb0 [ 182.529246] print_report+0xf8/0x5d8 [ 182.530325] kasan_report+0xc8/0x118 [ 182.531427] __asan_load1+0x60/0x70 [ 182.532586] strrchr+0x28/0x58 [ 182.533737] kasan_strings+0x104/0x478 [ 182.534721] kunit_try_run_case+0xf8/0x260 [ 182.535992] kunit_generic_run_threadfn_adapter+0x38/0x60 [ 182.537462] kthread+0x18c/0x1a8 [ 182.538256] ret_from_fork+0x10/0x20 [ 182.539165] [ 182.539682] Allocated by task 204: [ 182.541044] kasan_save_stack+0x3c/0x68 [ 182.542482] kasan_set_track+0x2c/0x40 [ 182.543690] kasan_save_alloc_info+0x24/0x38 [ 182.545326] __kasan_kmalloc+0xd4/0xd8 [ 182.546474] kmalloc_trace+0x68/0x130 [ 182.547508] kasan_strings+0xa0/0x478 [ 182.548586] kunit_try_run_case+0xf8/0x260 [ 182.549848] kunit_generic_run_threadfn_adapter+0x38/0x60 [ 182.551341] kthread+0x18c/0x1a8 [ 182.552293] ret_from_fork+0x10/0x20 [ 182.553651] [ 182.554189] Freed by task 204: [ 182.554959] kasan_save_stack+0x3c/0x68 [ 182.555645] kasan_set_track+0x2c/0x40 [ 182.556796] kasan_save_free_info+0x38/0x60 [ 182.558181] __kasan_slab_free+0x100/0x170 [ 182.559223] __kmem_cache_free+0x170/0x2e0 [ 182.560371] kfree+0x74/0x138 [ 182.561655] kasan_strings+0xbc/0x478 [ 182.562748] kunit_try_run_case+0xf8/0x260 [ 182.563930] kunit_generic_run_threadfn_adapter+0x38/0x60 [ 182.565400] kthread+0x18c/0x1a8 [ 182.566423] ret_from_fork+0x10/0x20 [ 182.567472] [ 182.568000] The buggy address belongs to the object at ffff0000c5f6ec00 [ 182.568000] which belongs to the cache kmalloc-32 of size 32 [ 182.570415] The buggy address is located 16 bytes inside of [ 182.570415] freed 32-byte region [ffff0000c5f6ec00, ffff0000c5f6ec20) [ 182.572911] [ 182.573446] The buggy address belongs to the physical page: [ 182.575068] page:00000000e8269612 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105f6e [ 182.577382] flags: 0xbfffc0000000800(slab|node=0|zone=2|lastcpupid=0xffff) [ 182.578822] page_type: 0xffffffff() [ 182.579649] raw: 0bfffc0000000800 ffff0000c0001500 dead000000000122 0000000000000000 [ 182.581764] raw: 0000000000000000 0000000080400040 00000001ffffffff 0000000000000000 [ 182.583710] page dumped because: kasan: bad access detected [ 182.585350] [ 182.585909] Memory state around the buggy address: [ 182.587037] ffff0000c5f6eb00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 182.588833] ffff0000c5f6eb80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 182.590613] >ffff0000c5f6ec00: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 182.592099] ^ [ 182.593482] ffff0000c5f6ec80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 182.595046] ffff0000c5f6ed00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 182.596564] ==================================================================