Hay
Date
July 22, 2025, 2:40 p.m.

Environment
qemu-arm64
qemu-x86_64

[   17.976786] ==================================================================
[   17.976871] BUG: KASAN: invalid-free in kmem_cache_invalid_free+0x184/0x3c8
[   17.976943] Free of addr fff00000c6fab001 by task kunit_try_catch/213
[   17.976996] 
[   17.977037] CPU: 0 UID: 0 PID: 213 Comm: kunit_try_catch Tainted: G    B            N  6.15.8-rc1 #1 PREEMPT 
[   17.977199] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.977343] Hardware name: linux,dummy-virt (DT)
[   17.977388] Call trace:
[   17.977467]  show_stack+0x20/0x38 (C)
[   17.977542]  dump_stack_lvl+0x8c/0xd0
[   17.977595]  print_report+0x118/0x5d0
[   17.977660]  kasan_report_invalid_free+0xc0/0xe8
[   17.977712]  check_slab_allocation+0xfc/0x108
[   17.977757]  __kasan_slab_pre_free+0x2c/0x48
[   17.977803]  kmem_cache_free+0xf0/0x468
[   17.977848]  kmem_cache_invalid_free+0x184/0x3c8
[   17.978047]  kunit_try_run_case+0x170/0x3f0
[   17.978162]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.978239]  kthread+0x328/0x630
[   17.978328]  ret_from_fork+0x10/0x20
[   17.978394] 
[   17.978433] Allocated by task 213:
[   17.978469]  kasan_save_stack+0x3c/0x68
[   17.978511]  kasan_save_track+0x20/0x40
[   17.978546]  kasan_save_alloc_info+0x40/0x58
[   17.978623]  __kasan_slab_alloc+0xa8/0xb0
[   17.978740]  kmem_cache_alloc_noprof+0x10c/0x398
[   17.978838]  kmem_cache_invalid_free+0x12c/0x3c8
[   17.978956]  kunit_try_run_case+0x170/0x3f0
[   17.979044]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.979174]  kthread+0x328/0x630
[   17.979222]  ret_from_fork+0x10/0x20
[   17.979335] 
[   17.979375] The buggy address belongs to the object at fff00000c6fab000
[   17.979375]  which belongs to the cache test_cache of size 200
[   17.979432] The buggy address is located 1 bytes inside of
[   17.979432]  200-byte region [fff00000c6fab000, fff00000c6fab0c8)
[   17.979726] 
[   17.979768] The buggy address belongs to the physical page:
[   17.979819] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106fab
[   17.979935] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.980071] page_type: f5(slab)
[   17.980167] raw: 0bfffe0000000000 fff00000c1bdf640 dead000000000122 0000000000000000
[   17.980265] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   17.980371] page dumped because: kasan: bad access detected
[   17.980448] 
[   17.980545] Memory state around the buggy address:
[   17.980589]  fff00000c6faaf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.980648]  fff00000c6faaf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.980702] >fff00000c6fab000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   17.980739]                    ^
[   17.980768]  fff00000c6fab080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   17.980958]  fff00000c6fab100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.981025] ==================================================================

[   11.855750] ==================================================================
[   11.856698] BUG: KASAN: invalid-free in kmem_cache_invalid_free+0x1d8/0x460
[   11.857140] Free of addr ffff888103cf8001 by task kunit_try_catch/231
[   11.857352] 
[   11.857446] CPU: 0 UID: 0 PID: 231 Comm: kunit_try_catch Tainted: G    B            N  6.15.8-rc1 #1 PREEMPT(voluntary) 
[   11.857493] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.857503] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.857525] Call Trace:
[   11.857539]  <TASK>
[   11.857555]  dump_stack_lvl+0x73/0xb0
[   11.857583]  print_report+0xd1/0x610
[   11.857606]  ? __virt_addr_valid+0x1db/0x2d0
[   11.857630]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.857651]  ? kmem_cache_invalid_free+0x1d8/0x460
[   11.857672]  kasan_report_invalid_free+0x10a/0x130
[   11.857696]  ? kmem_cache_invalid_free+0x1d8/0x460
[   11.857719]  ? kmem_cache_invalid_free+0x1d8/0x460
[   11.857739]  check_slab_allocation+0x11f/0x130
[   11.857760]  __kasan_slab_pre_free+0x28/0x40
[   11.857781]  kmem_cache_free+0xed/0x420
[   11.857801]  ? kasan_save_track+0x18/0x40
[   11.857821]  ? kasan_save_stack+0x45/0x70
[   11.857839]  ? kmem_cache_invalid_free+0x1d8/0x460
[   11.857859]  ? kmem_cache_invalid_free+0x157/0x460
[   11.857893]  kmem_cache_invalid_free+0x1d8/0x460
[   11.857913]  ? __pfx_kmem_cache_invalid_free+0x10/0x10
[   11.857932]  ? finish_task_switch.isra.0+0x153/0x700
[   11.857968]  ? __switch_to+0x5d9/0xf60
[   11.857988]  ? dequeue_task_fair+0x166/0x4e0
[   11.858015]  ? __pfx_read_tsc+0x10/0x10
[   11.858035]  ? ktime_get_ts64+0x86/0x230
[   11.858061]  kunit_try_run_case+0x1a5/0x480
[   11.858082]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.858100]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.858121]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.858153]  ? __kthread_parkme+0x82/0x180
[   11.858175]  ? preempt_count_sub+0x50/0x80
[   11.858198]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.858238]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.858261]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.858283]  kthread+0x337/0x6f0
[   11.858300]  ? trace_preempt_on+0x20/0xc0
[   11.858323]  ? __pfx_kthread+0x10/0x10
[   11.858340]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.858362]  ? calculate_sigpending+0x7b/0xa0
[   11.858383]  ? __pfx_kthread+0x10/0x10
[   11.858401]  ret_from_fork+0x41/0x80
[   11.858421]  ? __pfx_kthread+0x10/0x10
[   11.858438]  ret_from_fork_asm+0x1a/0x30
[   11.858478]  </TASK>
[   11.858489] 
[   11.867843] Allocated by task 231:
[   11.868176]  kasan_save_stack+0x45/0x70
[   11.868338]  kasan_save_track+0x18/0x40
[   11.868530]  kasan_save_alloc_info+0x3b/0x50
[   11.868759]  __kasan_slab_alloc+0x91/0xa0
[   11.869088]  kmem_cache_alloc_noprof+0x123/0x3f0
[   11.869288]  kmem_cache_invalid_free+0x157/0x460
[   11.869766]  kunit_try_run_case+0x1a5/0x480
[   11.870066]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.870365]  kthread+0x337/0x6f0
[   11.870547]  ret_from_fork+0x41/0x80
[   11.870699]  ret_from_fork_asm+0x1a/0x30
[   11.870845] 
[   11.871012] The buggy address belongs to the object at ffff888103cf8000
[   11.871012]  which belongs to the cache test_cache of size 200
[   11.871615] The buggy address is located 1 bytes inside of
[   11.871615]  200-byte region [ffff888103cf8000, ffff888103cf80c8)
[   11.872418] 
[   11.872515] The buggy address belongs to the physical page:
[   11.873209] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103cf8
[   11.874240] flags: 0x200000000000000(node=0|zone=2)
[   11.874443] page_type: f5(slab)
[   11.874724] raw: 0200000000000000 ffff8881014e33c0 dead000000000122 0000000000000000
[   11.875297] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   11.875778] page dumped because: kasan: bad access detected
[   11.876234] 
[   11.876502] Memory state around the buggy address:
[   11.877134]  ffff888103cf7f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.878010]  ffff888103cf7f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.878770] >ffff888103cf8000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   11.879543]                    ^
[   11.879946]  ffff888103cf8080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   11.880300]  ffff888103cf8100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.881142] ==================================================================