Hay
Date
June 26, 2025, 9:10 a.m.

Environment
dragonboard-845c
qemu-arm64
qemu-x86_64

[   45.459616] ==================================================================
[   45.471310] BUG: KASAN: invalid-free in kmem_cache_invalid_free+0x184/0x3c8
[   45.478383] Free of addr ffff000096cb2001 by task kunit_try_catch/297
[   45.484920] 
[   45.486464] CPU: 1 UID: 0 PID: 297 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc3-next-20250626 #1 PREEMPT 
[   45.486503] Tainted: [B]=BAD_PAGE, [N]=TEST
[   45.486513] Hardware name: Thundercomm Dragonboard 845c (DT)
[   45.486530] Call trace:
[   45.486538]  show_stack+0x20/0x38 (C)
[   45.486562]  dump_stack_lvl+0x8c/0xd0
[   45.486587]  print_report+0x118/0x608
[   45.486608]  kasan_report_invalid_free+0xc0/0xe8
[   45.486629]  check_slab_allocation+0xfc/0x108
[   45.486650]  __kasan_slab_pre_free+0x2c/0x48
[   45.486670]  kmem_cache_free+0xf0/0x468
[   45.486692]  kmem_cache_invalid_free+0x184/0x3c8
[   45.486710]  kunit_try_run_case+0x170/0x3f0
[   45.486733]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   45.486756]  kthread+0x328/0x630
[   45.486775]  ret_from_fork+0x10/0x20
[   45.486841] 
[   45.561806] Allocated by task 297:
[   45.565266]  kasan_save_stack+0x3c/0x68
[   45.569173]  kasan_save_track+0x20/0x40
[   45.573081]  kasan_save_alloc_info+0x40/0x58
[   45.577426]  __kasan_slab_alloc+0xa8/0xb0
[   45.581508]  kmem_cache_alloc_noprof+0x10c/0x398
[   45.586203]  kmem_cache_invalid_free+0x12c/0x3c8
[   45.590899]  kunit_try_run_case+0x170/0x3f0
[   45.595164]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   45.600738]  kthread+0x328/0x630
[   45.604027]  ret_from_fork+0x10/0x20
[   45.607669] 
[   45.609204] The buggy address belongs to the object at ffff000096cb2000
[   45.609204]  which belongs to the cache test_cache of size 200
[   45.621782] The buggy address is located 1 bytes inside of
[   45.621782]  200-byte region [ffff000096cb2000, ffff000096cb20c8)
[   45.633484] 
[   45.635019] The buggy address belongs to the physical page:
[   45.640673] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x116cb2
[   45.648787] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   45.656545] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   45.663610] page_type: f5(slab)
[   45.666819] raw: 0bfffe0000000040 ffff000096cae140 dead000000000122 0000000000000000
[   45.674662] raw: 0000000000000000 00000000801f001f 00000000f5000000 0000000000000000
[   45.682507] head: 0bfffe0000000040 ffff000096cae140 dead000000000122 0000000000000000
[   45.690448] head: 0000000000000000 00000000801f001f 00000000f5000000 0000000000000000
[   45.698378] head: 0bfffe0000000001 fffffdffc25b2c81 00000000ffffffff 00000000ffffffff
[   45.706309] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   45.714243] page dumped because: kasan: bad access detected
[   45.719890] 
[   45.721423] Memory state around the buggy address:
[   45.726291]  ffff000096cb1f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   45.733612]  ffff000096cb1f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   45.740937] >ffff000096cb2000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   45.748255]                    ^
[   45.751537]  ffff000096cb2080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   45.758857]  ffff000096cb2100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   45.766179] ==================================================================

[   27.793459] ==================================================================
[   27.793525] BUG: KASAN: invalid-free in kmem_cache_invalid_free+0x184/0x3c8
[   27.793589] Free of addr fff00000c5766001 by task kunit_try_catch/223
[   27.793631] 
[   27.793668] CPU: 0 UID: 0 PID: 223 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc3-next-20250626 #1 PREEMPT 
[   27.793757] Tainted: [B]=BAD_PAGE, [N]=TEST
[   27.793813] Hardware name: linux,dummy-virt (DT)
[   27.793847] Call trace:
[   27.793885]  show_stack+0x20/0x38 (C)
[   27.793939]  dump_stack_lvl+0x8c/0xd0
[   27.793990]  print_report+0x118/0x608
[   27.794038]  kasan_report_invalid_free+0xc0/0xe8
[   27.794101]  check_slab_allocation+0xfc/0x108
[   27.794148]  __kasan_slab_pre_free+0x2c/0x48
[   27.794665]  kmem_cache_free+0xf0/0x468
[   27.794752]  kmem_cache_invalid_free+0x184/0x3c8
[   27.794828]  kunit_try_run_case+0x170/0x3f0
[   27.794883]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   27.794938]  kthread+0x328/0x630
[   27.794982]  ret_from_fork+0x10/0x20
[   27.795048] 
[   27.795099] Allocated by task 223:
[   27.795156]  kasan_save_stack+0x3c/0x68
[   27.795199]  kasan_save_track+0x20/0x40
[   27.795236]  kasan_save_alloc_info+0x40/0x58
[   27.795438]  __kasan_slab_alloc+0xa8/0xb0
[   27.795490]  kmem_cache_alloc_noprof+0x10c/0x398
[   27.795534]  kmem_cache_invalid_free+0x12c/0x3c8
[   27.795627]  kunit_try_run_case+0x170/0x3f0
[   27.795670]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   27.795719]  kthread+0x328/0x630
[   27.795753]  ret_from_fork+0x10/0x20
[   27.795855] 
[   27.795875] The buggy address belongs to the object at fff00000c5766000
[   27.795875]  which belongs to the cache test_cache of size 200
[   27.795934] The buggy address is located 1 bytes inside of
[   27.795934]  200-byte region [fff00000c5766000, fff00000c57660c8)
[   27.795994] 
[   27.796015] The buggy address belongs to the physical page:
[   27.796047] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105766
[   27.796114] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   27.796430] page_type: f5(slab)
[   27.796491] raw: 0bfffe0000000000 fff00000c56d4500 dead000000000122 0000000000000000
[   27.796598] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   27.796660] page dumped because: kasan: bad access detected
[   27.796747] 
[   27.796764] Memory state around the buggy address:
[   27.796827]  fff00000c5765f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.797174]  fff00000c5765f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.797220] >fff00000c5766000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   27.797550]                    ^
[   27.797628]  fff00000c5766080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   27.797796]  fff00000c5766100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.797920] ==================================================================

[   22.844280] ==================================================================
[   22.844734] BUG: KASAN: invalid-free in kmem_cache_invalid_free+0x1d8/0x460
[   22.845853] Free of addr ffff8881024dc001 by task kunit_try_catch/240
[   22.846295] 
[   22.846529] CPU: 0 UID: 0 PID: 240 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc3-next-20250626 #1 PREEMPT(voluntary) 
[   22.846610] Tainted: [B]=BAD_PAGE, [N]=TEST
[   22.846623] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   22.846669] Call Trace:
[   22.846683]  <TASK>
[   22.846705]  dump_stack_lvl+0x73/0xb0
[   22.846753]  print_report+0xd1/0x650
[   22.846776]  ? __virt_addr_valid+0x1db/0x2d0
[   22.846921]  ? kasan_complete_mode_report_info+0x2a/0x200
[   22.846951]  ? kmem_cache_invalid_free+0x1d8/0x460
[   22.846975]  kasan_report_invalid_free+0x10a/0x130
[   22.847000]  ? kmem_cache_invalid_free+0x1d8/0x460
[   22.847025]  ? kmem_cache_invalid_free+0x1d8/0x460
[   22.847054]  check_slab_allocation+0x11f/0x130
[   22.847076]  __kasan_slab_pre_free+0x28/0x40
[   22.847096]  kmem_cache_free+0xed/0x420
[   22.847120]  ? kmem_cache_alloc_noprof+0x123/0x3f0
[   22.847143]  ? kmem_cache_invalid_free+0x1d8/0x460
[   22.847168]  kmem_cache_invalid_free+0x1d8/0x460
[   22.847192]  ? __pfx_kmem_cache_invalid_free+0x10/0x10
[   22.847214]  ? finish_task_switch.isra.0+0x153/0x700
[   22.847247]  ? __switch_to+0x47/0xf50
[   22.847276]  ? __pfx_read_tsc+0x10/0x10
[   22.847298]  ? ktime_get_ts64+0x86/0x230
[   22.847323]  kunit_try_run_case+0x1a5/0x480
[   22.847350]  ? __pfx_kunit_try_run_case+0x10/0x10
[   22.847372]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   22.847398]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   22.847423]  ? __kthread_parkme+0x82/0x180
[   22.847443]  ? preempt_count_sub+0x50/0x80
[   22.847465]  ? __pfx_kunit_try_run_case+0x10/0x10
[   22.847488]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   22.847511]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   22.847534]  kthread+0x337/0x6f0
[   22.847553]  ? trace_preempt_on+0x20/0xc0
[   22.847577]  ? __pfx_kthread+0x10/0x10
[   22.847596]  ? _raw_spin_unlock_irq+0x47/0x80
[   22.847619]  ? calculate_sigpending+0x7b/0xa0
[   22.847643]  ? __pfx_kthread+0x10/0x10
[   22.847664]  ret_from_fork+0x116/0x1d0
[   22.847683]  ? __pfx_kthread+0x10/0x10
[   22.847702]  ret_from_fork_asm+0x1a/0x30
[   22.847734]  </TASK>
[   22.847746] 
[   22.859720] Allocated by task 240:
[   22.859981]  kasan_save_stack+0x45/0x70
[   22.860182]  kasan_save_track+0x18/0x40
[   22.860322]  kasan_save_alloc_info+0x3b/0x50
[   22.860468]  __kasan_slab_alloc+0x91/0xa0
[   22.860663]  kmem_cache_alloc_noprof+0x123/0x3f0
[   22.861173]  kmem_cache_invalid_free+0x157/0x460
[   22.861544]  kunit_try_run_case+0x1a5/0x480
[   22.861863]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   22.862144]  kthread+0x337/0x6f0
[   22.862345]  ret_from_fork+0x116/0x1d0
[   22.862476]  ret_from_fork_asm+0x1a/0x30
[   22.862611] 
[   22.862678] The buggy address belongs to the object at ffff8881024dc000
[   22.862678]  which belongs to the cache test_cache of size 200
[   22.863658] The buggy address is located 1 bytes inside of
[   22.863658]  200-byte region [ffff8881024dc000, ffff8881024dc0c8)
[   22.864921] 
[   22.865056] The buggy address belongs to the physical page:
[   22.865682] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1024dc
[   22.866194] flags: 0x200000000000000(node=0|zone=2)
[   22.866417] page_type: f5(slab)
[   22.866576] raw: 0200000000000000 ffff8881011063c0 dead000000000122 0000000000000000
[   22.867686] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   22.868302] page dumped because: kasan: bad access detected
[   22.868754] 
[   22.869021] Memory state around the buggy address:
[   22.869448]  ffff8881024dbf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.869750]  ffff8881024dbf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.870467] >ffff8881024dc000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   22.870761]                    ^
[   22.871315]  ffff8881024dc080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   22.872032]  ffff8881024dc100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.872383] ==================================================================