Hay
Date
June 20, 2025, 12:38 p.m.

Environment
qemu-arm64
qemu-x86_64

[   34.692331] ==================================================================
[   34.692597] BUG: KASAN: use-after-free in mempool_uaf_helper+0x314/0x340
[   34.692764] Read of size 1 at addr fff00000c5a48000 by task kunit_try_catch/244
[   34.692873] 
[   34.692960] CPU: 1 UID: 0 PID: 244 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250620 #1 PREEMPT 
[   34.693170] Tainted: [B]=BAD_PAGE, [N]=TEST
[   34.693238] Hardware name: linux,dummy-virt (DT)
[   34.693367] Call trace:
[   34.693422]  show_stack+0x20/0x38 (C)
[   34.693526]  dump_stack_lvl+0x8c/0xd0
[   34.693652]  print_report+0x118/0x608
[   34.694049]  kasan_report+0xdc/0x128
[   34.694170]  __asan_report_load1_noabort+0x20/0x30
[   34.694324]  mempool_uaf_helper+0x314/0x340
[   34.694424]  mempool_page_alloc_uaf+0xc0/0x118
[   34.694554]  kunit_try_run_case+0x170/0x3f0
[   34.694765]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   34.694922]  kthread+0x328/0x630
[   34.695021]  ret_from_fork+0x10/0x20
[   34.695161] 
[   34.695250] The buggy address belongs to the physical page:
[   34.695364] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105a48
[   34.695579] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   34.695795] raw: 0bfffe0000000000 0000000000000000 dead000000000122 0000000000000000
[   34.695960] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   34.696108] page dumped because: kasan: bad access detected
[   34.696215] 
[   34.696265] Memory state around the buggy address:
[   34.696397]  fff00000c5a47f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   34.696495]  fff00000c5a47f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   34.696594] >fff00000c5a48000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   34.696705]                    ^
[   34.697159]  fff00000c5a48080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   34.697298]  fff00000c5a48100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   34.697441] ==================================================================
[   34.588000] ==================================================================
[   34.588552] BUG: KASAN: use-after-free in mempool_uaf_helper+0x314/0x340
[   34.588972] Read of size 1 at addr fff00000c5a44000 by task kunit_try_catch/240
[   34.589146] 
[   34.589277] CPU: 1 UID: 0 PID: 240 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250620 #1 PREEMPT 
[   34.589509] Tainted: [B]=BAD_PAGE, [N]=TEST
[   34.589562] Hardware name: linux,dummy-virt (DT)
[   34.589643] Call trace:
[   34.589911]  show_stack+0x20/0x38 (C)
[   34.590051]  dump_stack_lvl+0x8c/0xd0
[   34.590437]  print_report+0x118/0x608
[   34.590565]  kasan_report+0xdc/0x128
[   34.590699]  __asan_report_load1_noabort+0x20/0x30
[   34.590841]  mempool_uaf_helper+0x314/0x340
[   34.591005]  mempool_kmalloc_large_uaf+0xc4/0x120
[   34.591171]  kunit_try_run_case+0x170/0x3f0
[   34.591342]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   34.591531]  kthread+0x328/0x630
[   34.591692]  ret_from_fork+0x10/0x20
[   34.591835] 
[   34.591917] The buggy address belongs to the physical page:
[   34.592044] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105a44
[   34.592265] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   34.592383] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   34.592524] page_type: f8(unknown)
[   34.592639] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   34.592778] raw: 0000000000000000 0000000000000000 00000000f8000000 0000000000000000
[   34.592908] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   34.593008] head: 0000000000000000 0000000000000000 00000000f8000000 0000000000000000
[   34.593105] head: 0bfffe0000000002 ffffc1ffc3169101 00000000ffffffff 00000000ffffffff
[   34.593216] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   34.593324] page dumped because: kasan: bad access detected
[   34.593411] 
[   34.593511] Memory state around the buggy address:
[   34.593628]  fff00000c5a43f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   34.593948]  fff00000c5a43f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   34.594319] >fff00000c5a44000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   34.594954]                    ^
[   34.595292]  fff00000c5a44080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   34.595441]  fff00000c5a44100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   34.595543] ==================================================================

[   27.333196] ==================================================================
[   27.333682] BUG: KASAN: use-after-free in mempool_uaf_helper+0x392/0x400
[   27.334292] Read of size 1 at addr ffff888102a60000 by task kunit_try_catch/258
[   27.334807] 
[   27.334961] CPU: 1 UID: 0 PID: 258 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250620 #1 PREEMPT(voluntary) 
[   27.335372] Tainted: [B]=BAD_PAGE, [N]=TEST
[   27.335413] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   27.335475] Call Trace:
[   27.335507]  <TASK>
[   27.335550]  dump_stack_lvl+0x73/0xb0
[   27.335621]  print_report+0xd1/0x650
[   27.335790]  ? __virt_addr_valid+0x1db/0x2d0
[   27.335836]  ? mempool_uaf_helper+0x392/0x400
[   27.335881]  ? kasan_addr_to_slab+0x11/0xa0
[   27.335926]  ? mempool_uaf_helper+0x392/0x400
[   27.335968]  kasan_report+0x141/0x180
[   27.336007]  ? mempool_uaf_helper+0x392/0x400
[   27.336091]  __asan_report_load1_noabort+0x18/0x20
[   27.336140]  mempool_uaf_helper+0x392/0x400
[   27.336204]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   27.336254]  ? __kasan_check_write+0x18/0x20
[   27.336305]  ? __pfx_sched_clock_cpu+0x10/0x10
[   27.336349]  ? finish_task_switch.isra.0+0x153/0x700
[   27.336388]  mempool_kmalloc_large_uaf+0xef/0x140
[   27.336412]  ? __pfx_mempool_kmalloc_large_uaf+0x10/0x10
[   27.336438]  ? __pfx_mempool_kmalloc+0x10/0x10
[   27.336489]  ? __pfx_mempool_kfree+0x10/0x10
[   27.336516]  ? __pfx_read_tsc+0x10/0x10
[   27.336540]  ? ktime_get_ts64+0x86/0x230
[   27.336583]  kunit_try_run_case+0x1a5/0x480
[   27.336623]  ? __pfx_kunit_try_run_case+0x10/0x10
[   27.336657]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   27.336697]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   27.336726]  ? __kthread_parkme+0x82/0x180
[   27.336748]  ? preempt_count_sub+0x50/0x80
[   27.336772]  ? __pfx_kunit_try_run_case+0x10/0x10
[   27.336797]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   27.336821]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   27.336845]  kthread+0x337/0x6f0
[   27.336865]  ? trace_preempt_on+0x20/0xc0
[   27.336890]  ? __pfx_kthread+0x10/0x10
[   27.336911]  ? _raw_spin_unlock_irq+0x47/0x80
[   27.336933]  ? calculate_sigpending+0x7b/0xa0
[   27.336959]  ? __pfx_kthread+0x10/0x10
[   27.336981]  ret_from_fork+0x116/0x1d0
[   27.337001]  ? __pfx_kthread+0x10/0x10
[   27.337022]  ret_from_fork_asm+0x1a/0x30
[   27.337054]  </TASK>
[   27.337068] 
[   27.351904] The buggy address belongs to the physical page:
[   27.352318] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a60
[   27.352656] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   27.353384] flags: 0x200000000000040(head|node=0|zone=2)
[   27.353839] page_type: f8(unknown)
[   27.354183] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   27.354510] raw: 0000000000000000 0000000000000000 00000000f8000000 0000000000000000
[   27.355008] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   27.355394] head: 0000000000000000 0000000000000000 00000000f8000000 0000000000000000
[   27.355792] head: 0200000000000002 ffffea00040a9801 00000000ffffffff 00000000ffffffff
[   27.356118] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   27.356937] page dumped because: kasan: bad access detected
[   27.357451] 
[   27.357774] Memory state around the buggy address:
[   27.358118]  ffff888102a5ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.358496]  ffff888102a5ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.359089] >ffff888102a60000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.359472]                    ^
[   27.359919]  ffff888102a60080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.360365]  ffff888102a60100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.360995] ==================================================================
[   27.414996] ==================================================================
[   27.415522] BUG: KASAN: use-after-free in mempool_uaf_helper+0x392/0x400
[   27.416679] Read of size 1 at addr ffff888102b04000 by task kunit_try_catch/262
[   27.417286] 
[   27.417525] CPU: 0 UID: 0 PID: 262 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250620 #1 PREEMPT(voluntary) 
[   27.417625] Tainted: [B]=BAD_PAGE, [N]=TEST
[   27.417651] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   27.417693] Call Trace:
[   27.417724]  <TASK>
[   27.417760]  dump_stack_lvl+0x73/0xb0
[   27.417866]  print_report+0xd1/0x650
[   27.417916]  ? __virt_addr_valid+0x1db/0x2d0
[   27.417971]  ? mempool_uaf_helper+0x392/0x400
[   27.418022]  ? kasan_addr_to_slab+0x11/0xa0
[   27.418112]  ? mempool_uaf_helper+0x392/0x400
[   27.418176]  kasan_report+0x141/0x180
[   27.418225]  ? mempool_uaf_helper+0x392/0x400
[   27.418289]  __asan_report_load1_noabort+0x18/0x20
[   27.418347]  mempool_uaf_helper+0x392/0x400
[   27.418400]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   27.418452]  ? __kasan_check_write+0x18/0x20
[   27.418506]  ? __pfx_sched_clock_cpu+0x10/0x10
[   27.418554]  ? finish_task_switch.isra.0+0x153/0x700
[   27.418603]  mempool_page_alloc_uaf+0xed/0x140
[   27.418645]  ? __pfx_mempool_page_alloc_uaf+0x10/0x10
[   27.418691]  ? __pfx_mempool_alloc_pages+0x10/0x10
[   27.418728]  ? __pfx_mempool_free_pages+0x10/0x10
[   27.418756]  ? __pfx_read_tsc+0x10/0x10
[   27.418782]  ? ktime_get_ts64+0x86/0x230
[   27.418812]  kunit_try_run_case+0x1a5/0x480
[   27.418842]  ? __pfx_kunit_try_run_case+0x10/0x10
[   27.418867]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   27.418894]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   27.418920]  ? __kthread_parkme+0x82/0x180
[   27.418943]  ? preempt_count_sub+0x50/0x80
[   27.418968]  ? __pfx_kunit_try_run_case+0x10/0x10
[   27.418993]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   27.419018]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   27.419043]  kthread+0x337/0x6f0
[   27.419064]  ? trace_preempt_on+0x20/0xc0
[   27.419090]  ? __pfx_kthread+0x10/0x10
[   27.419113]  ? _raw_spin_unlock_irq+0x47/0x80
[   27.419136]  ? calculate_sigpending+0x7b/0xa0
[   27.419178]  ? __pfx_kthread+0x10/0x10
[   27.419202]  ret_from_fork+0x116/0x1d0
[   27.419223]  ? __pfx_kthread+0x10/0x10
[   27.419245]  ret_from_fork_asm+0x1a/0x30
[   27.419279]  </TASK>
[   27.419294] 
[   27.433940] The buggy address belongs to the physical page:
[   27.434830] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b04
[   27.435410] flags: 0x200000000000000(node=0|zone=2)
[   27.436021] raw: 0200000000000000 0000000000000000 dead000000000122 0000000000000000
[   27.436720] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   27.437865] page dumped because: kasan: bad access detected
[   27.438362] 
[   27.438874] Memory state around the buggy address:
[   27.439103]  ffff888102b03f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.439737]  ffff888102b03f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.440075] >ffff888102b04000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.441030]                    ^
[   27.441310]  ffff888102b04080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.441784]  ffff888102b04100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.442184] ==================================================================