Hay
Date
July 25, 2025, 3:13 a.m.

Environment
qemu-arm64
qemu-x86_64

[   34.421176] ==================================================================
[   34.421633] BUG: KASAN: use-after-free in mempool_uaf_helper+0x314/0x340
[   34.421946] Read of size 1 at addr fff00000c9b8c000 by task kunit_try_catch/265
[   34.422048] 
[   34.422097] CPU: 0 UID: 0 PID: 265 Comm: kunit_try_catch Tainted: G    B   W        N  6.16.0-rc7-next-20250725 #1 PREEMPT 
[   34.422274] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST
[   34.422312] Hardware name: linux,dummy-virt (DT)
[   34.422363] Call trace:
[   34.422459]  show_stack+0x20/0x38 (C)
[   34.422652]  dump_stack_lvl+0x8c/0xd0
[   34.422710]  print_report+0x118/0x5e8
[   34.422829]  kasan_report+0xdc/0x128
[   34.422999]  __asan_report_load1_noabort+0x20/0x30
[   34.423050]  mempool_uaf_helper+0x314/0x340
[   34.423510]  mempool_page_alloc_uaf+0xc0/0x118
[   34.423718]  kunit_try_run_case+0x170/0x3f0
[   34.423810]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   34.423884]  kthread+0x328/0x630
[   34.423985]  ret_from_fork+0x10/0x20
[   34.424229] 
[   34.424291] The buggy address belongs to the physical page:
[   34.424332] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109b8c
[   34.424570] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   34.424656] raw: 0bfffe0000000000 0000000000000000 dead000000000122 0000000000000000
[   34.424950] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   34.425104] page dumped because: kasan: bad access detected
[   34.425145] 
[   34.425163] Memory state around the buggy address:
[   34.425201]  fff00000c9b8bf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   34.425276]  fff00000c9b8bf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   34.425373] >fff00000c9b8c000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   34.425438]                    ^
[   34.425545]  fff00000c9b8c080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   34.425630]  fff00000c9b8c100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   34.425884] ==================================================================
[   34.355922] ==================================================================
[   34.355989] BUG: KASAN: use-after-free in mempool_uaf_helper+0x314/0x340
[   34.356052] Read of size 1 at addr fff00000c9b8c000 by task kunit_try_catch/261
[   34.356103] 
[   34.356139] CPU: 0 UID: 0 PID: 261 Comm: kunit_try_catch Tainted: G    B   W        N  6.16.0-rc7-next-20250725 #1 PREEMPT 
[   34.356229] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST
[   34.356259] Hardware name: linux,dummy-virt (DT)
[   34.356291] Call trace:
[   34.356576]  show_stack+0x20/0x38 (C)
[   34.356922]  dump_stack_lvl+0x8c/0xd0
[   34.357492]  print_report+0x118/0x5e8
[   34.357662]  kasan_report+0xdc/0x128
[   34.357968]  __asan_report_load1_noabort+0x20/0x30
[   34.358022]  mempool_uaf_helper+0x314/0x340
[   34.358069]  mempool_kmalloc_large_uaf+0xc4/0x120
[   34.358562]  kunit_try_run_case+0x170/0x3f0
[   34.358842]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   34.358970]  kthread+0x328/0x630
[   34.359013]  ret_from_fork+0x10/0x20
[   34.359062] 
[   34.359086] The buggy address belongs to the physical page:
[   34.359271] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109b8c
[   34.359516] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   34.359565] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   34.360114] page_type: f8(unknown)
[   34.360239] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   34.360290] raw: 0000000000000000 0000000000000000 00000000f8000000 0000000000000000
[   34.360341] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   34.360399] head: 0000000000000000 0000000000000000 00000000f8000000 0000000000000000
[   34.360448] head: 0bfffe0000000002 ffffc1ffc326e301 00000000ffffffff 00000000ffffffff
[   34.360863] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   34.360910] page dumped because: kasan: bad access detected
[   34.360943] 
[   34.360961] Memory state around the buggy address:
[   34.361348]  fff00000c9b8bf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   34.361436]  fff00000c9b8bf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   34.361486] >fff00000c9b8c000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   34.361628]                    ^
[   34.361873]  fff00000c9b8c080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   34.361918]  fff00000c9b8c100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   34.361956] ==================================================================

[   27.462087] ==================================================================
[   27.463555] BUG: KASAN: use-after-free in mempool_uaf_helper+0x392/0x400
[   27.464241] Read of size 1 at addr ffff888106370000 by task kunit_try_catch/282
[   27.465006] 
[   27.465231] CPU: 0 UID: 0 PID: 282 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7-next-20250725 #1 PREEMPT(voluntary) 
[   27.465300] Tainted: [B]=BAD_PAGE, [N]=TEST
[   27.465314] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   27.465336] Call Trace:
[   27.465349]  <TASK>
[   27.465369]  dump_stack_lvl+0x73/0xb0
[   27.465402]  print_report+0xd1/0x640
[   27.465426]  ? __virt_addr_valid+0x1db/0x2d0
[   27.465453]  ? mempool_uaf_helper+0x392/0x400
[   27.465476]  ? kasan_addr_to_slab+0x11/0xa0
[   27.465498]  ? mempool_uaf_helper+0x392/0x400
[   27.465522]  kasan_report+0x141/0x180
[   27.465545]  ? mempool_uaf_helper+0x392/0x400
[   27.465573]  __asan_report_load1_noabort+0x18/0x20
[   27.465599]  mempool_uaf_helper+0x392/0x400
[   27.465622]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   27.465646]  ? dequeue_entities+0x23f/0x1630
[   27.465672]  ? __kasan_check_write+0x18/0x20
[   27.465697]  ? __pfx_sched_clock_cpu+0x10/0x10
[   27.465719]  ? finish_task_switch.isra.0+0x153/0x700
[   27.465747]  mempool_page_alloc_uaf+0xed/0x140
[   27.465772]  ? __pfx_mempool_page_alloc_uaf+0x10/0x10
[   27.465848]  ? __pfx_mempool_alloc_pages+0x10/0x10
[   27.465874]  ? __pfx_mempool_free_pages+0x10/0x10
[   27.465901]  ? __pfx_read_tsc+0x10/0x10
[   27.465925]  ? ktime_get_ts64+0x86/0x230
[   27.465962]  kunit_try_run_case+0x1a5/0x480
[   27.465988]  ? __pfx_kunit_try_run_case+0x10/0x10
[   27.466013]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   27.466037]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   27.466070]  ? __kthread_parkme+0x82/0x180
[   27.466092]  ? preempt_count_sub+0x50/0x80
[   27.466116]  ? __pfx_kunit_try_run_case+0x10/0x10
[   27.466141]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   27.466166]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   27.466191]  kthread+0x337/0x6f0
[   27.466212]  ? trace_preempt_on+0x20/0xc0
[   27.466238]  ? __pfx_kthread+0x10/0x10
[   27.466259]  ? _raw_spin_unlock_irq+0x47/0x80
[   27.466284]  ? calculate_sigpending+0x7b/0xa0
[   27.466309]  ? __pfx_kthread+0x10/0x10
[   27.466331]  ret_from_fork+0x116/0x1d0
[   27.466352]  ? __pfx_kthread+0x10/0x10
[   27.466373]  ret_from_fork_asm+0x1a/0x30
[   27.466408]  </TASK>
[   27.466421] 
[   27.478995] The buggy address belongs to the physical page:
[   27.479365] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106370
[   27.479625] flags: 0x200000000000000(node=0|zone=2)
[   27.479826] raw: 0200000000000000 0000000000000000 dead000000000122 0000000000000000
[   27.480288] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   27.480626] page dumped because: kasan: bad access detected
[   27.480919] 
[   27.481000] Memory state around the buggy address:
[   27.481448]  ffff88810636ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.481718]  ffff88810636ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.482306] >ffff888106370000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.482601]                    ^
[   27.482759]  ffff888106370080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.483165]  ffff888106370100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.483441] ==================================================================
[   27.378707] ==================================================================
[   27.379614] BUG: KASAN: use-after-free in mempool_uaf_helper+0x392/0x400
[   27.380417] Read of size 1 at addr ffff888106370000 by task kunit_try_catch/278
[   27.381339] 
[   27.381661] CPU: 0 UID: 0 PID: 278 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7-next-20250725 #1 PREEMPT(voluntary) 
[   27.381719] Tainted: [B]=BAD_PAGE, [N]=TEST
[   27.381733] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   27.381757] Call Trace:
[   27.381771]  <TASK>
[   27.381789]  dump_stack_lvl+0x73/0xb0
[   27.381822]  print_report+0xd1/0x640
[   27.381848]  ? __virt_addr_valid+0x1db/0x2d0
[   27.381874]  ? mempool_uaf_helper+0x392/0x400
[   27.381897]  ? kasan_addr_to_slab+0x11/0xa0
[   27.381919]  ? mempool_uaf_helper+0x392/0x400
[   27.381954]  kasan_report+0x141/0x180
[   27.381978]  ? mempool_uaf_helper+0x392/0x400
[   27.382034]  __asan_report_load1_noabort+0x18/0x20
[   27.382227]  mempool_uaf_helper+0x392/0x400
[   27.382258]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   27.382287]  ? finish_task_switch.isra.0+0x153/0x700
[   27.382317]  mempool_kmalloc_large_uaf+0xef/0x140
[   27.382342]  ? __pfx_mempool_kmalloc_large_uaf+0x10/0x10
[   27.382369]  ? __pfx_mempool_kmalloc+0x10/0x10
[   27.382394]  ? __pfx_mempool_kfree+0x10/0x10
[   27.382420]  ? __pfx_read_tsc+0x10/0x10
[   27.382443]  ? ktime_get_ts64+0x86/0x230
[   27.382469]  kunit_try_run_case+0x1a5/0x480
[   27.382495]  ? __pfx_kunit_try_run_case+0x10/0x10
[   27.382520]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   27.382544]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   27.382572]  ? __kthread_parkme+0x82/0x180
[   27.382596]  ? preempt_count_sub+0x50/0x80
[   27.382621]  ? __pfx_kunit_try_run_case+0x10/0x10
[   27.382646]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   27.382672]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   27.382698]  kthread+0x337/0x6f0
[   27.382719]  ? trace_preempt_on+0x20/0xc0
[   27.382744]  ? __pfx_kthread+0x10/0x10
[   27.382766]  ? _raw_spin_unlock_irq+0x47/0x80
[   27.382813]  ? calculate_sigpending+0x7b/0xa0
[   27.382839]  ? __pfx_kthread+0x10/0x10
[   27.382861]  ret_from_fork+0x116/0x1d0
[   27.382882]  ? __pfx_kthread+0x10/0x10
[   27.382903]  ret_from_fork_asm+0x1a/0x30
[   27.382936]  </TASK>
[   27.382957] 
[   27.398400] The buggy address belongs to the physical page:
[   27.398655] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106370
[   27.399400] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   27.399905] flags: 0x200000000000040(head|node=0|zone=2)
[   27.400387] page_type: f8(unknown)
[   27.400812] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   27.401466] raw: 0000000000000000 0000000000000000 00000000f8000000 0000000000000000
[   27.402008] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   27.402503] head: 0000000000000000 0000000000000000 00000000f8000000 0000000000000000
[   27.402886] head: 0200000000000002 ffffea000418dc01 00000000ffffffff 00000000ffffffff
[   27.403522] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   27.404209] page dumped because: kasan: bad access detected
[   27.404613] 
[   27.404712] Memory state around the buggy address:
[   27.405290]  ffff88810636ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.405606]  ffff88810636ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.406250] >ffff888106370000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.406706]                    ^
[   27.407233]  ffff888106370080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.407651]  ffff888106370100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.408145] ==================================================================