Hay
Date
May 13, 2025, 12:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   21.121378] ==================================================================
[   21.122260] BUG: KASAN: use-after-free in mempool_uaf_helper+0x314/0x340
[   21.122400] Read of size 1 at addr fff00000c78b4000 by task kunit_try_catch/229
[   21.122941] 
[   21.123050] CPU: 1 UID: 0 PID: 229 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc6-next-20250513 #1 PREEMPT 
[   21.123288] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.123379] Hardware name: linux,dummy-virt (DT)
[   21.123444] Call trace:
[   21.123676]  show_stack+0x20/0x38 (C)
[   21.124040]  dump_stack_lvl+0x8c/0xd0
[   21.124297]  print_report+0x118/0x608
[   21.124523]  kasan_report+0xdc/0x128
[   21.124617]  __asan_report_load1_noabort+0x20/0x30
[   21.125027]  mempool_uaf_helper+0x314/0x340
[   21.125126]  mempool_kmalloc_large_uaf+0xc4/0x120
[   21.125201]  kunit_try_run_case+0x170/0x3f0
[   21.125264]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.125322]  kthread+0x328/0x630
[   21.125374]  ret_from_fork+0x10/0x20
[   21.125694] 
[   21.126195] The buggy address belongs to the physical page:
[   21.126247] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1078b4
[   21.126317] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   21.126369] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   21.126706] page_type: f8(unknown)
[   21.126773] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   21.126842] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   21.126902] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   21.127328] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   21.127688] head: 0bfffe0000000002 ffffc1ffc31e2d01 00000000ffffffff 00000000ffffffff
[   21.127771] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   21.127820] page dumped because: kasan: bad access detected
[   21.127863] 
[   21.128193] Memory state around the buggy address:
[   21.128408]  fff00000c78b3f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   21.128608]  fff00000c78b3f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   21.128664] >fff00000c78b4000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   21.128904]                    ^
[   21.129081]  fff00000c78b4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   21.129137]  fff00000c78b4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   21.129182] ==================================================================
[   21.182145] ==================================================================
[   21.182388] BUG: KASAN: use-after-free in mempool_uaf_helper+0x314/0x340
[   21.182773] Read of size 1 at addr fff00000c78b4000 by task kunit_try_catch/233
[   21.183013] 
[   21.183083] CPU: 1 UID: 0 PID: 233 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc6-next-20250513 #1 PREEMPT 
[   21.183203] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.183235] Hardware name: linux,dummy-virt (DT)
[   21.183276] Call trace:
[   21.183309]  show_stack+0x20/0x38 (C)
[   21.183534]  dump_stack_lvl+0x8c/0xd0
[   21.183739]  print_report+0x118/0x608
[   21.184080]  kasan_report+0xdc/0x128
[   21.184264]  __asan_report_load1_noabort+0x20/0x30
[   21.184553]  mempool_uaf_helper+0x314/0x340
[   21.184694]  mempool_page_alloc_uaf+0xc0/0x118
[   21.184888]  kunit_try_run_case+0x170/0x3f0
[   21.185135]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.185218]  kthread+0x328/0x630
[   21.185283]  ret_from_fork+0x10/0x20
[   21.185784] 
[   21.185834] The buggy address belongs to the physical page:
[   21.185943] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1078b4
[   21.186181] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   21.186399] raw: 0bfffe0000000000 0000000000000000 dead000000000122 0000000000000000
[   21.186639] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   21.186748] page dumped because: kasan: bad access detected
[   21.186933] 
[   21.187042] Memory state around the buggy address:
[   21.187086]  fff00000c78b3f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   21.187150]  fff00000c78b3f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   21.187330] >fff00000c78b4000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   21.187391]                    ^
[   21.187431]  fff00000c78b4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   21.187577]  fff00000c78b4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   21.187781] ==================================================================

[   12.712843] ==================================================================
[   12.713939] BUG: KASAN: use-after-free in mempool_uaf_helper+0x392/0x400
[   12.714789] Read of size 1 at addr ffff88810397c000 by task kunit_try_catch/250
[   12.715019] 
[   12.715111] CPU: 0 UID: 0 PID: 250 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc6-next-20250513 #1 PREEMPT(voluntary) 
[   12.715160] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.715173] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.715194] Call Trace:
[   12.715206]  <TASK>
[   12.715223]  dump_stack_lvl+0x73/0xb0
[   12.715254]  print_report+0xd1/0x650
[   12.715276]  ? __virt_addr_valid+0x1db/0x2d0
[   12.715299]  ? mempool_uaf_helper+0x392/0x400
[   12.715322]  ? kasan_addr_to_slab+0x11/0xa0
[   12.715343]  ? mempool_uaf_helper+0x392/0x400
[   12.715366]  kasan_report+0x141/0x180
[   12.715389]  ? mempool_uaf_helper+0x392/0x400
[   12.715418]  __asan_report_load1_noabort+0x18/0x20
[   12.715438]  mempool_uaf_helper+0x392/0x400
[   12.715462]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   12.715487]  ? __pfx_sched_clock_cpu+0x10/0x10
[   12.715510]  ? finish_task_switch.isra.0+0x153/0x700
[   12.715716]  mempool_page_alloc_uaf+0xed/0x140
[   12.715743]  ? __pfx_mempool_page_alloc_uaf+0x10/0x10
[   12.715772]  ? __pfx_mempool_alloc_pages+0x10/0x10
[   12.715794]  ? __pfx_mempool_free_pages+0x10/0x10
[   12.715817]  ? __pfx_read_tsc+0x10/0x10
[   12.715839]  ? ktime_get_ts64+0x86/0x230
[   12.715864]  kunit_try_run_case+0x1a5/0x480
[   12.715889]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.715911]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.715935]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.715958]  ? __kthread_parkme+0x82/0x180
[   12.715979]  ? preempt_count_sub+0x50/0x80
[   12.716002]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.716025]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.716049]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.716071]  kthread+0x337/0x6f0
[   12.716091]  ? trace_preempt_on+0x20/0xc0
[   12.716116]  ? __pfx_kthread+0x10/0x10
[   12.716137]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.716157]  ? calculate_sigpending+0x7b/0xa0
[   12.716205]  ? __pfx_kthread+0x10/0x10
[   12.716228]  ret_from_fork+0x116/0x1d0
[   12.716247]  ? __pfx_kthread+0x10/0x10
[   12.716268]  ret_from_fork_asm+0x1a/0x30
[   12.716300]  </TASK>
[   12.716312] 
[   12.731798] The buggy address belongs to the physical page:
[   12.732328] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10397c
[   12.733006] flags: 0x200000000000000(node=0|zone=2)
[   12.733199] raw: 0200000000000000 0000000000000000 dead000000000122 0000000000000000
[   12.733984] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   12.734758] page dumped because: kasan: bad access detected
[   12.734934] 
[   12.735006] Memory state around the buggy address:
[   12.735161]  ffff88810397bf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.736060]  ffff88810397bf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.736803] >ffff88810397c000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.737599]                    ^
[   12.737999]  ffff88810397c080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.738369]  ffff88810397c100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.739106] ==================================================================
[   12.647224] ==================================================================
[   12.647714] BUG: KASAN: use-after-free in mempool_uaf_helper+0x392/0x400
[   12.648021] Read of size 1 at addr ffff888102ab8000 by task kunit_try_catch/246
[   12.648514] 
[   12.648647] CPU: 1 UID: 0 PID: 246 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc6-next-20250513 #1 PREEMPT(voluntary) 
[   12.648698] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.648710] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.648733] Call Trace:
[   12.648746]  <TASK>
[   12.648762]  dump_stack_lvl+0x73/0xb0
[   12.648792]  print_report+0xd1/0x650
[   12.648815]  ? __virt_addr_valid+0x1db/0x2d0
[   12.648840]  ? mempool_uaf_helper+0x392/0x400
[   12.648862]  ? kasan_addr_to_slab+0x11/0xa0
[   12.648884]  ? mempool_uaf_helper+0x392/0x400
[   12.648906]  kasan_report+0x141/0x180
[   12.648930]  ? mempool_uaf_helper+0x392/0x400
[   12.648958]  __asan_report_load1_noabort+0x18/0x20
[   12.648979]  mempool_uaf_helper+0x392/0x400
[   12.649004]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   12.649030]  ? __pfx_sched_clock_cpu+0x10/0x10
[   12.649052]  ? finish_task_switch.isra.0+0x153/0x700
[   12.649080]  mempool_kmalloc_large_uaf+0xef/0x140
[   12.649104]  ? __pfx_mempool_kmalloc_large_uaf+0x10/0x10
[   12.649132]  ? __pfx_mempool_kmalloc+0x10/0x10
[   12.649152]  ? __pfx_mempool_kfree+0x10/0x10
[   12.649177]  ? __pfx_read_tsc+0x10/0x10
[   12.649200]  ? ktime_get_ts64+0x86/0x230
[   12.649229]  kunit_try_run_case+0x1a5/0x480
[   12.649256]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.649278]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.649302]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.649327]  ? __kthread_parkme+0x82/0x180
[   12.649348]  ? preempt_count_sub+0x50/0x80
[   12.649373]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.649397]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.649420]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.649445]  kthread+0x337/0x6f0
[   12.649465]  ? trace_preempt_on+0x20/0xc0
[   12.649490]  ? __pfx_kthread+0x10/0x10
[   12.649512]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.649532]  ? calculate_sigpending+0x7b/0xa0
[   12.649557]  ? __pfx_kthread+0x10/0x10
[   12.649580]  ret_from_fork+0x116/0x1d0
[   12.649599]  ? __pfx_kthread+0x10/0x10
[   12.649629]  ret_from_fork_asm+0x1a/0x30
[   12.649661]  </TASK>
[   12.649673] 
[   12.659587] The buggy address belongs to the physical page:
[   12.659873] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102ab8
[   12.660537] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   12.660865] flags: 0x200000000000040(head|node=0|zone=2)
[   12.661189] page_type: f8(unknown)
[   12.661523] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   12.661925] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   12.662339] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   12.662777] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   12.663234] head: 0200000000000002 ffffea00040aae01 00000000ffffffff 00000000ffffffff
[   12.663669] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   12.664056] page dumped because: kasan: bad access detected
[   12.664376] 
[   12.664458] Memory state around the buggy address:
[   12.664847]  ffff888102ab7f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.665298]  ffff888102ab7f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.665601] >ffff888102ab8000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.665924]                    ^
[   12.666084]  ffff888102ab8080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.666658]  ffff888102ab8100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   12.667029] ==================================================================