Hay
Date
Feb. 5, 2025, 2:09 p.m.

Environment
qemu-arm64

[  182.044091] ==================================================================
[  182.046397] BUG: KASAN: invalid-free in kmem_cache_invalid_free+0xdc/0x230
[  182.047933] Free of addr ffff0000c60a7001 by task kunit_try_catch/196
[  182.049524] 
[  182.050158] CPU: 0 PID: 196 Comm: kunit_try_catch Tainted: G    B            N 6.6.76-rc1 #1
[  182.052081] Hardware name: linux,dummy-virt (DT)
[  182.053197] Call trace:
[  182.053922]  dump_backtrace+0x9c/0x128
[  182.055009]  show_stack+0x20/0x38
[  182.055993]  dump_stack_lvl+0x60/0xb0
[  182.057119]  print_report+0xf8/0x5d8
[  182.058229]  kasan_report_invalid_free+0xb0/0xd8
[  182.059513]  __kasan_slab_free+0x164/0x170
[  182.060690]  kmem_cache_free+0x18c/0x3f8
[  182.061891]  kmem_cache_invalid_free+0xdc/0x230
[  182.063102]  kunit_try_run_case+0xf8/0x260
[  182.064306]  kunit_generic_run_threadfn_adapter+0x38/0x60
[  182.065767]  kthread+0x18c/0x1a8
[  182.066718]  ret_from_fork+0x10/0x20
[  182.067787] 
[  182.068315] Allocated by task 196:
[  182.069206]  kasan_save_stack+0x3c/0x68
[  182.070361]  kasan_set_track+0x2c/0x40
[  182.071465]  kasan_save_alloc_info+0x24/0x38
[  182.072714]  __kasan_slab_alloc+0xa8/0xb0
[  182.073901]  kmem_cache_alloc+0x134/0x330
[  182.075051]  kmem_cache_invalid_free+0xb8/0x230
[  182.076299]  kunit_try_run_case+0xf8/0x260
[  182.077480]  kunit_generic_run_threadfn_adapter+0x38/0x60
[  182.078960]  kthread+0x18c/0x1a8
[  182.079930]  ret_from_fork+0x10/0x20
[  182.081042] 
[  182.081543] The buggy address belongs to the object at ffff0000c60a7000
[  182.081543]  which belongs to the cache test_cache of size 200
[  182.083925] The buggy address is located 1 bytes inside of
[  182.083925]  200-byte region [ffff0000c60a7000, ffff0000c60a70c8)
[  182.086196] 
[  182.086834] The buggy address belongs to the physical page:
[  182.088084] page:000000005c63666a refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1060a7
[  182.089994] flags: 0xbfffc0000000800(slab|node=0|zone=2|lastcpupid=0xffff)
[  182.091492] page_type: 0xffffffff()
[  182.092544] raw: 0bfffc0000000800 ffff0000c56c0780 dead000000000122 0000000000000000
[  182.094238] raw: 0000000000000000 00000000800f000f 00000001ffffffff 0000000000000000
[  182.095775] page dumped because: kasan: bad access detected
[  182.096991] 
[  182.097504] Memory state around the buggy address:
[  182.098766]  ffff0000c60a6f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[  182.100328]  ffff0000c60a6f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[  182.101912] >ffff0000c60a7000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[  182.103402]                    ^
[  182.104290]  ffff0000c60a7080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[  182.105882]  ffff0000c60a7100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[  182.107407] ==================================================================