Hay
Date
Nov. 26, 2024, 6:09 a.m.

Environment
qemu-arm64
qemu-x86_64

[   30.326082] ==================================================================
[   30.327467] BUG: KASAN: invalid-free in kfree+0x278/0x3d0
[   30.328375] Free of addr fff00000c6464001 by task kunit_try_catch/139
[   30.330009] 
[   30.330375] CPU: 1 UID: 0 PID: 139 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241126 #1
[   30.331440] Tainted: [B]=BAD_PAGE, [N]=TEST
[   30.332767] Hardware name: linux,dummy-virt (DT)
[   30.333502] Call trace:
[   30.334051]  show_stack+0x20/0x38 (C)
[   30.334996]  dump_stack_lvl+0x8c/0xd0
[   30.335757]  print_report+0x118/0x5e0
[   30.336320]  kasan_report_invalid_free+0xb0/0xd8
[   30.337074]  __kasan_kfree_large+0x5c/0xa8
[   30.337610]  free_large_kmalloc+0x58/0x140
[   30.338183]  kfree+0x278/0x3d0
[   30.338717]  kmalloc_large_invalid_free+0x108/0x270
[   30.339328]  kunit_try_run_case+0x14c/0x3d0
[   30.340015]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.340805]  kthread+0x24c/0x2d0
[   30.341398]  ret_from_fork+0x10/0x20
[   30.341933] 
[   30.342313] The buggy address belongs to the physical page:
[   30.342932] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106464
[   30.343806] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   30.344673] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   30.345560] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   30.346403] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   30.347225] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   30.348124] head: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   30.349050] head: 0bfffe0000000002 ffffc1ffc3191901 ffffffffffffffff 0000000000000000
[   30.349975] head: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000
[   30.350782] page dumped because: kasan: bad access detected
[   30.351368] 
[   30.351722] Memory state around the buggy address:
[   30.352373]  fff00000c6463f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.353151]  fff00000c6463f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.353935] >fff00000c6464000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   30.354711]                    ^
[   30.355194]  fff00000c6464080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   30.356057]  fff00000c6464100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   30.356838] ==================================================================

[   30.276387] ==================================================================
[   30.278206] BUG: KASAN: invalid-free in kfree+0x278/0x3d0
[   30.279167] Free of addr fff00000c64b4001 by task kunit_try_catch/139
[   30.280046] 
[   30.280545] CPU: 0 UID: 0 PID: 139 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241126 #1
[   30.281818] Tainted: [B]=BAD_PAGE, [N]=TEST
[   30.282499] Hardware name: linux,dummy-virt (DT)
[   30.283219] Call trace:
[   30.283834]  show_stack+0x20/0x38 (C)
[   30.284495]  dump_stack_lvl+0x8c/0xd0
[   30.285229]  print_report+0x118/0x5e0
[   30.286001]  kasan_report_invalid_free+0xb0/0xd8
[   30.286596]  __kasan_kfree_large+0x5c/0xa8
[   30.287271]  free_large_kmalloc+0x58/0x140
[   30.287998]  kfree+0x278/0x3d0
[   30.288636]  kmalloc_large_invalid_free+0x108/0x270
[   30.289338]  kunit_try_run_case+0x14c/0x3d0
[   30.290091]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.290796]  kthread+0x24c/0x2d0
[   30.291427]  ret_from_fork+0x10/0x20
[   30.292097] 
[   30.292515] The buggy address belongs to the physical page:
[   30.293169] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1064b4
[   30.294210] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   30.295063] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   30.296019] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   30.296980] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   30.297914] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   30.298846] head: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   30.299802] head: 0bfffe0000000002 ffffc1ffc3192d01 ffffffffffffffff 0000000000000000
[   30.300741] head: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000
[   30.301642] page dumped because: kasan: bad access detected
[   30.302337] 
[   30.302760] Memory state around the buggy address:
[   30.303354]  fff00000c64b3f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.304335]  fff00000c64b3f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.305136] >fff00000c64b4000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   30.306048]                    ^
[   30.306604]  fff00000c64b4080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   30.307452]  fff00000c64b4100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   30.308371] ==================================================================

[   24.298599] ==================================================================
[   24.300004] BUG: KASAN: invalid-free in kfree+0x271/0x3f0
[   24.300658] Free of addr ffff888102b0c001 by task kunit_try_catch/157
[   24.301717] 
[   24.302437] CPU: 1 UID: 0 PID: 157 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241126 #1
[   24.303724] Tainted: [B]=BAD_PAGE, [N]=TEST
[   24.304167] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   24.304965] Call Trace:
[   24.305225]  <TASK>
[   24.305460]  dump_stack_lvl+0x73/0xb0
[   24.306806]  print_report+0xd1/0x640
[   24.308186]  ? __virt_addr_valid+0x1db/0x2d0
[   24.308598]  ? kfree+0x271/0x3f0
[   24.308970]  ? kasan_addr_to_slab+0x11/0xa0
[   24.309365]  ? kfree+0x271/0x3f0
[   24.310367]  kasan_report_invalid_free+0xc0/0xf0
[   24.310841]  ? kfree+0x271/0x3f0
[   24.311067]  ? kfree+0x271/0x3f0
[   24.311864]  __kasan_kfree_large+0x86/0xd0
[   24.312346]  free_large_kmalloc+0x3b/0xd0
[   24.313386]  kfree+0x271/0x3f0
[   24.313782]  kmalloc_large_invalid_free+0x121/0x2b0
[   24.314259]  ? __pfx_kmalloc_large_invalid_free+0x10/0x10
[   24.315511]  ? __pfx_kmalloc_large_invalid_free+0x10/0x10
[   24.315954]  kunit_try_run_case+0x1b3/0x490
[   24.316531]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.317169]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   24.318066]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   24.319178]  ? __kthread_parkme+0x82/0x160
[   24.319620]  ? preempt_count_sub+0x50/0x80
[   24.320059]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.320447]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   24.321631]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.322288]  kthread+0x257/0x310
[   24.322525]  ? __pfx_kthread+0x10/0x10
[   24.323034]  ret_from_fork+0x41/0x80
[   24.323612]  ? __pfx_kthread+0x10/0x10
[   24.324215]  ret_from_fork_asm+0x1a/0x30
[   24.324776]  </TASK>
[   24.325107] 
[   24.325420] The buggy address belongs to the physical page:
[   24.326085] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b0c
[   24.327546] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   24.328271] flags: 0x200000000000040(head|node=0|zone=2)
[   24.328895] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   24.329504] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   24.330754] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   24.331243] head: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   24.331805] head: 0200000000000002 ffffea00040ac301 ffffffffffffffff 0000000000000000
[   24.332472] head: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000
[   24.333427] page dumped because: kasan: bad access detected
[   24.334103] 
[   24.334317] Memory state around the buggy address:
[   24.334635]  ffff888102b0bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.335521]  ffff888102b0bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.335925] >ffff888102b0c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   24.336726]                    ^
[   24.337666]  ffff888102b0c080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   24.338363]  ffff888102b0c100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   24.339197] ==================================================================

[   19.495897] ==================================================================
[   19.496668] BUG: KASAN: invalid-free in kfree+0x271/0x3f0
[   19.497310] Free of addr ffff888102a18001 by task kunit_try_catch/157
[   19.497753] 
[   19.498018] CPU: 1 UID: 0 PID: 157 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241126 #1
[   19.499068] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.499365] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   19.501255] Call Trace:
[   19.501817]  <TASK>
[   19.502204]  dump_stack_lvl+0x73/0xb0
[   19.502651]  print_report+0xd1/0x640
[   19.503451]  ? __virt_addr_valid+0x1db/0x2d0
[   19.504017]  ? kfree+0x271/0x3f0
[   19.504878]  ? kasan_addr_to_slab+0x11/0xa0
[   19.505627]  ? kfree+0x271/0x3f0
[   19.506360]  kasan_report_invalid_free+0xc0/0xf0
[   19.507162]  ? kfree+0x271/0x3f0
[   19.507451]  ? kfree+0x271/0x3f0
[   19.507979]  __kasan_kfree_large+0x86/0xd0
[   19.508888]  free_large_kmalloc+0x3b/0xd0
[   19.509481]  kfree+0x271/0x3f0
[   19.510304]  kmalloc_large_invalid_free+0x121/0x2b0
[   19.510900]  ? __pfx_kmalloc_large_invalid_free+0x10/0x10
[   19.511647]  ? __schedule+0xc3e/0x2790
[   19.512167]  ? __pfx_read_tsc+0x10/0x10
[   19.512613]  ? ktime_get_ts64+0x84/0x230
[   19.512943]  kunit_try_run_case+0x1b3/0x490
[   19.513388]  ? __pfx_kunit_try_run_case+0x10/0x10
[   19.514268]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   19.514608]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   19.515212]  ? __kthread_parkme+0x82/0x160
[   19.515917]  ? preempt_count_sub+0x50/0x80
[   19.516847]  ? __pfx_kunit_try_run_case+0x10/0x10
[   19.517446]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   19.518767]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   19.519272]  kthread+0x257/0x310
[   19.519554]  ? __pfx_kthread+0x10/0x10
[   19.520568]  ret_from_fork+0x41/0x80
[   19.521142]  ? __pfx_kthread+0x10/0x10
[   19.521990]  ret_from_fork_asm+0x1a/0x30
[   19.522457]  </TASK>
[   19.523101] 
[   19.523514] The buggy address belongs to the physical page:
[   19.524125] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a18
[   19.524530] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   19.525021] flags: 0x200000000000040(head|node=0|zone=2)
[   19.525446] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   19.525923] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   19.526708] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   19.527245] head: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   19.527906] head: 0200000000000002 ffffea00040a8601 ffffffffffffffff 0000000000000000
[   19.529682] head: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000
[   19.530740] page dumped because: kasan: bad access detected
[   19.531393] 
[   19.531926] Memory state around the buggy address:
[   19.532413]  ffff888102a17f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.533010]  ffff888102a17f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.533660] >ffff888102a18000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   19.534637]                    ^
[   19.534990]  ffff888102a18080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   19.535410]  ffff888102a18100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   19.536704] ==================================================================