Hay
Date
June 2, 2025, 2:10 p.m.

Environment
qemu-arm64

[   20.345444] ==================================================================
[   20.346179] BUG: KASAN: double-free in kfree_sensitive+0x3c/0xb0
[   20.347351] Free of addr fff00000c5bb2280 by task kunit_try_catch/179
[   20.347740] 
[   20.347972] CPU: 0 UID: 0 PID: 179 Comm: kunit_try_catch Tainted: G    B            N 6.12.32-rc1 #1
[   20.348153] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.348228] Hardware name: linux,dummy-virt (DT)
[   20.348323] Call trace:
[   20.348380]  dump_backtrace+0x9c/0x128
[   20.348480]  show_stack+0x20/0x38
[   20.348553]  dump_stack_lvl+0x8c/0xd0
[   20.348633]  print_report+0x118/0x5f0
[   20.348712]  kasan_report_invalid_free+0xc0/0xe8
[   20.348795]  check_slab_allocation+0xd4/0x108
[   20.348891]  __kasan_slab_pre_free+0x2c/0x48
[   20.348973]  kfree+0xe8/0x3b8
[   20.349052]  kfree_sensitive+0x3c/0xb0
[   20.349130]  kmalloc_double_kzfree+0x174/0x318
[   20.349216]  kunit_try_run_case+0x170/0x3f0
[   20.350580]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.350693]  kthread+0x24c/0x2d0
[   20.350743]  ret_from_fork+0x10/0x20
[   20.350795] 
[   20.356023] Allocated by task 179:
[   20.356491]  kasan_save_stack+0x3c/0x68
[   20.356998]  kasan_save_track+0x20/0x40
[   20.358788]  kasan_save_alloc_info+0x40/0x58
[   20.359705]  __kasan_kmalloc+0xd4/0xd8
[   20.360177]  __kmalloc_cache_noprof+0x154/0x320
[   20.360703]  kmalloc_double_kzfree+0xb8/0x318
[   20.361121]  kunit_try_run_case+0x170/0x3f0
[   20.361469]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.362010]  kthread+0x24c/0x2d0
[   20.362371]  ret_from_fork+0x10/0x20
[   20.362804] 
[   20.363077] Freed by task 179:
[   20.363919]  kasan_save_stack+0x3c/0x68
[   20.364301]  kasan_save_track+0x20/0x40
[   20.364568]  kasan_save_free_info+0x4c/0x78
[   20.364883]  __kasan_slab_free+0x6c/0x98
[   20.365190]  kfree+0x110/0x3b8
[   20.365605]  kfree_sensitive+0x80/0xb0
[   20.366092]  kmalloc_double_kzfree+0x120/0x318
[   20.366626]  kunit_try_run_case+0x170/0x3f0
[   20.367060]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.368127]  kthread+0x24c/0x2d0
[   20.368493]  ret_from_fork+0x10/0x20
[   20.368917] 
[   20.369183] The buggy address belongs to the object at fff00000c5bb2280
[   20.369183]  which belongs to the cache kmalloc-16 of size 16
[   20.370132] The buggy address is located 0 bytes inside of
[   20.370132]  16-byte region [fff00000c5bb2280, fff00000c5bb2290)
[   20.370970] 
[   20.371651] The buggy address belongs to the physical page:
[   20.372119] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105bb2
[   20.372900] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   20.373577] page_type: f5(slab)
[   20.373832] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   20.374935] raw: 0000000000000000 0000000080800080 00000001f5000000 0000000000000000
[   20.375742] page dumped because: kasan: bad access detected
[   20.376160] 
[   20.376816] Memory state around the buggy address:
[   20.377181]  fff00000c5bb2180: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   20.378105]  fff00000c5bb2200: fa fb fc fc 00 04 fc fc fa fb fc fc fa fb fc fc
[   20.378792] >fff00000c5bb2280: fa fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.379458]                    ^
[   20.379934]  fff00000c5bb2300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.380677]  fff00000c5bb2380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.381533] ==================================================================