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

Environment
dragonboard-845c
qemu-arm64
qemu-x86_64

[   33.450870] ==================================================================
[   33.461993] BUG: KASAN: invalid-free in kfree+0x270/0x3c8
[   33.467477] Free of addr ffff000096d0c001 by task kunit_try_catch/259
[   33.474005] 
[   33.475540] CPU: 5 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4-next-20250703 #1 PREEMPT 
[   33.475571] Tainted: [B]=BAD_PAGE, [N]=TEST
[   33.475579] Hardware name: Thundercomm Dragonboard 845c (DT)
[   33.475590] Call trace:
[   33.475596]  show_stack+0x20/0x38 (C)
[   33.475613]  dump_stack_lvl+0x8c/0xd0
[   33.475634]  print_report+0x118/0x608
[   33.475652]  kasan_report_invalid_free+0xc0/0xe8
[   33.475671]  __kasan_kfree_large+0x5c/0xa8
[   33.475691]  free_large_kmalloc+0x68/0x150
[   33.475707]  kfree+0x270/0x3c8
[   33.475723]  kmalloc_large_invalid_free+0x108/0x270
[   33.475739]  kunit_try_run_case+0x170/0x3f0
[   33.475756]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.475776]  kthread+0x328/0x630
[   33.475788]  ret_from_fork+0x10/0x20
[   33.475805] 
[   33.549757] The buggy address belongs to the physical page:
[   33.555396] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x116d0c
[   33.563494] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   33.571246] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   33.578294] page_type: f8(unknown)
[   33.581754] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   33.589595] raw: 0000000000000000 0000000000000000 00000000f8000000 0000000000000000
[   33.597434] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   33.605359] head: 0000000000000000 0000000000000000 00000000f8000000 0000000000000000
[   33.613284] head: 0bfffe0000000002 fffffdffc25b4301 00000000ffffffff 00000000ffffffff
[   33.621211] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   33.629129] page dumped because: kasan: bad access detected
[   33.634772] 
[   33.636301] Memory state around the buggy address:
[   33.641154]  ffff000096d0bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   33.648468]  ffff000096d0bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   33.655784] >ffff000096d0c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   33.663091]                    ^
[   33.666373]  ffff000096d0c080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   33.673687]  ffff000096d0c100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   33.681000] ==================================================================

[   30.789541] ==================================================================
[   30.789633] BUG: KASAN: invalid-free in kfree+0x270/0x3c8
[   30.789702] Free of addr fff00000c9bc0001 by task kunit_try_catch/182
[   30.789748] 
[   30.790125] CPU: 0 UID: 0 PID: 182 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4-next-20250703 #1 PREEMPT 
[   30.790334] Tainted: [B]=BAD_PAGE, [N]=TEST
[   30.790375] Hardware name: linux,dummy-virt (DT)
[   30.790471] Call trace:
[   30.790496]  show_stack+0x20/0x38 (C)
[   30.790817]  dump_stack_lvl+0x8c/0xd0
[   30.791061]  print_report+0x118/0x608
[   30.791194]  kasan_report_invalid_free+0xc0/0xe8
[   30.791297]  __kasan_kfree_large+0x5c/0xa8
[   30.791414]  free_large_kmalloc+0x68/0x150
[   30.791538]  kfree+0x270/0x3c8
[   30.791587]  kmalloc_large_invalid_free+0x108/0x270
[   30.791643]  kunit_try_run_case+0x170/0x3f0
[   30.791855]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.792163]  kthread+0x328/0x630
[   30.792225]  ret_from_fork+0x10/0x20
[   30.792361] 
[   30.792391] The buggy address belongs to the physical page:
[   30.792451] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109bc0
[   30.792689] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   30.792766] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   30.793030] page_type: f8(unknown)
[   30.793293] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   30.793431] raw: 0000000000000000 0000000000000000 00000000f8000000 0000000000000000
[   30.793559] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   30.793691] head: 0000000000000000 0000000000000000 00000000f8000000 0000000000000000
[   30.793740] head: 0bfffe0000000002 ffffc1ffc326f001 00000000ffffffff 00000000ffffffff
[   30.794063] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   30.794339] page dumped because: kasan: bad access detected
[   30.794484] 
[   30.794520] Memory state around the buggy address:
[   30.794623]  fff00000c9bbff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.794704]  fff00000c9bbff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.794814] >fff00000c9bc0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   30.795010]                    ^
[   30.795183]  fff00000c9bc0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   30.795253]  fff00000c9bc0100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   30.795322] ==================================================================

[   22.691082] ==================================================================
[   22.691792] BUG: KASAN: invalid-free in kfree+0x274/0x3f0
[   22.692044] Free of addr ffff888105740001 by task kunit_try_catch/199
[   22.692301] 
[   22.692636] CPU: 0 UID: 0 PID: 199 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4-next-20250703 #1 PREEMPT(voluntary) 
[   22.692686] Tainted: [B]=BAD_PAGE, [N]=TEST
[   22.692699] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   22.692719] Call Trace:
[   22.692730]  <TASK>
[   22.692746]  dump_stack_lvl+0x73/0xb0
[   22.692774]  print_report+0xd1/0x650
[   22.692797]  ? __virt_addr_valid+0x1db/0x2d0
[   22.692820]  ? kasan_addr_to_slab+0x11/0xa0
[   22.692843]  ? kfree+0x274/0x3f0
[   22.692865]  kasan_report_invalid_free+0x10a/0x130
[   22.692888]  ? kfree+0x274/0x3f0
[   22.692910]  ? kfree+0x274/0x3f0
[   22.692930]  __kasan_kfree_large+0x86/0xd0
[   22.692951]  free_large_kmalloc+0x52/0x110
[   22.692974]  kfree+0x274/0x3f0
[   22.692999]  kmalloc_large_invalid_free+0x120/0x2b0
[   22.693021]  ? __pfx_kmalloc_large_invalid_free+0x10/0x10
[   22.693044]  ? __schedule+0x10cc/0x2b60
[   22.693069]  ? __pfx_read_tsc+0x10/0x10
[   22.693089]  ? ktime_get_ts64+0x86/0x230
[   22.693113]  kunit_try_run_case+0x1a5/0x480
[   22.693138]  ? __pfx_kunit_try_run_case+0x10/0x10
[   22.693160]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   22.693182]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   22.693219]  ? __kthread_parkme+0x82/0x180
[   22.693239]  ? preempt_count_sub+0x50/0x80
[   22.693261]  ? __pfx_kunit_try_run_case+0x10/0x10
[   22.693286]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   22.693310]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   22.693334]  kthread+0x337/0x6f0
[   22.693353]  ? trace_preempt_on+0x20/0xc0
[   22.693376]  ? __pfx_kthread+0x10/0x10
[   22.693396]  ? _raw_spin_unlock_irq+0x47/0x80
[   22.693419]  ? calculate_sigpending+0x7b/0xa0
[   22.693443]  ? __pfx_kthread+0x10/0x10
[   22.693478]  ret_from_fork+0x116/0x1d0
[   22.693497]  ? __pfx_kthread+0x10/0x10
[   22.693517]  ret_from_fork_asm+0x1a/0x30
[   22.693548]  </TASK>
[   22.693559] 
[   22.701095] The buggy address belongs to the physical page:
[   22.701356] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105740
[   22.701684] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   22.701988] flags: 0x200000000000040(head|node=0|zone=2)
[   22.702223] page_type: f8(unknown)
[   22.702422] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   22.702682] raw: 0000000000000000 0000000000000000 00000000f8000000 0000000000000000
[   22.702904] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   22.703190] head: 0000000000000000 0000000000000000 00000000f8000000 0000000000000000
[   22.703550] head: 0200000000000002 ffffea000415d001 00000000ffffffff 00000000ffffffff
[   22.703849] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   22.704071] page dumped because: kasan: bad access detected
[   22.704235] 
[   22.704300] Memory state around the buggy address:
[   22.704528]  ffff88810573ff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   22.704875]  ffff88810573ff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   22.705362] >ffff888105740000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   22.705742]                    ^
[   22.705989]  ffff888105740080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   22.706332]  ffff888105740100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   22.706622] ==================================================================