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

Environment
qemu-arm64
qemu-x86_64

[   17.829711] ==================================================================
[   17.829835] BUG: KASAN: invalid-free in kfree+0x270/0x3c8
[   17.829992] Free of addr fff00000c64bc001 by task kunit_try_catch/150
[   17.830044] 
[   17.830134] CPU: 0 UID: 0 PID: 150 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   17.830637] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.830765] Hardware name: linux,dummy-virt (DT)
[   17.830801] Call trace:
[   17.830949]  show_stack+0x20/0x38 (C)
[   17.831152]  dump_stack_lvl+0x8c/0xd0
[   17.831219]  print_report+0x118/0x608
[   17.831266]  kasan_report_invalid_free+0xc0/0xe8
[   17.831475]  __kasan_kfree_large+0x5c/0xa8
[   17.831547]  free_large_kmalloc+0x64/0x190
[   17.831717]  kfree+0x270/0x3c8
[   17.831850]  kmalloc_large_invalid_free+0x108/0x270
[   17.831962]  kunit_try_run_case+0x170/0x3f0
[   17.832139]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.832361]  kthread+0x328/0x630
[   17.832416]  ret_from_fork+0x10/0x20
[   17.832476] 
[   17.832498] The buggy address belongs to the physical page:
[   17.832560] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1064bc
[   17.832612] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   17.832656] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   17.832707] page_type: f8(unknown)
[   17.832752] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   17.832799] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   17.832858] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   17.832904] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   17.832951] head: 0bfffe0000000002 ffffc1ffc3192f01 00000000ffffffff 00000000ffffffff
[   17.832996] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   17.833033] page dumped because: kasan: bad access detected
[   17.833073] 
[   17.833100] Memory state around the buggy address:
[   17.833131]  fff00000c64bbf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.833171]  fff00000c64bbf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.833212] >fff00000c64bc000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   17.833263]                    ^
[   17.833290]  fff00000c64bc080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   17.833339]  fff00000c64bc100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   17.833408] ==================================================================

[   11.388570] ==================================================================
[   11.390051] BUG: KASAN: invalid-free in kfree+0x274/0x3f0
[   11.390863] Free of addr ffff888102a44001 by task kunit_try_catch/167
[   11.391764] 
[   11.392110] CPU: 0 UID: 0 PID: 167 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   11.392166] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.392178] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.392208] Call Trace:
[   11.392234]  <TASK>
[   11.392254]  dump_stack_lvl+0x73/0xb0
[   11.392294]  print_report+0xd1/0x650
[   11.392317]  ? __virt_addr_valid+0x1db/0x2d0
[   11.392340]  ? kasan_addr_to_slab+0x11/0xa0
[   11.392360]  ? kfree+0x274/0x3f0
[   11.392382]  kasan_report_invalid_free+0x10a/0x130
[   11.392404]  ? kfree+0x274/0x3f0
[   11.392426]  ? kfree+0x274/0x3f0
[   11.392445]  __kasan_kfree_large+0x86/0xd0
[   11.392465]  free_large_kmalloc+0x4b/0x110
[   11.392487]  kfree+0x274/0x3f0
[   11.392510]  kmalloc_large_invalid_free+0x120/0x2b0
[   11.392532]  ? __pfx_kmalloc_large_invalid_free+0x10/0x10
[   11.392554]  ? __schedule+0x10cc/0x2b60
[   11.392575]  ? __pfx_read_tsc+0x10/0x10
[   11.392595]  ? ktime_get_ts64+0x86/0x230
[   11.392619]  kunit_try_run_case+0x1a5/0x480
[   11.392643]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.392664]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.392686]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.392708]  ? __kthread_parkme+0x82/0x180
[   11.392727]  ? preempt_count_sub+0x50/0x80
[   11.392750]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.392771]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.392801]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.392822]  kthread+0x337/0x6f0
[   11.392840]  ? trace_preempt_on+0x20/0xc0
[   11.392863]  ? __pfx_kthread+0x10/0x10
[   11.392881]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.392902]  ? calculate_sigpending+0x7b/0xa0
[   11.392924]  ? __pfx_kthread+0x10/0x10
[   11.392944]  ret_from_fork+0x116/0x1d0
[   11.392961]  ? __pfx_kthread+0x10/0x10
[   11.392979]  ret_from_fork_asm+0x1a/0x30
[   11.393009]  </TASK>
[   11.393020] 
[   11.408643] The buggy address belongs to the physical page:
[   11.408916] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a44
[   11.409397] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   11.410134] flags: 0x200000000000040(head|node=0|zone=2)
[   11.410510] page_type: f8(unknown)
[   11.411290] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   11.411797] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   11.412160] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   11.412576] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   11.413250] head: 0200000000000002 ffffea00040a9101 00000000ffffffff 00000000ffffffff
[   11.413625] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   11.413952] page dumped because: kasan: bad access detected
[   11.414190] 
[   11.414610] Memory state around the buggy address:
[   11.414831]  ffff888102a43f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.415193]  ffff888102a43f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.415612] >ffff888102a44000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   11.415899]                    ^
[   11.416174]  ffff888102a44080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   11.416567]  ffff888102a44100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   11.417064] ==================================================================