Hay
Date
May 13, 2025, 12:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   19.057718] ==================================================================
[   19.057916] BUG: KASAN: invalid-free in kfree+0x270/0x3c8
[   19.058037] Free of addr fff00000c655c001 by task kunit_try_catch/150
[   19.058277] 
[   19.058335] CPU: 1 UID: 0 PID: 150 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc6-next-20250513 #1 PREEMPT 
[   19.058485] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.058530] Hardware name: linux,dummy-virt (DT)
[   19.058649] Call trace:
[   19.058693]  show_stack+0x20/0x38 (C)
[   19.058772]  dump_stack_lvl+0x8c/0xd0
[   19.058939]  print_report+0x118/0x608
[   19.059217]  kasan_report_invalid_free+0xc0/0xe8
[   19.059774]  __kasan_kfree_large+0x5c/0xa8
[   19.059856]  free_large_kmalloc+0x64/0x190
[   19.060173]  kfree+0x270/0x3c8
[   19.060591]  kmalloc_large_invalid_free+0x108/0x270
[   19.060687]  kunit_try_run_case+0x170/0x3f0
[   19.060951]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.061395]  kthread+0x328/0x630
[   19.061472]  ret_from_fork+0x10/0x20
[   19.061532] 
[   19.061682] The buggy address belongs to the physical page:
[   19.061743] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10655c
[   19.062067] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   19.062152] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   19.062307] page_type: f8(unknown)
[   19.062609] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   19.062676] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   19.062735] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   19.062789] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   19.062842] head: 0bfffe0000000002 ffffc1ffc3195701 00000000ffffffff 00000000ffffffff
[   19.062895] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   19.062938] page dumped because: kasan: bad access detected
[   19.062986] 
[   19.063008] Memory state around the buggy address:
[   19.063047]  fff00000c655bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.063091]  fff00000c655bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.063135] >fff00000c655c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   19.063172]                    ^
[   19.063203]  fff00000c655c080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   19.063244]  fff00000c655c100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   19.063305] ==================================================================

[   10.612330] ==================================================================
[   10.613026] BUG: KASAN: invalid-free in kfree+0x274/0x3f0
[   10.613982] Free of addr ffff888102aa0001 by task kunit_try_catch/167
[   10.614323] 
[   10.614418] CPU: 1 UID: 0 PID: 167 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc6-next-20250513 #1 PREEMPT(voluntary) 
[   10.614466] Tainted: [B]=BAD_PAGE, [N]=TEST
[   10.614477] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   10.614498] Call Trace:
[   10.614510]  <TASK>
[   10.614524]  dump_stack_lvl+0x73/0xb0
[   10.614579]  print_report+0xd1/0x650
[   10.614680]  ? __virt_addr_valid+0x1db/0x2d0
[   10.614709]  ? kasan_addr_to_slab+0x11/0xa0
[   10.614730]  ? kfree+0x274/0x3f0
[   10.614748]  kasan_report_invalid_free+0x10a/0x130
[   10.614773]  ? kfree+0x274/0x3f0
[   10.614793]  ? kfree+0x274/0x3f0
[   10.614810]  __kasan_kfree_large+0x86/0xd0
[   10.614831]  free_large_kmalloc+0x4b/0x110
[   10.614856]  kfree+0x274/0x3f0
[   10.614878]  kmalloc_large_invalid_free+0x120/0x2b0
[   10.614900]  ? __pfx_kmalloc_large_invalid_free+0x10/0x10
[   10.614925]  ? __schedule+0x10cc/0x2b60
[   10.614946]  ? __pfx_read_tsc+0x10/0x10
[   10.614967]  ? ktime_get_ts64+0x86/0x230
[   10.614990]  kunit_try_run_case+0x1a5/0x480
[   10.615013]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.615035]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   10.615056]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   10.615078]  ? __kthread_parkme+0x82/0x180
[   10.615097]  ? preempt_count_sub+0x50/0x80
[   10.615121]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.615144]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.615166]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   10.615198]  kthread+0x337/0x6f0
[   10.615218]  ? trace_preempt_on+0x20/0xc0
[   10.615241]  ? __pfx_kthread+0x10/0x10
[   10.615262]  ? _raw_spin_unlock_irq+0x47/0x80
[   10.615282]  ? calculate_sigpending+0x7b/0xa0
[   10.615304]  ? __pfx_kthread+0x10/0x10
[   10.615326]  ret_from_fork+0x116/0x1d0
[   10.615343]  ? __pfx_kthread+0x10/0x10
[   10.615364]  ret_from_fork_asm+0x1a/0x30
[   10.615394]  </TASK>
[   10.615404] 
[   10.624734] The buggy address belongs to the physical page:
[   10.625050] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102aa0
[   10.625449] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   10.625913] flags: 0x200000000000040(head|node=0|zone=2)
[   10.626354] page_type: f8(unknown)
[   10.626543] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   10.627113] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   10.627472] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   10.627934] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   10.628322] head: 0200000000000002 ffffea00040aa801 00000000ffffffff 00000000ffffffff
[   10.628786] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   10.629100] page dumped because: kasan: bad access detected
[   10.629379] 
[   10.629497] Memory state around the buggy address:
[   10.629744]  ffff888102a9ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.630373]  ffff888102a9ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.630842] >ffff888102aa0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   10.631148]                    ^
[   10.631340]  ffff888102aa0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   10.631641]  ffff888102aa0100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   10.632032] ==================================================================