Hay
Date
June 3, 2025, 7:38 a.m.

Environment
qemu-arm64
qemu-x86_64

[   20.455523] ==================================================================
[   20.455589] BUG: KASAN: use-after-free in mempool_uaf_helper+0x314/0x340
[   20.455777] Read of size 1 at addr fff00000c79a8000 by task kunit_try_catch/233
[   20.455830] 
[   20.455867] CPU: 1 UID: 0 PID: 233 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250603 #1 PREEMPT 
[   20.456046] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.456206] Hardware name: linux,dummy-virt (DT)
[   20.456286] Call trace:
[   20.456352]  show_stack+0x20/0x38 (C)
[   20.456901]  dump_stack_lvl+0x8c/0xd0
[   20.456962]  print_report+0x118/0x608
[   20.457009]  kasan_report+0xdc/0x128
[   20.457056]  __asan_report_load1_noabort+0x20/0x30
[   20.457109]  mempool_uaf_helper+0x314/0x340
[   20.457155]  mempool_page_alloc_uaf+0xc0/0x118
[   20.457204]  kunit_try_run_case+0x170/0x3f0
[   20.457256]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.457308]  kthread+0x328/0x630
[   20.457352]  ret_from_fork+0x10/0x20
[   20.457403] 
[   20.457437] The buggy address belongs to the physical page:
[   20.457587] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1079a8
[   20.457735] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   20.457813] raw: 0bfffe0000000000 0000000000000000 dead000000000122 0000000000000000
[   20.457865] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   20.457915] page dumped because: kasan: bad access detected
[   20.457953] 
[   20.457971] Memory state around the buggy address:
[   20.458004]  fff00000c79a7f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.458055]  fff00000c79a7f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.458097] >fff00000c79a8000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.458135]                    ^
[   20.458162]  fff00000c79a8080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.458211]  fff00000c79a8100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.458250] ==================================================================
[   20.421241] ==================================================================
[   20.421300] BUG: KASAN: use-after-free in mempool_uaf_helper+0x314/0x340
[   20.421355] Read of size 1 at addr fff00000c79a8000 by task kunit_try_catch/229
[   20.421405] 
[   20.421469] CPU: 1 UID: 0 PID: 229 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250603 #1 PREEMPT 
[   20.421556] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.421583] Hardware name: linux,dummy-virt (DT)
[   20.421614] Call trace:
[   20.421636]  show_stack+0x20/0x38 (C)
[   20.421694]  dump_stack_lvl+0x8c/0xd0
[   20.421751]  print_report+0x118/0x608
[   20.421799]  kasan_report+0xdc/0x128
[   20.421844]  __asan_report_load1_noabort+0x20/0x30
[   20.421892]  mempool_uaf_helper+0x314/0x340
[   20.421938]  mempool_kmalloc_large_uaf+0xc4/0x120
[   20.421986]  kunit_try_run_case+0x170/0x3f0
[   20.422042]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.422096]  kthread+0x328/0x630
[   20.422137]  ret_from_fork+0x10/0x20
[   20.422185] 
[   20.422204] The buggy address belongs to the physical page:
[   20.422244] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1079a8
[   20.422296] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   20.422341] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   20.422393] page_type: f8(unknown)
[   20.423051] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   20.423141] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   20.423198] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   20.423252] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   20.423307] head: 0bfffe0000000002 ffffc1ffc31e6a01 00000000ffffffff 00000000ffffffff
[   20.423384] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   20.423441] page dumped because: kasan: bad access detected
[   20.423482] 
[   20.423596] Memory state around the buggy address:
[   20.423636]  fff00000c79a7f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.423709]  fff00000c79a7f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.423752] >fff00000c79a8000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.423789]                    ^
[   20.423815]  fff00000c79a8080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.423857]  fff00000c79a8100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.423895] ==================================================================


[   16.369927] ==================================================================
[   16.370502] BUG: KASAN: use-after-free in mempool_uaf_helper+0x392/0x400
[   16.371730] Read of size 1 at addr ffff888102ad0000 by task kunit_try_catch/246
[   16.373264] 
[   16.373437] CPU: 0 UID: 0 PID: 246 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250603 #1 PREEMPT(voluntary) 
[   16.373534] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.373558] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   16.373599] Call Trace:
[   16.373622]  <TASK>
[   16.373660]  dump_stack_lvl+0x73/0xb0
[   16.373730]  print_report+0xd1/0x650
[   16.373776]  ? __virt_addr_valid+0x1db/0x2d0
[   16.373822]  ? mempool_uaf_helper+0x392/0x400
[   16.373947]  ? kasan_addr_to_slab+0x11/0xa0
[   16.374010]  ? mempool_uaf_helper+0x392/0x400
[   16.374052]  kasan_report+0x141/0x180
[   16.374094]  ? mempool_uaf_helper+0x392/0x400
[   16.374137]  __asan_report_load1_noabort+0x18/0x20
[   16.374175]  mempool_uaf_helper+0x392/0x400
[   16.374225]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   16.374266]  ? __kasan_check_write+0x18/0x20
[   16.374301]  ? __pfx_sched_clock_cpu+0x10/0x10
[   16.374344]  ? finish_task_switch.isra.0+0x153/0x700
[   16.374390]  mempool_kmalloc_large_uaf+0xef/0x140
[   16.374436]  ? __pfx_mempool_kmalloc_large_uaf+0x10/0x10
[   16.374506]  ? __pfx_mempool_kmalloc+0x10/0x10
[   16.374552]  ? __pfx_mempool_kfree+0x10/0x10
[   16.374591]  ? __pfx_read_tsc+0x10/0x10
[   16.374667]  ? ktime_get_ts64+0x86/0x230
[   16.374707]  kunit_try_run_case+0x1a5/0x480
[   16.374756]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.374790]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   16.374845]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   16.374892]  ? __kthread_parkme+0x82/0x180
[   16.374936]  ? preempt_count_sub+0x50/0x80
[   16.374981]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.375021]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.375065]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   16.375111]  kthread+0x337/0x6f0
[   16.375153]  ? trace_preempt_on+0x20/0xc0
[   16.375200]  ? __pfx_kthread+0x10/0x10
[   16.375249]  ? _raw_spin_unlock_irq+0x47/0x80
[   16.375296]  ? calculate_sigpending+0x7b/0xa0
[   16.375373]  ? __pfx_kthread+0x10/0x10
[   16.375422]  ret_from_fork+0x116/0x1d0
[   16.375484]  ? __pfx_kthread+0x10/0x10
[   16.375518]  ret_from_fork_asm+0x1a/0x30
[   16.375574]  </TASK>
[   16.375590] 
[   16.392742] The buggy address belongs to the physical page:
[   16.393640] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102ad0
[   16.394249] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   16.394854] flags: 0x200000000000040(head|node=0|zone=2)
[   16.396026] page_type: f8(unknown)
[   16.396702] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   16.397084] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   16.397788] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   16.398384] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   16.399172] head: 0200000000000002 ffffea00040ab401 00000000ffffffff 00000000ffffffff
[   16.399647] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   16.400846] page dumped because: kasan: bad access detected
[   16.401067] 
[   16.401596] Memory state around the buggy address:
[   16.402197]  ffff888102acff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.402938]  ffff888102acff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.403478] >ffff888102ad0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.404154]                    ^
[   16.404348]  ffff888102ad0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.405582]  ffff888102ad0100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.406182] ==================================================================
[   16.478290] ==================================================================
[   16.478739] BUG: KASAN: use-after-free in mempool_uaf_helper+0x392/0x400
[   16.478944] Read of size 1 at addr ffff888102ad4000 by task kunit_try_catch/250
[   16.479934] 
[   16.480043] CPU: 0 UID: 0 PID: 250 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250603 #1 PREEMPT(voluntary) 
[   16.480109] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.480125] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   16.480153] Call Trace:
[   16.480172]  <TASK>
[   16.480199]  dump_stack_lvl+0x73/0xb0
[   16.480241]  print_report+0xd1/0x650
[   16.480268]  ? __virt_addr_valid+0x1db/0x2d0
[   16.480296]  ? mempool_uaf_helper+0x392/0x400
[   16.480322]  ? kasan_addr_to_slab+0x11/0xa0
[   16.480345]  ? mempool_uaf_helper+0x392/0x400
[   16.480370]  kasan_report+0x141/0x180
[   16.480547]  ? mempool_uaf_helper+0x392/0x400
[   16.480587]  __asan_report_load1_noabort+0x18/0x20
[   16.480612]  mempool_uaf_helper+0x392/0x400
[   16.480639]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   16.480667]  ? __kasan_check_write+0x18/0x20
[   16.480808]  ? __pfx_sched_clock_cpu+0x10/0x10
[   16.480845]  ? irqentry_exit+0x2a/0x60
[   16.480872]  ? sysvec_apic_timer_interrupt+0x50/0x90
[   16.480905]  mempool_page_alloc_uaf+0xed/0x140
[   16.480933]  ? __pfx_mempool_page_alloc_uaf+0x10/0x10
[   16.480966]  ? __pfx_mempool_alloc_pages+0x10/0x10
[   16.480994]  ? __pfx_mempool_free_pages+0x10/0x10
[   16.481020]  ? __pfx_mempool_page_alloc_uaf+0x10/0x10
[   16.481053]  ? __pfx_mempool_page_alloc_uaf+0x10/0x10
[   16.481122]  kunit_try_run_case+0x1a5/0x480
[   16.481154]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.481178]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   16.481237]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   16.481270]  ? __kthread_parkme+0x82/0x180
[   16.481315]  ? preempt_count_sub+0x50/0x80
[   16.481350]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.481376]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.481413]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   16.481447]  kthread+0x337/0x6f0
[   16.481500]  ? trace_preempt_on+0x20/0xc0
[   16.481534]  ? __pfx_kthread+0x10/0x10
[   16.481563]  ? _raw_spin_unlock_irq+0x47/0x80
[   16.481597]  ? calculate_sigpending+0x7b/0xa0
[   16.481632]  ? __pfx_kthread+0x10/0x10
[   16.481661]  ret_from_fork+0x116/0x1d0
[   16.482160]  ? __pfx_kthread+0x10/0x10
[   16.482250]  ret_from_fork_asm+0x1a/0x30
[   16.482299]  </TASK>
[   16.482315] 
[   16.494680] The buggy address belongs to the physical page:
[   16.495064] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102ad4
[   16.495262] flags: 0x200000000000000(node=0|zone=2)
[   16.495741] raw: 0200000000000000 0000000000000000 dead000000000122 0000000000000000
[   16.496511] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   16.497012] page dumped because: kasan: bad access detected
[   16.497263] 
[   16.497558] Memory state around the buggy address:
[   16.497837]  ffff888102ad3f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.498308]  ffff888102ad3f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.498497] >ffff888102ad4000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.498939]                    ^
[   16.499205]  ffff888102ad4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.499690]  ffff888102ad4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.500542] ==================================================================