Hay
Date
Feb. 5, 2025, 2:09 p.m.

Environment
qemu-x86_64

[   46.924761] ==================================================================
[   46.926193] BUG: KASAN: invalid-free in kfree+0xfb/0x120
[   46.926790] Free of addr ffff888102568001 by task kunit_try_catch/144
[   46.927689] 
[   46.928104] CPU: 1 PID: 144 Comm: kunit_try_catch Tainted: G    B            N 6.6.76-rc1 #1
[   46.929877] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   46.931131] Call Trace:
[   46.931492]  <TASK>
[   46.931870]  dump_stack_lvl+0x4e/0x90
[   46.933194]  print_report+0xd2/0x660
[   46.933682]  ? __virt_addr_valid+0x156/0x1e0
[   46.934450]  ? kfree+0xfb/0x120
[   46.934905]  ? kasan_addr_to_slab+0x11/0xb0
[   46.935568]  ? kfree+0xfb/0x120
[   46.936529]  kasan_report_invalid_free+0xcf/0x100
[   46.937197]  ? kfree+0xfb/0x120
[   46.937691]  ? kfree+0xfb/0x120
[   46.938355]  __kasan_kfree_large+0x86/0xd0
[   46.938916]  free_large_kmalloc+0x46/0xd0
[   46.939732]  kfree+0xfb/0x120
[   46.940694]  kmalloc_pagealloc_invalid_free+0xa9/0x1a0
[   46.941614]  ? __pfx_kmalloc_pagealloc_invalid_free+0x10/0x10
[   46.942466]  ? __schedule+0x70b/0x1190
[   46.943033]  ? ktime_get_ts64+0x118/0x140
[   46.943637]  kunit_try_run_case+0x126/0x290
[   46.944242]  ? __pfx_kunit_try_run_case+0x10/0x10
[   46.944824]  ? __kasan_check_write+0x18/0x20
[   46.945349]  ? trace_preempt_on+0x20/0xa0
[   46.945920]  ? __kthread_parkme+0x4f/0xd0
[   46.946720]  ? preempt_count_sub+0x50/0x80
[   46.947641]  ? __pfx_kunit_try_run_case+0x10/0x10
[   46.948444]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   46.949599]  kunit_generic_run_threadfn_adapter+0x33/0x50
[   46.950272]  kthread+0x19e/0x1e0
[   46.950684]  ? __pfx_kthread+0x10/0x10
[   46.951423]  ret_from_fork+0x41/0x70
[   46.952520]  ? __pfx_kthread+0x10/0x10
[   46.953193]  ret_from_fork_asm+0x1b/0x30
[   46.953673]  </TASK>
[   46.953943] 
[   46.954146] The buggy address belongs to the physical page:
[   46.954571] page:(____ptrval____) refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102568
[   46.956625] head:(____ptrval____) order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   46.957824] flags: 0x200000000000040(head|node=0|zone=2)
[   46.959425] page_type: 0xffffffff()
[   46.960217] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   46.961390] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   46.962960] page dumped because: kasan: bad access detected
[   46.964108] 
[   46.965006] Memory state around the buggy address:
[   46.965938]  ffff888102567f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   46.966987]  ffff888102567f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   46.967828] >ffff888102568000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   46.968881]                    ^
[   46.969547]  ffff888102568080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   46.970235]  ffff888102568100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   46.971535] ==================================================================