Hay
Date
May 15, 2025, 10:38 a.m.

Environment
e850-96

[   34.835274] ==================================================================
[   34.835453] BUG: KASAN: slab-use-after-free in kmem_cache_double_destroy+0x174/0x300
[   34.835584] Read of size 1 at addr ffff00080241c000 by task kunit_try_catch/260
[   34.839151] 
[   34.840638] CPU: 3 UID: 0 PID: 260 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc6-next-20250515 #1 PREEMPT 
[   34.840699] Tainted: [B]=BAD_PAGE, [N]=TEST
[   34.840715] Hardware name: WinLink E850-96 board (DT)
[   34.840737] Call trace:
[   34.840749]  show_stack+0x20/0x38 (C)
[   34.840789]  dump_stack_lvl+0x8c/0xd0
[   34.840822]  print_report+0x118/0x608
[   34.840855]  kasan_report+0xdc/0x128
[   34.840885]  __kasan_check_byte+0x54/0x70
[   34.840918]  kmem_cache_destroy+0x34/0x218
[   34.840952]  kmem_cache_double_destroy+0x174/0x300
[   34.840981]  kunit_try_run_case+0x170/0x3f0
[   34.841014]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   34.841048]  kthread+0x328/0x630
[   34.841085]  ret_from_fork+0x10/0x20
[   34.841120] 
[   34.908596] Allocated by task 260:
[   34.911983]  kasan_save_stack+0x3c/0x68
[   34.915799]  kasan_save_track+0x20/0x40
[   34.919619]  kasan_save_alloc_info+0x40/0x58
[   34.923872]  __kasan_slab_alloc+0xa8/0xb0
[   34.927866]  kmem_cache_alloc_noprof+0x10c/0x3a0
[   34.932466]  __kmem_cache_create_args+0x178/0x280
[   34.937153]  kmem_cache_double_destroy+0xc0/0x300
[   34.941841]  kunit_try_run_case+0x170/0x3f0
[   34.946007]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   34.951476]  kthread+0x328/0x630
[   34.954687]  ret_from_fork+0x10/0x20
[   34.958247] 
[   34.959724] Freed by task 260:
[   34.962764]  kasan_save_stack+0x3c/0x68
[   34.966580]  kasan_save_track+0x20/0x40
[   34.970399]  kasan_save_free_info+0x4c/0x78
[   34.974566]  __kasan_slab_free+0x6c/0x98
[   34.978472]  kmem_cache_free+0x260/0x470
[   34.982378]  slab_kmem_cache_release+0x38/0x50
[   34.986805]  kmem_cache_release+0x1c/0x30
[   34.990798]  kobject_put+0x17c/0x430
[   34.994359]  sysfs_slab_release+0x1c/0x30
[   34.998350]  kmem_cache_destroy+0x118/0x218
[   35.002517]  kmem_cache_double_destroy+0x128/0x300
[   35.007291]  kunit_try_run_case+0x170/0x3f0
[   35.011457]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   35.016926]  kthread+0x328/0x630
[   35.020137]  ret_from_fork+0x10/0x20
[   35.023697] 
[   35.025175] The buggy address belongs to the object at ffff00080241c000
[   35.025175]  which belongs to the cache kmem_cache of size 208
[   35.037589] The buggy address is located 0 bytes inside of
[   35.037589]  freed 208-byte region [ffff00080241c000, ffff00080241c0d0)
[   35.049651] 
[   35.051131] The buggy address belongs to the physical page:
[   35.056686] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x88241c
[   35.064670] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   35.072311] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   35.079254] page_type: f5(slab)
[   35.082391] raw: 0bfffe0000000040 ffff000800002000 dead000000000122 0000000000000000
[   35.090109] raw: 0000000000000000 0000000080190019 00000000f5000000 0000000000000000
[   35.097836] head: 0bfffe0000000040 ffff000800002000 dead000000000122 0000000000000000
[   35.105647] head: 0000000000000000 0000000080190019 00000000f5000000 0000000000000000
[   35.113461] head: 0bfffe0000000001 fffffdffe0090701 00000000ffffffff 00000000ffffffff
[   35.121271] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   35.129079] page dumped because: kasan: bad access detected
[   35.134633] 
[   35.136107] Memory state around the buggy address:
[   35.140891]  ffff00080241bf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   35.148091]  ffff00080241bf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   35.155298] >ffff00080241c000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   35.162497]                    ^
[   35.165712]  ffff00080241c080: fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc
[   35.172917]  ffff00080241c100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   35.180120] ==================================================================