Hay
Date
July 15, 2025, 2:10 p.m.

Environment
qemu-arm64

[  106.863414] ==================================================================
[  106.864300] BUG: KASAN: double-free in kmem_cache_free+0x194/0x42c
[  106.864938] Free of addr ffff0000c670d000 by task kunit_try_catch/243
[  106.865512] 
[  106.865722] CPU: 1 PID: 243 Comm: kunit_try_catch Tainted: G    B            N 6.1.146-rc1 #1
[  106.866411] Hardware name: linux,dummy-virt (DT)
[  106.866837] Call trace:
[  106.867121]  dump_backtrace+0xe0/0x134
[  106.867546]  show_stack+0x20/0x2c
[  106.867979]  dump_stack_lvl+0x88/0xb4
[  106.868475]  print_report+0x158/0x44c
[  106.868910]  kasan_report_invalid_free+0xa8/0x13c
[  106.869429]  __kasan_slab_free+0x134/0x170
[  106.869917]  slab_free_freelist_hook+0xd8/0x1c0
[  106.870360]  kmem_cache_free+0x194/0x42c
[  106.870798]  kmem_cache_double_free+0xec/0x250
[  106.871286]  kunit_try_run_case+0x8c/0x124
[  106.871755]  kunit_generic_run_threadfn_adapter+0x38/0x54
[  106.872308]  kthread+0x15c/0x170
[  106.872705]  ret_from_fork+0x10/0x20
[  106.873161] 
[  106.873361] Allocated by task 243:
[  106.873701]  kasan_save_stack+0x3c/0x70
[  106.874191]  kasan_set_track+0x2c/0x40
[  106.874641]  kasan_save_alloc_info+0x24/0x34
[  106.875153]  __kasan_slab_alloc+0xa8/0xac
[  106.875620]  kmem_cache_alloc+0x194/0x3b0
[  106.876091]  kmem_cache_double_free+0xbc/0x250
[  106.876580]  kunit_try_run_case+0x8c/0x124
[  106.877029]  kunit_generic_run_threadfn_adapter+0x38/0x54
[  106.877581]  kthread+0x15c/0x170
[  106.877991]  ret_from_fork+0x10/0x20
[  106.878375] 
[  106.878593] Freed by task 243:
[  106.878914]  kasan_save_stack+0x3c/0x70
[  106.879360]  kasan_set_track+0x2c/0x40
[  106.879813]  kasan_save_free_info+0x38/0x5c
[  106.880272]  __kasan_slab_free+0x100/0x170
[  106.880781]  slab_free_freelist_hook+0xd8/0x1c0
[  106.881277]  kmem_cache_free+0x194/0x42c
[  106.881717]  kmem_cache_double_free+0xd8/0x250
[  106.882262]  kunit_try_run_case+0x8c/0x124
[  106.882699]  kunit_generic_run_threadfn_adapter+0x38/0x54
[  106.883304]  kthread+0x15c/0x170
[  106.883724]  ret_from_fork+0x10/0x20
[  106.884121] 
[  106.884338] The buggy address belongs to the object at ffff0000c670d000
[  106.884338]  which belongs to the cache test_cache of size 200
[  106.885264] The buggy address is located 0 bytes inside of
[  106.885264]  200-byte region [ffff0000c670d000, ffff0000c670d0c8)
[  106.886180] 
[  106.886381] The buggy address belongs to the physical page:
[  106.886851] page:00000000a4258f4d refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10670d
[  106.887639] flags: 0xbfffc0000000200(slab|node=0|zone=2|lastcpupid=0xffff)
[  106.888315] raw: 0bfffc0000000200 0000000000000000 dead000000000122 ffff0000c6446480
[  106.888988] raw: 0000000000000000 00000000800f000f 00000001ffffffff 0000000000000000
[  106.889664] page dumped because: kasan: bad access detected
[  106.890151] 
[  106.890338] Memory state around the buggy address:
[  106.890816]  ffff0000c670cf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[  106.891449]  ffff0000c670cf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[  106.892079] >ffff0000c670d000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[  106.892686]                    ^
[  106.893047]  ffff0000c670d080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc
[  106.893674]  ffff0000c670d100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[  106.894284] ==================================================================