Hay
Date
July 12, 2025, 11:09 p.m.

Environment
qemu-arm64
qemu-x86_64

[   16.509845] ==================================================================
[   16.509935] BUG: KASAN: invalid-free in kfree+0x270/0x3c8
[   16.509996] Free of addr fff00000c6654001 by task kunit_try_catch/150
[   16.510041] 
[   16.510071] CPU: 1 UID: 0 PID: 150 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   16.510820] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.511453] Hardware name: linux,dummy-virt (DT)
[   16.511491] Call trace:
[   16.511513]  show_stack+0x20/0x38 (C)
[   16.511894]  dump_stack_lvl+0x8c/0xd0
[   16.511957]  print_report+0x118/0x5d0
[   16.512011]  kasan_report_invalid_free+0xc0/0xe8
[   16.512163]  __kasan_kfree_large+0x5c/0xa8
[   16.512223]  free_large_kmalloc+0x64/0x190
[   16.512267]  kfree+0x270/0x3c8
[   16.512309]  kmalloc_large_invalid_free+0x108/0x270
[   16.512356]  kunit_try_run_case+0x170/0x3f0
[   16.512401]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.512451]  kthread+0x328/0x630
[   16.512740]  ret_from_fork+0x10/0x20
[   16.512811] 
[   16.512832] The buggy address belongs to the physical page:
[   16.512973] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106654
[   16.513043] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   16.513670] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   16.513736] page_type: f8(unknown)
[   16.514096] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   16.514156] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   16.514215] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   16.514264] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   16.514792] head: 0bfffe0000000002 ffffc1ffc3199501 00000000ffffffff 00000000ffffffff
[   16.515063] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   16.515251] page dumped because: kasan: bad access detected
[   16.515372] 
[   16.515391] Memory state around the buggy address:
[   16.515424]  fff00000c6653f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.515493]  fff00000c6653f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.515705] >fff00000c6654000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   16.515813]                    ^
[   16.515841]  fff00000c6654080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   16.516000]  fff00000c6654100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   16.516057] ==================================================================

[   12.459926] ==================================================================
[   12.460725] BUG: KASAN: invalid-free in kfree+0x274/0x3f0
[   12.460936] Free of addr ffff888102be8001 by task kunit_try_catch/167
[   12.461168] 
[   12.461311] CPU: 1 UID: 0 PID: 167 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   12.461355] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.461365] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.461387] Call Trace:
[   12.461399]  <TASK>
[   12.461668]  dump_stack_lvl+0x73/0xb0
[   12.461710]  print_report+0xd1/0x610
[   12.461734]  ? __virt_addr_valid+0x1db/0x2d0
[   12.461759]  ? kasan_addr_to_slab+0x11/0xa0
[   12.461778]  ? kfree+0x274/0x3f0
[   12.461799]  kasan_report_invalid_free+0x10a/0x130
[   12.461824]  ? kfree+0x274/0x3f0
[   12.461846]  ? kfree+0x274/0x3f0
[   12.461866]  __kasan_kfree_large+0x86/0xd0
[   12.461887]  free_large_kmalloc+0x4b/0x110
[   12.461911]  kfree+0x274/0x3f0
[   12.461935]  kmalloc_large_invalid_free+0x120/0x2b0
[   12.461958]  ? __pfx_kmalloc_large_invalid_free+0x10/0x10
[   12.462057]  ? __schedule+0x10cc/0x2b60
[   12.462082]  ? __pfx_read_tsc+0x10/0x10
[   12.462207]  ? ktime_get_ts64+0x86/0x230
[   12.462232]  kunit_try_run_case+0x1a5/0x480
[   12.462258]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.462293]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.462317]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.462341]  ? __kthread_parkme+0x82/0x180
[   12.462362]  ? preempt_count_sub+0x50/0x80
[   12.462386]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.462410]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.462434]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.462459]  kthread+0x337/0x6f0
[   12.462478]  ? trace_preempt_on+0x20/0xc0
[   12.462502]  ? __pfx_kthread+0x10/0x10
[   12.462522]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.462543]  ? calculate_sigpending+0x7b/0xa0
[   12.462568]  ? __pfx_kthread+0x10/0x10
[   12.462588]  ret_from_fork+0x116/0x1d0
[   12.462606]  ? __pfx_kthread+0x10/0x10
[   12.462627]  ret_from_fork_asm+0x1a/0x30
[   12.462658]  </TASK>
[   12.462668] 
[   12.472893] The buggy address belongs to the physical page:
[   12.473305] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102be8
[   12.473837] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   12.474416] flags: 0x200000000000040(head|node=0|zone=2)
[   12.474789] page_type: f8(unknown)
[   12.475112] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   12.475675] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   12.476020] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   12.477110] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   12.477725] head: 0200000000000002 ffffea00040afa01 00000000ffffffff 00000000ffffffff
[   12.478407] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   12.478636] page dumped because: kasan: bad access detected
[   12.478810] 
[   12.478878] Memory state around the buggy address:
[   12.479048]  ffff888102be7f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.479974]  ffff888102be7f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.480556] >ffff888102be8000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.480994]                    ^
[   12.481403]  ffff888102be8080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.481888]  ffff888102be8100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.482506] ==================================================================