Hay
Date
June 17, 2025, 3:40 p.m.

Environment
qemu-arm64
qemu-x86_64

[   22.984554] ==================================================================
[   22.984684] BUG: KASAN: invalid-free in kmem_cache_invalid_free+0x184/0x3c8
[   22.984808] Free of addr fff00000c7928001 by task kunit_try_catch/213
[   22.984863] 
[   22.984923] CPU: 0 UID: 0 PID: 213 Comm: kunit_try_catch Tainted: G    B            N  6.15.3-rc1 #1 PREEMPT 
[   22.985029] Tainted: [B]=BAD_PAGE, [N]=TEST
[   22.985063] Hardware name: linux,dummy-virt (DT)
[   22.985106] Call trace:
[   22.989001]  show_stack+0x20/0x38 (C)
[   22.989770]  dump_stack_lvl+0x8c/0xd0
[   22.989847]  print_report+0x118/0x608
[   22.989905]  kasan_report_invalid_free+0xc0/0xe8
[   22.990748]  check_slab_allocation+0xfc/0x108
[   22.991192]  __kasan_slab_pre_free+0x2c/0x48
[   22.991596]  kmem_cache_free+0xf0/0x468
[   22.991856]  kmem_cache_invalid_free+0x184/0x3c8
[   22.991927]  kunit_try_run_case+0x170/0x3f0
[   22.991992]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.992053]  kthread+0x328/0x630
[   22.992117]  ret_from_fork+0x10/0x20
[   22.992999] 
[   22.993167] Allocated by task 213:
[   22.993693]  kasan_save_stack+0x3c/0x68
[   22.994081]  kasan_save_track+0x20/0x40
[   22.994139]  kasan_save_alloc_info+0x40/0x58
[   22.994289]  __kasan_slab_alloc+0xa8/0xb0
[   22.994371]  kmem_cache_alloc_noprof+0x10c/0x398
[   22.994416]  kmem_cache_invalid_free+0x12c/0x3c8
[   22.994465]  kunit_try_run_case+0x170/0x3f0
[   22.995151]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.995519]  kthread+0x328/0x630
[   22.995574]  ret_from_fork+0x10/0x20
[   22.995635] 
[   22.996093] The buggy address belongs to the object at fff00000c7928000
[   22.996093]  which belongs to the cache test_cache of size 200
[   22.996235] The buggy address is located 1 bytes inside of
[   22.996235]  200-byte region [fff00000c7928000, fff00000c79280c8)
[   22.996309] 
[   22.996339] The buggy address belongs to the physical page:
[   22.996376] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107928
[   22.996446] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   22.996509] page_type: f5(slab)
[   22.996565] raw: 0bfffe0000000000 fff00000c59183c0 dead000000000122 0000000000000000
[   22.996625] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   22.996676] page dumped because: kasan: bad access detected
[   22.996713] 
[   22.997868] Memory state around the buggy address:
[   22.998096]  fff00000c7927f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   22.998367]  fff00000c7927f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   22.998602] >fff00000c7928000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   22.998848]                    ^
[   22.998916]  fff00000c7928080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   22.998993]  fff00000c7928100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.999094] ==================================================================

[   20.562259] ==================================================================
[   20.562899] BUG: KASAN: invalid-free in kmem_cache_invalid_free+0x1d8/0x460
[   20.564717] Free of addr ffff8881030ae001 by task kunit_try_catch/231
[   20.565533] 
[   20.565761] CPU: 0 UID: 0 PID: 231 Comm: kunit_try_catch Tainted: G    B            N  6.15.3-rc1 #1 PREEMPT(voluntary) 
[   20.565848] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.565870] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   20.565901] Call Trace:
[   20.565928]  <TASK>
[   20.565961]  dump_stack_lvl+0x73/0xb0
[   20.567406]  print_report+0xd1/0x650
[   20.567460]  ? __virt_addr_valid+0x1db/0x2d0
[   20.567498]  ? kasan_complete_mode_report_info+0x2a/0x200
[   20.567532]  ? kmem_cache_invalid_free+0x1d8/0x460
[   20.567565]  kasan_report_invalid_free+0x10a/0x130
[   20.567601]  ? kmem_cache_invalid_free+0x1d8/0x460
[   20.567635]  ? kmem_cache_invalid_free+0x1d8/0x460
[   20.567667]  check_slab_allocation+0x11f/0x130
[   20.567700]  __kasan_slab_pre_free+0x28/0x40
[   20.567731]  kmem_cache_free+0xed/0x420
[   20.567763]  ? kmem_cache_alloc_noprof+0x123/0x3f0
[   20.567794]  ? kmem_cache_invalid_free+0x1d8/0x460
[   20.567828]  kmem_cache_invalid_free+0x1d8/0x460
[   20.567857]  ? __pfx_kmem_cache_invalid_free+0x10/0x10
[   20.567898]  ? finish_task_switch.isra.0+0x153/0x700
[   20.567935]  ? __switch_to+0x5d9/0xf60
[   20.568021]  ? dequeue_task_fair+0x166/0x4e0
[   20.568116]  ? __pfx_read_tsc+0x10/0x10
[   20.568153]  ? ktime_get_ts64+0x86/0x230
[   20.568194]  kunit_try_run_case+0x1a5/0x480
[   20.568234]  ? __pfx_kunit_try_run_case+0x10/0x10
[   20.568268]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   20.568331]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   20.568369]  ? __kthread_parkme+0x82/0x180
[   20.568404]  ? preempt_count_sub+0x50/0x80
[   20.568439]  ? __pfx_kunit_try_run_case+0x10/0x10
[   20.568476]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   20.568511]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   20.568547]  kthread+0x337/0x6f0
[   20.568574]  ? trace_preempt_on+0x20/0xc0
[   20.568612]  ? __pfx_kthread+0x10/0x10
[   20.568638]  ? _raw_spin_unlock_irq+0x47/0x80
[   20.568670]  ? calculate_sigpending+0x7b/0xa0
[   20.568703]  ? __pfx_kthread+0x10/0x10
[   20.568730]  ret_from_fork+0x41/0x80
[   20.568762]  ? __pfx_kthread+0x10/0x10
[   20.568790]  ret_from_fork_asm+0x1a/0x30
[   20.568834]  </TASK>
[   20.568851] 
[   20.589850] Allocated by task 231:
[   20.591542]  kasan_save_stack+0x45/0x70
[   20.591990]  kasan_save_track+0x18/0x40
[   20.592417]  kasan_save_alloc_info+0x3b/0x50
[   20.592821]  __kasan_slab_alloc+0x91/0xa0
[   20.593519]  kmem_cache_alloc_noprof+0x123/0x3f0
[   20.593900]  kmem_cache_invalid_free+0x157/0x460
[   20.595077]  kunit_try_run_case+0x1a5/0x480
[   20.595851]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   20.596284]  kthread+0x337/0x6f0
[   20.596582]  ret_from_fork+0x41/0x80
[   20.596908]  ret_from_fork_asm+0x1a/0x30
[   20.598229] 
[   20.598413] The buggy address belongs to the object at ffff8881030ae000
[   20.598413]  which belongs to the cache test_cache of size 200
[   20.599632] The buggy address is located 1 bytes inside of
[   20.599632]  200-byte region [ffff8881030ae000, ffff8881030ae0c8)
[   20.600693] 
[   20.600926] The buggy address belongs to the physical page:
[   20.601862] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1030ae
[   20.602985] flags: 0x200000000000000(node=0|zone=2)
[   20.603465] page_type: f5(slab)
[   20.603824] raw: 0200000000000000 ffff888100fad8c0 dead000000000122 0000000000000000
[   20.604910] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   20.605885] page dumped because: kasan: bad access detected
[   20.606813] 
[   20.607125] Memory state around the buggy address:
[   20.607523]  ffff8881030adf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.608554]  ffff8881030adf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.609001] >ffff8881030ae000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   20.609789]                    ^
[   20.610137]  ffff8881030ae080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   20.611456]  ffff8881030ae100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.612106] ==================================================================