Date
Feb. 5, 2025, 2:09 p.m.
Environment | |
---|---|
qemu-arm64 |
[ 182.426124] ================================================================== [ 182.427983] BUG: KASAN: slab-use-after-free in strchr+0x20/0x80 [ 182.429478] Read of size 1 at addr ffff0000c5f6ec10 by task kunit_try_catch/204 [ 182.431791] [ 182.432267] CPU: 1 PID: 204 Comm: kunit_try_catch Tainted: G B N 6.6.76-rc1 #1 [ 182.434660] Hardware name: linux,dummy-virt (DT) [ 182.435793] Call trace: [ 182.436410] dump_backtrace+0x9c/0x128 [ 182.437826] show_stack+0x20/0x38 [ 182.438862] dump_stack_lvl+0x60/0xb0 [ 182.440025] print_report+0xf8/0x5d8 [ 182.441184] kasan_report+0xc8/0x118 [ 182.442507] __asan_load1+0x60/0x70 [ 182.443649] strchr+0x20/0x80 [ 182.444632] kasan_strings+0xdc/0x478 [ 182.445970] kunit_try_run_case+0xf8/0x260 [ 182.447195] kunit_generic_run_threadfn_adapter+0x38/0x60 [ 182.448712] kthread+0x18c/0x1a8 [ 182.449807] ret_from_fork+0x10/0x20 [ 182.451015] [ 182.451620] Allocated by task 204: [ 182.452504] kasan_save_stack+0x3c/0x68 [ 182.453826] kasan_set_track+0x2c/0x40 [ 182.454641] kasan_save_alloc_info+0x24/0x38 [ 182.456060] __kasan_kmalloc+0xd4/0xd8 [ 182.457247] kmalloc_trace+0x68/0x130 [ 182.458639] kasan_strings+0xa0/0x478 [ 182.459739] kunit_try_run_case+0xf8/0x260 [ 182.460948] kunit_generic_run_threadfn_adapter+0x38/0x60 [ 182.462609] kthread+0x18c/0x1a8 [ 182.463799] ret_from_fork+0x10/0x20 [ 182.464904] [ 182.465392] Freed by task 204: [ 182.466288] kasan_save_stack+0x3c/0x68 [ 182.467544] kasan_set_track+0x2c/0x40 [ 182.468845] kasan_save_free_info+0x38/0x60 [ 182.470187] __kasan_slab_free+0x100/0x170 [ 182.471246] __kmem_cache_free+0x170/0x2e0 [ 182.472801] kfree+0x74/0x138 [ 182.474436] kasan_strings+0xbc/0x478 [ 182.475620] kunit_try_run_case+0xf8/0x260 [ 182.476829] kunit_generic_run_threadfn_adapter+0x38/0x60 [ 182.478483] kthread+0x18c/0x1a8 [ 182.479507] ret_from_fork+0x10/0x20 [ 182.480765] [ 182.481611] The buggy address belongs to the object at ffff0000c5f6ec00 [ 182.481611] which belongs to the cache kmalloc-32 of size 32 [ 182.484060] The buggy address is located 16 bytes inside of [ 182.484060] freed 32-byte region [ffff0000c5f6ec00, ffff0000c5f6ec20) [ 182.486856] [ 182.487347] The buggy address belongs to the physical page: [ 182.488917] page:00000000e8269612 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105f6e [ 182.491284] flags: 0xbfffc0000000800(slab|node=0|zone=2|lastcpupid=0xffff) [ 182.493211] page_type: 0xffffffff() [ 182.494809] raw: 0bfffc0000000800 ffff0000c0001500 dead000000000122 0000000000000000 [ 182.496550] raw: 0000000000000000 0000000080400040 00000001ffffffff 0000000000000000 [ 182.498315] page dumped because: kasan: bad access detected [ 182.499562] [ 182.500276] Memory state around the buggy address: [ 182.501627] ffff0000c5f6eb00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 182.503285] ffff0000c5f6eb80: fa fb fb fb fc fc fc fc 00 00 07 fc fc fc fc fc [ 182.505018] >ffff0000c5f6ec00: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 182.506741] ^ [ 182.507838] ffff0000c5f6ec80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 182.509474] ffff0000c5f6ed00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 182.511690] ==================================================================