Hay
Date
July 3, 2025, 10:10 a.m.

Environment
dragonboard-845c
qemu-arm64
qemu-x86_64

[   46.300749] ==================================================================
[   46.312428] BUG: KASAN: invalid-free in kmem_cache_invalid_free+0x184/0x3c8
[   46.319490] Free of addr ffff000095dfa001 by task kunit_try_catch/320
[   46.326016] 
[   46.327552] CPU: 4 UID: 0 PID: 320 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4-next-20250703 #1 PREEMPT 
[   46.327590] Tainted: [B]=BAD_PAGE, [N]=TEST
[   46.327601] Hardware name: Thundercomm Dragonboard 845c (DT)
[   46.327616] Call trace:
[   46.327625]  show_stack+0x20/0x38 (C)
[   46.327646]  dump_stack_lvl+0x8c/0xd0
[   46.327668]  print_report+0x118/0x608
[   46.327688]  kasan_report_invalid_free+0xc0/0xe8
[   46.327708]  check_slab_allocation+0xfc/0x108
[   46.327728]  __kasan_slab_pre_free+0x2c/0x48
[   46.327746]  kmem_cache_free+0xf0/0x468
[   46.327766]  kmem_cache_invalid_free+0x184/0x3c8
[   46.327783]  kunit_try_run_case+0x170/0x3f0
[   46.327805]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   46.327827]  kthread+0x328/0x630
[   46.327842]  ret_from_fork+0x10/0x20
[   46.327862] 
[   46.402805] Allocated by task 320:
[   46.406267]  kasan_save_stack+0x3c/0x68
[   46.410170]  kasan_save_track+0x20/0x40
[   46.414069]  kasan_save_alloc_info+0x40/0x58
[   46.418410]  __kasan_slab_alloc+0xa8/0xb0
[   46.422482]  kmem_cache_alloc_noprof+0x10c/0x398
[   46.427173]  kmem_cache_invalid_free+0x12c/0x3c8
[   46.431861]  kunit_try_run_case+0x170/0x3f0
[   46.436115]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   46.441677]  kthread+0x328/0x630
[   46.444964]  ret_from_fork+0x10/0x20
[   46.448600] 
[   46.450126] The buggy address belongs to the object at ffff000095dfa000
[   46.450126]  which belongs to the cache test_cache of size 200
[   46.462697] The buggy address is located 1 bytes inside of
[   46.462697]  200-byte region [ffff000095dfa000, ffff000095dfa0c8)
[   46.474391] 
[   46.475917] The buggy address belongs to the physical page:
[   46.481568] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x115dfa
[   46.489669] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   46.497420] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   46.504483] page_type: f5(slab)
[   46.507690] raw: 0bfffe0000000040 ffff000080f20b40 dead000000000122 0000000000000000
[   46.515530] raw: 0000000000000000 00000000801f001f 00000000f5000000 0000000000000000
[   46.523369] head: 0bfffe0000000040 ffff000080f20b40 dead000000000122 0000000000000000
[   46.531293] head: 0000000000000000 00000000801f001f 00000000f5000000 0000000000000000
[   46.539219] head: 0bfffe0000000001 fffffdffc2577e81 00000000ffffffff 00000000ffffffff
[   46.547144] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   46.555067] page dumped because: kasan: bad access detected
[   46.560718] 
[   46.562243] Memory state around the buggy address:
[   46.567102]  ffff000095df9f00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   46.574419]  ffff000095df9f80: fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc
[   46.581735] >ffff000095dfa000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   46.589048]                    ^
[   46.592334]  ffff000095dfa080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   46.599649]  ffff000095dfa100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   46.606962] ==================================================================

[   31.974413] ==================================================================
[   31.974735] BUG: KASAN: invalid-free in kmem_cache_invalid_free+0x184/0x3c8
[   31.974839] Free of addr fff00000c9aad001 by task kunit_try_catch/243
[   31.975266] 
[   31.975382] CPU: 0 UID: 0 PID: 243 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4-next-20250703 #1 PREEMPT 
[   31.975889] Tainted: [B]=BAD_PAGE, [N]=TEST
[   31.975919] Hardware name: linux,dummy-virt (DT)
[   31.976126] Call trace:
[   31.976242]  show_stack+0x20/0x38 (C)
[   31.976301]  dump_stack_lvl+0x8c/0xd0
[   31.976519]  print_report+0x118/0x608
[   31.976568]  kasan_report_invalid_free+0xc0/0xe8
[   31.977073]  check_slab_allocation+0xfc/0x108
[   31.977159]  __kasan_slab_pre_free+0x2c/0x48
[   31.977229]  kmem_cache_free+0xf0/0x468
[   31.977302]  kmem_cache_invalid_free+0x184/0x3c8
[   31.977800]  kunit_try_run_case+0x170/0x3f0
[   31.978126]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   31.978257]  kthread+0x328/0x630
[   31.978309]  ret_from_fork+0x10/0x20
[   31.978559] 
[   31.978579] Allocated by task 243:
[   31.978948]  kasan_save_stack+0x3c/0x68
[   31.979117]  kasan_save_track+0x20/0x40
[   31.979454]  kasan_save_alloc_info+0x40/0x58
[   31.979503]  __kasan_slab_alloc+0xa8/0xb0
[   31.979703]  kmem_cache_alloc_noprof+0x10c/0x398
[   31.979750]  kmem_cache_invalid_free+0x12c/0x3c8
[   31.979792]  kunit_try_run_case+0x170/0x3f0
[   31.980305]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   31.980403]  kthread+0x328/0x630
[   31.980461]  ret_from_fork+0x10/0x20
[   31.980675] 
[   31.980805] The buggy address belongs to the object at fff00000c9aad000
[   31.980805]  which belongs to the cache test_cache of size 200
[   31.980885] The buggy address is located 1 bytes inside of
[   31.980885]  200-byte region [fff00000c9aad000, fff00000c9aad0c8)
[   31.980953] 
[   31.981086] The buggy address belongs to the physical page:
[   31.981232] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109aad
[   31.981291] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   31.981912] page_type: f5(slab)
[   31.982311] raw: 0bfffe0000000000 fff00000c1c3cb40 dead000000000122 0000000000000000
[   31.982506] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   31.982768] page dumped because: kasan: bad access detected
[   31.982801] 
[   31.983075] Memory state around the buggy address:
[   31.983112]  fff00000c9aacf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   31.983327]  fff00000c9aacf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   31.983373] >fff00000c9aad000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   31.983412]                    ^
[   31.983439]  fff00000c9aad080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   31.984163]  fff00000c9aad100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   31.984236] ==================================================================

[   23.883072] ==================================================================
[   23.883785] BUG: KASAN: invalid-free in kmem_cache_invalid_free+0x1d8/0x460
[   23.884103] Free of addr ffff888105507001 by task kunit_try_catch/260
[   23.884591] 
[   23.884698] CPU: 1 UID: 0 PID: 260 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4-next-20250703 #1 PREEMPT(voluntary) 
[   23.884747] Tainted: [B]=BAD_PAGE, [N]=TEST
[   23.884760] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   23.884781] Call Trace:
[   23.884795]  <TASK>
[   23.884813]  dump_stack_lvl+0x73/0xb0
[   23.884843]  print_report+0xd1/0x650
[   23.884866]  ? __virt_addr_valid+0x1db/0x2d0
[   23.884890]  ? kasan_complete_mode_report_info+0x2a/0x200
[   23.884915]  ? kmem_cache_invalid_free+0x1d8/0x460
[   23.884939]  kasan_report_invalid_free+0x10a/0x130
[   23.884962]  ? kmem_cache_invalid_free+0x1d8/0x460
[   23.885103]  ? kmem_cache_invalid_free+0x1d8/0x460
[   23.885132]  check_slab_allocation+0x11f/0x130
[   23.885174]  __kasan_slab_pre_free+0x28/0x40
[   23.885194]  kmem_cache_free+0xed/0x420
[   23.885218]  ? kmem_cache_alloc_noprof+0x123/0x3f0
[   23.885358]  ? kmem_cache_invalid_free+0x1d8/0x460
[   23.885385]  kmem_cache_invalid_free+0x1d8/0x460
[   23.885409]  ? __pfx_kmem_cache_invalid_free+0x10/0x10
[   23.885433]  ? __kasan_check_write+0x18/0x20
[   23.885467]  ? queued_spin_lock_slowpath+0x116/0xb40
[   23.885489]  ? irqentry_exit+0x2a/0x60
[   23.885513]  ? trace_hardirqs_on+0x37/0xe0
[   23.885537]  ? __pfx_read_tsc+0x10/0x10
[   23.885559]  ? ktime_get_ts64+0x86/0x230
[   23.885583]  kunit_try_run_case+0x1a5/0x480
[   23.885609]  ? __pfx_kunit_try_run_case+0x10/0x10
[   23.885633]  ? queued_spin_lock_slowpath+0x116/0xb40
[   23.885654]  ? __kthread_parkme+0x82/0x180
[   23.885674]  ? preempt_count_sub+0x50/0x80
[   23.885697]  ? __pfx_kunit_try_run_case+0x10/0x10
[   23.885721]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   23.885744]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   23.885768]  kthread+0x337/0x6f0
[   23.885787]  ? trace_preempt_on+0x20/0xc0
[   23.885809]  ? __pfx_kthread+0x10/0x10
[   23.885829]  ? _raw_spin_unlock_irq+0x47/0x80
[   23.885856]  ? calculate_sigpending+0x7b/0xa0
[   23.885883]  ? __pfx_kthread+0x10/0x10
[   23.885905]  ret_from_fork+0x116/0x1d0
[   23.885924]  ? __pfx_kthread+0x10/0x10
[   23.885945]  ret_from_fork_asm+0x1a/0x30
[   23.885977]  </TASK>
[   23.885988] 
[   23.897504] Allocated by task 260:
[   23.897686]  kasan_save_stack+0x45/0x70
[   23.897881]  kasan_save_track+0x18/0x40
[   23.898057]  kasan_save_alloc_info+0x3b/0x50
[   23.898755]  __kasan_slab_alloc+0x91/0xa0
[   23.899137]  kmem_cache_alloc_noprof+0x123/0x3f0
[   23.899594]  kmem_cache_invalid_free+0x157/0x460
[   23.899931]  kunit_try_run_case+0x1a5/0x480
[   23.900231]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   23.900734]  kthread+0x337/0x6f0
[   23.901122]  ret_from_fork+0x116/0x1d0
[   23.901727]  ret_from_fork_asm+0x1a/0x30
[   23.901978] 
[   23.902233] The buggy address belongs to the object at ffff888105507000
[   23.902233]  which belongs to the cache test_cache of size 200
[   23.903022] The buggy address is located 1 bytes inside of
[   23.903022]  200-byte region [ffff888105507000, ffff8881055070c8)
[   23.903930] 
[   23.904033] The buggy address belongs to the physical page:
[   23.904655] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105507
[   23.905112] flags: 0x200000000000000(node=0|zone=2)
[   23.905537] page_type: f5(slab)
[   23.905703] raw: 0200000000000000 ffff888105505000 dead000000000122 0000000000000000
[   23.906019] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   23.907057] page dumped because: kasan: bad access detected
[   23.907452] 
[   23.907685] Memory state around the buggy address:
[   23.908133]  ffff888105506f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.908818]  ffff888105506f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.909118] >ffff888105507000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   23.909651]                    ^
[   23.909807]  ffff888105507080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   23.910097]  ffff888105507100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.910726] ==================================================================