Hay
Date
July 5, 2025, 11:11 p.m.

Environment
qemu-arm64
qemu-x86_64

[   17.893967] ==================================================================
[   17.894048] BUG: KASAN: invalid-free in kfree+0x270/0x3c8
[   17.894105] Free of addr fff00000c782c001 by task kunit_try_catch/150
[   17.894147] 
[   17.894239] CPU: 0 UID: 0 PID: 150 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   17.894341] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.894376] Hardware name: linux,dummy-virt (DT)
[   17.894405] Call trace:
[   17.894427]  show_stack+0x20/0x38 (C)
[   17.894495]  dump_stack_lvl+0x8c/0xd0
[   17.894539]  print_report+0x118/0x608
[   17.894759]  kasan_report_invalid_free+0xc0/0xe8
[   17.894838]  __kasan_kfree_large+0x5c/0xa8
[   17.894932]  free_large_kmalloc+0x64/0x190
[   17.894982]  kfree+0x270/0x3c8
[   17.895023]  kmalloc_large_invalid_free+0x108/0x270
[   17.895087]  kunit_try_run_case+0x170/0x3f0
[   17.895132]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.895194]  kthread+0x328/0x630
[   17.895233]  ret_from_fork+0x10/0x20
[   17.895339] 
[   17.895361] The buggy address belongs to the physical page:
[   17.895391] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10782c
[   17.895796] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   17.895858] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   17.896113] page_type: f8(unknown)
[   17.896245] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   17.896360] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   17.896536] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   17.896601] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   17.896667] head: 0bfffe0000000002 ffffc1ffc31e0b01 00000000ffffffff 00000000ffffffff
[   17.896745] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   17.896783] page dumped because: kasan: bad access detected
[   17.896813] 
[   17.897083] Memory state around the buggy address:
[   17.897135]  fff00000c782bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.897302]  fff00000c782bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.897446] >fff00000c782c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   17.897576]                    ^
[   17.897634]  fff00000c782c080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   17.897765]  fff00000c782c100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   17.897873] ==================================================================

[   12.993292] ==================================================================
[   12.994095] BUG: KASAN: invalid-free in kfree+0x274/0x3f0
[   12.994372] Free of addr ffff888102afc001 by task kunit_try_catch/168
[   12.994626] 
[   12.994804] CPU: 0 UID: 0 PID: 168 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   12.994865] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.994878] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.994904] Call Trace:
[   12.994922]  <TASK>
[   12.994946]  dump_stack_lvl+0x73/0xb0
[   12.994984]  print_report+0xd1/0x650
[   12.995011]  ? __virt_addr_valid+0x1db/0x2d0
[   12.995041]  ? kasan_addr_to_slab+0x11/0xa0
[   12.995064]  ? kfree+0x274/0x3f0
[   12.995089]  kasan_report_invalid_free+0x10a/0x130
[   12.995116]  ? kfree+0x274/0x3f0
[   12.995593]  ? kfree+0x274/0x3f0
[   12.995631]  __kasan_kfree_large+0x86/0xd0
[   12.995659]  free_large_kmalloc+0x4b/0x110
[   12.995687]  kfree+0x274/0x3f0
[   12.995716]  kmalloc_large_invalid_free+0x120/0x2b0
[   12.995744]  ? __pfx_kmalloc_large_invalid_free+0x10/0x10
[   12.995770]  ? __schedule+0x10cc/0x2b60
[   12.995812]  ? __pfx_read_tsc+0x10/0x10
[   12.995838]  ? ktime_get_ts64+0x86/0x230
[   12.995867]  kunit_try_run_case+0x1a5/0x480
[   12.995897]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.995922]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.995949]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.995974]  ? __kthread_parkme+0x82/0x180
[   12.995998]  ? preempt_count_sub+0x50/0x80
[   12.996026]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.996053]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.996078]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.996104]  kthread+0x337/0x6f0
[   12.996127]  ? trace_preempt_on+0x20/0xc0
[   12.996156]  ? __pfx_kthread+0x10/0x10
[   12.996180]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.996203]  ? calculate_sigpending+0x7b/0xa0
[   12.996232]  ? __pfx_kthread+0x10/0x10
[   12.996256]  ret_from_fork+0x116/0x1d0
[   12.996277]  ? __pfx_kthread+0x10/0x10
[   12.996300]  ret_from_fork_asm+0x1a/0x30
[   12.996336]  </TASK>
[   12.996350] 
[   13.010160] The buggy address belongs to the physical page:
[   13.010813] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102afc
[   13.011714] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   13.012328] flags: 0x200000000000040(head|node=0|zone=2)
[   13.012837] page_type: f8(unknown)
[   13.013046] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   13.013837] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   13.014372] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   13.014747] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   13.015346] head: 0200000000000002 ffffea00040abf01 00000000ffffffff 00000000ffffffff
[   13.015954] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   13.016879] page dumped because: kasan: bad access detected
[   13.017495] 
[   13.017588] Memory state around the buggy address:
[   13.018011]  ffff888102afbf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.018841]  ffff888102afbf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.019955] >ffff888102afc000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   13.020531]                    ^
[   13.020716]  ffff888102afc080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   13.021077]  ffff888102afc100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   13.021905] ==================================================================