Hay
Date
June 2, 2025, 2:13 p.m.

Environment
qemu-arm64
qemu-x86_64

[   18.058571] ==================================================================
[   18.059625] BUG: KASAN: invalid-free in kfree+0x270/0x3c8
[   18.059992] Free of addr fff00000c6068001 by task kunit_try_catch/140
[   18.060390] 
[   18.060586] CPU: 0 UID: 0 PID: 140 Comm: kunit_try_catch Tainted: G    B            N 6.14.10-rc1 #1
[   18.060676] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.060704] Hardware name: linux,dummy-virt (DT)
[   18.060740] Call trace:
[   18.060764]  show_stack+0x20/0x38 (C)
[   18.060822]  dump_stack_lvl+0x8c/0xd0
[   18.060875]  print_report+0x118/0x608
[   18.060926]  kasan_report_invalid_free+0xc0/0xe8
[   18.060979]  __kasan_kfree_large+0x5c/0xa8
[   18.061028]  free_large_kmalloc+0x58/0x140
[   18.061077]  kfree+0x270/0x3c8
[   18.061122]  kmalloc_large_invalid_free+0x108/0x270
[   18.061223]  kunit_try_run_case+0x170/0x3f0
[   18.061354]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.061520]  kthread+0x318/0x620
[   18.061772]  ret_from_fork+0x10/0x20
[   18.061904] 
[   18.066626] The buggy address belongs to the physical page:
[   18.066906] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106068
[   18.067752] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   18.068237] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   18.068607] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   18.068954] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   18.069812] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   18.070307] head: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   18.070637] head: 0bfffe0000000002 ffffc1ffc3181a01 ffffffffffffffff 0000000000000000
[   18.070965] head: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000
[   18.071722] page dumped because: kasan: bad access detected
[   18.072344] 
[   18.072495] Memory state around the buggy address:
[   18.072735]  fff00000c6067f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.073052]  fff00000c6067f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.073372] >fff00000c6068000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   18.073693]                    ^
[   18.073893]  fff00000c6068080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   18.074878]  fff00000c6068100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   18.075635] ==================================================================

[   12.265870] ==================================================================
[   12.266407] BUG: KASAN: invalid-free in kfree+0x276/0x3f0
[   12.266836] Free of addr ffff888102ac4001 by task kunit_try_catch/158
[   12.267119] 
[   12.267239] CPU: 0 UID: 0 PID: 158 Comm: kunit_try_catch Tainted: G    B            N 6.14.10-rc1 #1
[   12.267276] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.267289] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.267308] Call Trace:
[   12.267319]  <TASK>
[   12.267332]  dump_stack_lvl+0x73/0xb0
[   12.267370]  print_report+0xd1/0x650
[   12.267394]  ? __virt_addr_valid+0x1db/0x2d0
[   12.267419]  ? kasan_addr_to_slab+0x11/0xa0
[   12.267452]  ? kfree+0x276/0x3f0
[   12.267475]  kasan_report_invalid_free+0xfc/0x120
[   12.267501]  ? kfree+0x276/0x3f0
[   12.267527]  ? kfree+0x276/0x3f0
[   12.267558]  __kasan_kfree_large+0x86/0xd0
[   12.267646]  free_large_kmalloc+0x3b/0xd0
[   12.267674]  kfree+0x276/0x3f0
[   12.267701]  kmalloc_large_invalid_free+0x121/0x2b0
[   12.267725]  ? __pfx_kmalloc_large_invalid_free+0x10/0x10
[   12.267759]  ? __schedule+0xce8/0x2840
[   12.267785]  ? __pfx_read_tsc+0x10/0x10
[   12.267809]  ? ktime_get_ts64+0x86/0x230
[   12.267846]  kunit_try_run_case+0x1a6/0x480
[   12.267872]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.267895]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   12.267929]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.267955]  ? __kthread_parkme+0x82/0x160
[   12.267979]  ? preempt_count_sub+0x50/0x80
[   12.268027]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.268052]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.268081]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.268109]  kthread+0x324/0x6e0
[   12.268132]  ? trace_preempt_on+0x20/0xc0
[   12.268158]  ? __pfx_kthread+0x10/0x10
[   12.268183]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.268208]  ? calculate_sigpending+0x7b/0xa0
[   12.268232]  ? __pfx_kthread+0x10/0x10
[   12.268257]  ret_from_fork+0x41/0x80
[   12.268278]  ? __pfx_kthread+0x10/0x10
[   12.268302]  ret_from_fork_asm+0x1a/0x30
[   12.268336]  </TASK>
[   12.268347] 
[   12.276206] The buggy address belongs to the physical page:
[   12.276490] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102ac4
[   12.276891] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   12.277272] flags: 0x200000000000040(head|node=0|zone=2)
[   12.277528] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   12.278158] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   12.278486] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   12.279115] head: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   12.279434] head: 0200000000000002 ffffea00040ab101 ffffffffffffffff 0000000000000000
[   12.279820] head: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000
[   12.280160] page dumped because: kasan: bad access detected
[   12.280397] 
[   12.280469] Memory state around the buggy address:
[   12.280626]  ffff888102ac3f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.281034]  ffff888102ac3f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.281325] >ffff888102ac4000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.281848]                    ^
[   12.281987]  ffff888102ac4080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.282218]  ffff888102ac4100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.282575] ==================================================================