Hay
Date
July 23, 2025, 2:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   17.502562] ==================================================================
[   17.502636] BUG: KASAN: use-after-free in mempool_uaf_helper+0x314/0x340
[   17.502739] Read of size 1 at addr fff00000c77ac000 by task kunit_try_catch/233
[   17.502890] 
[   17.502954] CPU: 0 UID: 0 PID: 233 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7 #1 PREEMPT 
[   17.503041] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.503067] Hardware name: linux,dummy-virt (DT)
[   17.503099] Call trace:
[   17.503121]  show_stack+0x20/0x38 (C)
[   17.503526]  dump_stack_lvl+0x8c/0xd0
[   17.503678]  print_report+0x118/0x5d0
[   17.503822]  kasan_report+0xdc/0x128
[   17.503966]  __asan_report_load1_noabort+0x20/0x30
[   17.504088]  mempool_uaf_helper+0x314/0x340
[   17.504222]  mempool_page_alloc_uaf+0xc0/0x118
[   17.504290]  kunit_try_run_case+0x170/0x3f0
[   17.504684]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.504862]  kthread+0x328/0x630
[   17.504928]  ret_from_fork+0x10/0x20
[   17.505024] 
[   17.505348] The buggy address belongs to the physical page:
[   17.505449] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1077ac
[   17.505638] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.505794] raw: 0bfffe0000000000 0000000000000000 dead000000000122 0000000000000000
[   17.505949] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   17.506027] page dumped because: kasan: bad access detected
[   17.506125] 
[   17.506143] Memory state around the buggy address:
[   17.506176]  fff00000c77abf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.506676]  fff00000c77abf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.506777] >fff00000c77ac000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.506930]                    ^
[   17.507009]  fff00000c77ac080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.507080]  fff00000c77ac100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.507201] ==================================================================
[   17.469740] ==================================================================
[   17.469803] BUG: KASAN: use-after-free in mempool_uaf_helper+0x314/0x340
[   17.469868] Read of size 1 at addr fff00000c77ac000 by task kunit_try_catch/229
[   17.469921] 
[   17.469952] CPU: 0 UID: 0 PID: 229 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7 #1 PREEMPT 
[   17.470037] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.470065] Hardware name: linux,dummy-virt (DT)
[   17.470097] Call trace:
[   17.470504]  show_stack+0x20/0x38 (C)
[   17.470674]  dump_stack_lvl+0x8c/0xd0
[   17.470745]  print_report+0x118/0x5d0
[   17.470828]  kasan_report+0xdc/0x128
[   17.470956]  __asan_report_load1_noabort+0x20/0x30
[   17.471049]  mempool_uaf_helper+0x314/0x340
[   17.471097]  mempool_kmalloc_large_uaf+0xc4/0x120
[   17.471146]  kunit_try_run_case+0x170/0x3f0
[   17.471193]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.471439]  kthread+0x328/0x630
[   17.471548]  ret_from_fork+0x10/0x20
[   17.471707] 
[   17.471741] The buggy address belongs to the physical page:
[   17.471783] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1077ac
[   17.471872] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   17.471921] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   17.472197] page_type: f8(unknown)
[   17.472279] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   17.472333] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   17.472445] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   17.472496] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   17.472548] head: 0bfffe0000000002 ffffc1ffc31deb01 00000000ffffffff 00000000ffffffff
[   17.472767] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   17.472928] page dumped because: kasan: bad access detected
[   17.473017] 
[   17.473123] Memory state around the buggy address:
[   17.473175]  fff00000c77abf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.473256]  fff00000c77abf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.473617] >fff00000c77ac000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.473733]                    ^
[   17.473803]  fff00000c77ac080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.473848]  fff00000c77ac100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.474182] ==================================================================

[   14.201572] ==================================================================
[   14.202402] BUG: KASAN: use-after-free in mempool_uaf_helper+0x392/0x400
[   14.202738] Read of size 1 at addr ffff888103a74000 by task kunit_try_catch/250
[   14.203042] 
[   14.203848] CPU: 1 UID: 0 PID: 250 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7 #1 PREEMPT(voluntary) 
[   14.203899] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.204025] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.204053] Call Trace:
[   14.204065]  <TASK>
[   14.204081]  dump_stack_lvl+0x73/0xb0
[   14.204128]  print_report+0xd1/0x610
[   14.204151]  ? __virt_addr_valid+0x1db/0x2d0
[   14.204207]  ? mempool_uaf_helper+0x392/0x400
[   14.204312]  ? kasan_addr_to_slab+0x11/0xa0
[   14.204334]  ? mempool_uaf_helper+0x392/0x400
[   14.204356]  kasan_report+0x141/0x180
[   14.204377]  ? mempool_uaf_helper+0x392/0x400
[   14.204404]  __asan_report_load1_noabort+0x18/0x20
[   14.204428]  mempool_uaf_helper+0x392/0x400
[   14.204450]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   14.204473]  ? __kasan_check_write+0x18/0x20
[   14.204493]  ? __pfx_sched_clock_cpu+0x10/0x10
[   14.204513]  ? irqentry_exit+0x2a/0x60
[   14.204536]  ? sysvec_apic_timer_interrupt+0x50/0x90
[   14.204562]  mempool_page_alloc_uaf+0xed/0x140
[   14.204585]  ? __pfx_mempool_page_alloc_uaf+0x10/0x10
[   14.204611]  ? __pfx_mempool_alloc_pages+0x10/0x10
[   14.204636]  ? __pfx_mempool_free_pages+0x10/0x10
[   14.204660]  ? __pfx_mempool_page_alloc_uaf+0x10/0x10
[   14.204686]  ? __pfx_mempool_page_alloc_uaf+0x10/0x10
[   14.204710]  kunit_try_run_case+0x1a5/0x480
[   14.204735]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.204757]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   14.204780]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.204803]  ? __kthread_parkme+0x82/0x180
[   14.204839]  ? preempt_count_sub+0x50/0x80
[   14.204866]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.204891]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.204913]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.204937]  kthread+0x337/0x6f0
[   14.204956]  ? trace_preempt_on+0x20/0xc0
[   14.204978]  ? __pfx_kthread+0x10/0x10
[   14.204998]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.205020]  ? calculate_sigpending+0x7b/0xa0
[   14.205042]  ? __pfx_kthread+0x10/0x10
[   14.205065]  ret_from_fork+0x116/0x1d0
[   14.205084]  ? __pfx_kthread+0x10/0x10
[   14.205105]  ret_from_fork_asm+0x1a/0x30
[   14.205135]  </TASK>
[   14.205145] 
[   14.219515] The buggy address belongs to the physical page:
[   14.219929] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103a74
[   14.220767] flags: 0x200000000000000(node=0|zone=2)
[   14.221034] raw: 0200000000000000 0000000000000000 dead000000000122 0000000000000000
[   14.221666] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   14.222001] page dumped because: kasan: bad access detected
[   14.222749] 
[   14.223012] Memory state around the buggy address:
[   14.223509]  ffff888103a73f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.223961]  ffff888103a73f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.224697] >ffff888103a74000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.225382]                    ^
[   14.225558]  ffff888103a74080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.225865]  ffff888103a74100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.226527] ==================================================================
[   14.134009] ==================================================================
[   14.135617] BUG: KASAN: use-after-free in mempool_uaf_helper+0x392/0x400
[   14.136821] Read of size 1 at addr ffff888103a74000 by task kunit_try_catch/246
[   14.137061] 
[   14.137533] CPU: 1 UID: 0 PID: 246 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7 #1 PREEMPT(voluntary) 
[   14.137729] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.137780] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.137804] Call Trace:
[   14.137827]  <TASK>
[   14.137843]  dump_stack_lvl+0x73/0xb0
[   14.137876]  print_report+0xd1/0x610
[   14.137900]  ? __virt_addr_valid+0x1db/0x2d0
[   14.137922]  ? mempool_uaf_helper+0x392/0x400
[   14.137943]  ? kasan_addr_to_slab+0x11/0xa0
[   14.137964]  ? mempool_uaf_helper+0x392/0x400
[   14.137986]  kasan_report+0x141/0x180
[   14.138008]  ? mempool_uaf_helper+0x392/0x400
[   14.138034]  __asan_report_load1_noabort+0x18/0x20
[   14.138057]  mempool_uaf_helper+0x392/0x400
[   14.138104]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   14.138129]  ? __pfx_sched_clock_cpu+0x10/0x10
[   14.138151]  ? finish_task_switch.isra.0+0x153/0x700
[   14.138176]  mempool_kmalloc_large_uaf+0xef/0x140
[   14.138216]  ? __pfx_mempool_kmalloc_large_uaf+0x10/0x10
[   14.138242]  ? __pfx_mempool_kmalloc+0x10/0x10
[   14.138265]  ? __pfx_mempool_kfree+0x10/0x10
[   14.138290]  ? __pfx_read_tsc+0x10/0x10
[   14.138310]  ? ktime_get_ts64+0x86/0x230
[   14.138333]  kunit_try_run_case+0x1a5/0x480
[   14.138359]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.138381]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   14.138404]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.138428]  ? __kthread_parkme+0x82/0x180
[   14.138447]  ? preempt_count_sub+0x50/0x80
[   14.138470]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.138493]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.138516]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.138539]  kthread+0x337/0x6f0
[   14.138558]  ? trace_preempt_on+0x20/0xc0
[   14.138581]  ? __pfx_kthread+0x10/0x10
[   14.138601]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.138623]  ? calculate_sigpending+0x7b/0xa0
[   14.138647]  ? __pfx_kthread+0x10/0x10
[   14.138669]  ret_from_fork+0x116/0x1d0
[   14.138687]  ? __pfx_kthread+0x10/0x10
[   14.138707]  ret_from_fork_asm+0x1a/0x30
[   14.138737]  </TASK>
[   14.138748] 
[   14.155502] The buggy address belongs to the physical page:
[   14.155914] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103a74
[   14.156449] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   14.156728] flags: 0x200000000000040(head|node=0|zone=2)
[   14.157216] page_type: f8(unknown)
[   14.157610] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   14.158057] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   14.158651] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   14.159188] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   14.159608] head: 0200000000000002 ffffea00040e9d01 00000000ffffffff 00000000ffffffff
[   14.159955] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   14.160548] page dumped because: kasan: bad access detected
[   14.160830] 
[   14.160935] Memory state around the buggy address:
[   14.161272]  ffff888103a73f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.161609]  ffff888103a73f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.161954] >ffff888103a74000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.162378]                    ^
[   14.162584]  ffff888103a74080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.162913]  ffff888103a74100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   14.163315] ==================================================================