Hay
Date
July 18, 2025, 1:09 p.m.

Environment
qemu-arm64
qemu-x86_64

[   33.622238] ==================================================================
[   33.622293] BUG: KASAN: use-after-free in mempool_uaf_helper+0x314/0x340
[   33.622711] Read of size 1 at addr fff00000c9bb4000 by task kunit_try_catch/260
[   33.623093] 
[   33.623182] CPU: 0 UID: 0 PID: 260 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250718 #1 PREEMPT 
[   33.623271] Tainted: [B]=BAD_PAGE, [N]=TEST
[   33.623299] Hardware name: linux,dummy-virt (DT)
[   33.623376] Call trace:
[   33.623404]  show_stack+0x20/0x38 (C)
[   33.623483]  dump_stack_lvl+0x8c/0xd0
[   33.623660]  print_report+0x118/0x5e8
[   33.623732]  kasan_report+0xdc/0x128
[   33.623841]  __asan_report_load1_noabort+0x20/0x30
[   33.623927]  mempool_uaf_helper+0x314/0x340
[   33.624016]  mempool_kmalloc_large_uaf+0xc4/0x120
[   33.624104]  kunit_try_run_case+0x170/0x3f0
[   33.624270]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.624331]  kthread+0x328/0x630
[   33.624373]  ret_from_fork+0x10/0x20
[   33.624429] 
[   33.624451] The buggy address belongs to the physical page:
[   33.624486] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109bb4
[   33.624538] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   33.624583] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   33.624745] page_type: f8(unknown)
[   33.624813] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   33.624915] raw: 0000000000000000 0000000000000000 00000000f8000000 0000000000000000
[   33.624995] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   33.625130] head: 0000000000000000 0000000000000000 00000000f8000000 0000000000000000
[   33.625181] head: 0bfffe0000000002 ffffc1ffc326ed01 00000000ffffffff 00000000ffffffff
[   33.625263] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   33.625539] page dumped because: kasan: bad access detected
[   33.625614] 
[   33.625700] Memory state around the buggy address:
[   33.625801]  fff00000c9bb3f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   33.626099]  fff00000c9bb3f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   33.626250] >fff00000c9bb4000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   33.626338]                    ^
[   33.626625]  fff00000c9bb4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   33.626691]  fff00000c9bb4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   33.626773] ==================================================================
[   33.664209] ==================================================================
[   33.664279] BUG: KASAN: use-after-free in mempool_uaf_helper+0x314/0x340
[   33.664422] Read of size 1 at addr fff00000c9bb4000 by task kunit_try_catch/264
[   33.664500] 
[   33.664535] CPU: 0 UID: 0 PID: 264 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250718 #1 PREEMPT 
[   33.664653] Tainted: [B]=BAD_PAGE, [N]=TEST
[   33.664682] Hardware name: linux,dummy-virt (DT)
[   33.664715] Call trace:
[   33.664804]  show_stack+0x20/0x38 (C)
[   33.664858]  dump_stack_lvl+0x8c/0xd0
[   33.664963]  print_report+0x118/0x5e8
[   33.665037]  kasan_report+0xdc/0x128
[   33.665224]  __asan_report_load1_noabort+0x20/0x30
[   33.665286]  mempool_uaf_helper+0x314/0x340
[   33.665334]  mempool_page_alloc_uaf+0xc0/0x118
[   33.665524]  kunit_try_run_case+0x170/0x3f0
[   33.665592]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.665668]  kthread+0x328/0x630
[   33.665713]  ret_from_fork+0x10/0x20
[   33.665780] 
[   33.665852] The buggy address belongs to the physical page:
[   33.665888] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109bb4
[   33.665942] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   33.666004] raw: 0bfffe0000000000 0000000000000000 dead000000000122 0000000000000000
[   33.666056] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   33.666107] page dumped because: kasan: bad access detected
[   33.666339] 
[   33.666369] Memory state around the buggy address:
[   33.666531]  fff00000c9bb3f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   33.666597]  fff00000c9bb3f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   33.666700] >fff00000c9bb4000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   33.666757]                    ^
[   33.666788]  fff00000c9bb4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   33.666831]  fff00000c9bb4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   33.667044] ==================================================================


[   26.472030] ==================================================================
[   26.472454] BUG: KASAN: use-after-free in mempool_uaf_helper+0x392/0x400
[   26.473292] Read of size 1 at addr ffff88810622c000 by task kunit_try_catch/281
[   26.474155] 
[   26.474426] CPU: 0 UID: 0 PID: 281 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250718 #1 PREEMPT(voluntary) 
[   26.474485] Tainted: [B]=BAD_PAGE, [N]=TEST
[   26.474498] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   26.474522] Call Trace:
[   26.474536]  <TASK>
[   26.474556]  dump_stack_lvl+0x73/0xb0
[   26.474593]  print_report+0xd1/0x640
[   26.474617]  ? __virt_addr_valid+0x1db/0x2d0
[   26.474648]  ? mempool_uaf_helper+0x392/0x400
[   26.474670]  ? kasan_addr_to_slab+0x11/0xa0
[   26.474691]  ? mempool_uaf_helper+0x392/0x400
[   26.474712]  kasan_report+0x141/0x180
[   26.474734]  ? mempool_uaf_helper+0x392/0x400
[   26.474759]  __asan_report_load1_noabort+0x18/0x20
[   26.474838]  mempool_uaf_helper+0x392/0x400
[   26.474863]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   26.474885]  ? dequeue_entities+0x23f/0x1630
[   26.474912]  ? __kasan_check_write+0x18/0x20
[   26.474948]  ? __pfx_sched_clock_cpu+0x10/0x10
[   26.474970]  ? finish_task_switch.isra.0+0x153/0x700
[   26.474997]  mempool_page_alloc_uaf+0xed/0x140
[   26.475019]  ? __pfx_mempool_page_alloc_uaf+0x10/0x10
[   26.475045]  ? __pfx_mempool_alloc_pages+0x10/0x10
[   26.475071]  ? __pfx_mempool_free_pages+0x10/0x10
[   26.475096]  ? __pfx_read_tsc+0x10/0x10
[   26.475118]  ? ktime_get_ts64+0x86/0x230
[   26.475143]  kunit_try_run_case+0x1a5/0x480
[   26.475171]  ? __pfx_kunit_try_run_case+0x10/0x10
[   26.475192]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   26.475228]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   26.475270]  ? __kthread_parkme+0x82/0x180
[   26.475292]  ? preempt_count_sub+0x50/0x80
[   26.475316]  ? __pfx_kunit_try_run_case+0x10/0x10
[   26.475339]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.475361]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   26.475383]  kthread+0x337/0x6f0
[   26.475403]  ? trace_preempt_on+0x20/0xc0
[   26.475426]  ? __pfx_kthread+0x10/0x10
[   26.475447]  ? _raw_spin_unlock_irq+0x47/0x80
[   26.475476]  ? calculate_sigpending+0x7b/0xa0
[   26.475501]  ? __pfx_kthread+0x10/0x10
[   26.475523]  ret_from_fork+0x116/0x1d0
[   26.475541]  ? __pfx_kthread+0x10/0x10
[   26.475561]  ret_from_fork_asm+0x1a/0x30
[   26.475593]  </TASK>
[   26.475605] 
[   26.485033] The buggy address belongs to the physical page:
[   26.485308] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10622c
[   26.485692] flags: 0x200000000000000(node=0|zone=2)
[   26.486080] raw: 0200000000000000 0000000000000000 dead000000000122 0000000000000000
[   26.486439] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   26.486840] page dumped because: kasan: bad access detected
[   26.487120] 
[   26.487194] Memory state around the buggy address:
[   26.487422]  ffff88810622bf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   26.487731]  ffff88810622bf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   26.488069] >ffff88810622c000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   26.488284]                    ^
[   26.488394]  ffff88810622c080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   26.488675]  ffff88810622c100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   26.488993] ==================================================================
[   26.405957] ==================================================================
[   26.406415] BUG: KASAN: use-after-free in mempool_uaf_helper+0x392/0x400
[   26.406708] Read of size 1 at addr ffff888106250000 by task kunit_try_catch/277
[   26.407077] 
[   26.407162] CPU: 1 UID: 0 PID: 277 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250718 #1 PREEMPT(voluntary) 
[   26.407224] Tainted: [B]=BAD_PAGE, [N]=TEST
[   26.407236] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   26.407269] Call Trace:
[   26.407282]  <TASK>
[   26.407299]  dump_stack_lvl+0x73/0xb0
[   26.407330]  print_report+0xd1/0x640
[   26.407352]  ? __virt_addr_valid+0x1db/0x2d0
[   26.407376]  ? mempool_uaf_helper+0x392/0x400
[   26.407397]  ? kasan_addr_to_slab+0x11/0xa0
[   26.407417]  ? mempool_uaf_helper+0x392/0x400
[   26.407440]  kasan_report+0x141/0x180
[   26.407463]  ? mempool_uaf_helper+0x392/0x400
[   26.407488]  __asan_report_load1_noabort+0x18/0x20
[   26.407512]  mempool_uaf_helper+0x392/0x400
[   26.407534]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   26.407559]  ? finish_task_switch.isra.0+0x153/0x700
[   26.407621]  mempool_kmalloc_large_uaf+0xef/0x140
[   26.407644]  ? __pfx_mempool_kmalloc_large_uaf+0x10/0x10
[   26.407681]  ? __pfx_mempool_kmalloc+0x10/0x10
[   26.407705]  ? __pfx_mempool_kfree+0x10/0x10
[   26.407729]  ? __pfx_read_tsc+0x10/0x10
[   26.407750]  ? ktime_get_ts64+0x86/0x230
[   26.407775]  kunit_try_run_case+0x1a5/0x480
[   26.407810]  ? __pfx_kunit_try_run_case+0x10/0x10
[   26.407832]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   26.407856]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   26.407879]  ? __kthread_parkme+0x82/0x180
[   26.407899]  ? preempt_count_sub+0x50/0x80
[   26.407921]  ? __pfx_kunit_try_run_case+0x10/0x10
[   26.407945]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.407968]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   26.407990]  kthread+0x337/0x6f0
[   26.408010]  ? trace_preempt_on+0x20/0xc0
[   26.408032]  ? __pfx_kthread+0x10/0x10
[   26.408052]  ? _raw_spin_unlock_irq+0x47/0x80
[   26.408073]  ? calculate_sigpending+0x7b/0xa0
[   26.408097]  ? __pfx_kthread+0x10/0x10
[   26.408119]  ret_from_fork+0x116/0x1d0
[   26.408138]  ? __pfx_kthread+0x10/0x10
[   26.408392]  ret_from_fork_asm+0x1a/0x30
[   26.408423]  </TASK>
[   26.408434] 
[   26.416041] The buggy address belongs to the physical page:
[   26.416318] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106250
[   26.416684] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   26.417116] flags: 0x200000000000040(head|node=0|zone=2)
[   26.417311] page_type: f8(unknown)
[   26.417440] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   26.417782] raw: 0000000000000000 0000000000000000 00000000f8000000 0000000000000000
[   26.418112] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   26.418394] head: 0000000000000000 0000000000000000 00000000f8000000 0000000000000000
[   26.418719] head: 0200000000000002 ffffea0004189401 00000000ffffffff 00000000ffffffff
[   26.419013] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   26.419239] page dumped because: kasan: bad access detected
[   26.419789] 
[   26.419882] Memory state around the buggy address:
[   26.420114]  ffff88810624ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   26.420602]  ffff88810624ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   26.421009] >ffff888106250000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   26.421317]                    ^
[   26.421433]  ffff888106250080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   26.421643]  ffff888106250100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   26.421846] ==================================================================