Hay
Date
July 20, 2025, 11:12 a.m.

Environment
qemu-arm64
qemu-x86_64

[   17.387785] ==================================================================
[   17.387878] BUG: KASAN: use-after-free in mempool_uaf_helper+0x314/0x340
[   17.387938] Read of size 1 at addr fff00000c7898000 by task kunit_try_catch/233
[   17.387988] 
[   17.388024] CPU: 0 UID: 0 PID: 233 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   17.388306] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.388405] Hardware name: linux,dummy-virt (DT)
[   17.388574] Call trace:
[   17.388659]  show_stack+0x20/0x38 (C)
[   17.388786]  dump_stack_lvl+0x8c/0xd0
[   17.388834]  print_report+0x118/0x5d0
[   17.388881]  kasan_report+0xdc/0x128
[   17.388925]  __asan_report_load1_noabort+0x20/0x30
[   17.388980]  mempool_uaf_helper+0x314/0x340
[   17.389034]  mempool_page_alloc_uaf+0xc0/0x118
[   17.389271]  kunit_try_run_case+0x170/0x3f0
[   17.389474]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.389602]  kthread+0x328/0x630
[   17.389644]  ret_from_fork+0x10/0x20
[   17.390073] 
[   17.390109] The buggy address belongs to the physical page:
[   17.390389] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107898
[   17.390679] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.390745] raw: 0bfffe0000000000 0000000000000000 dead000000000122 0000000000000000
[   17.390796] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   17.390945] page dumped because: kasan: bad access detected
[   17.391261] 
[   17.391418] Memory state around the buggy address:
[   17.391454]  fff00000c7897f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.391592]  fff00000c7897f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.391692] >fff00000c7898000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.391778]                    ^
[   17.391821]  fff00000c7898080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.391943]  fff00000c7898100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.391986] ==================================================================
[   17.345874] ==================================================================
[   17.345953] BUG: KASAN: use-after-free in mempool_uaf_helper+0x314/0x340
[   17.346017] Read of size 1 at addr fff00000c7898000 by task kunit_try_catch/229
[   17.346068] 
[   17.346106] CPU: 0 UID: 0 PID: 229 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   17.346192] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.346220] Hardware name: linux,dummy-virt (DT)
[   17.346253] Call trace:
[   17.346277]  show_stack+0x20/0x38 (C)
[   17.346327]  dump_stack_lvl+0x8c/0xd0
[   17.346375]  print_report+0x118/0x5d0
[   17.346423]  kasan_report+0xdc/0x128
[   17.346468]  __asan_report_load1_noabort+0x20/0x30
[   17.346519]  mempool_uaf_helper+0x314/0x340
[   17.346564]  mempool_kmalloc_large_uaf+0xc4/0x120
[   17.346613]  kunit_try_run_case+0x170/0x3f0
[   17.346675]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.346728]  kthread+0x328/0x630
[   17.346771]  ret_from_fork+0x10/0x20
[   17.346819] 
[   17.346841] The buggy address belongs to the physical page:
[   17.346876] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107898
[   17.346932] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   17.346980] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   17.347065] page_type: f8(unknown)
[   17.347128] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   17.347177] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   17.347228] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   17.347276] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   17.347324] head: 0bfffe0000000002 ffffc1ffc31e2601 00000000ffffffff 00000000ffffffff
[   17.347373] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   17.347414] page dumped because: kasan: bad access detected
[   17.347446] 
[   17.347464] Memory state around the buggy address:
[   17.347496]  fff00000c7897f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.347537]  fff00000c7897f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.347579] >fff00000c7898000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.347617]                    ^
[   17.347646]  fff00000c7898080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.347697]  fff00000c7898100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.347736] ==================================================================

[   13.856070] ==================================================================
[   13.856576] BUG: KASAN: use-after-free in mempool_uaf_helper+0x392/0x400
[   13.857041] Read of size 1 at addr ffff888103ac0000 by task kunit_try_catch/246
[   13.857267] 
[   13.857411] CPU: 1 UID: 0 PID: 246 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   13.857458] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.857470] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.857492] Call Trace:
[   13.857506]  <TASK>
[   13.857521]  dump_stack_lvl+0x73/0xb0
[   13.857550]  print_report+0xd1/0x610
[   13.857571]  ? __virt_addr_valid+0x1db/0x2d0
[   13.857592]  ? mempool_uaf_helper+0x392/0x400
[   13.857614]  ? kasan_addr_to_slab+0x11/0xa0
[   13.857633]  ? mempool_uaf_helper+0x392/0x400
[   13.857654]  kasan_report+0x141/0x180
[   13.857676]  ? mempool_uaf_helper+0x392/0x400
[   13.857702]  __asan_report_load1_noabort+0x18/0x20
[   13.857725]  mempool_uaf_helper+0x392/0x400
[   13.857748]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   13.857768]  ? update_load_avg+0x1be/0x21b0
[   13.857791]  ? dequeue_entities+0x27e/0x1740
[   13.857830]  ? finish_task_switch.isra.0+0x153/0x700
[   13.857855]  mempool_kmalloc_large_uaf+0xef/0x140
[   13.857876]  ? __pfx_mempool_kmalloc_large_uaf+0x10/0x10
[   13.857902]  ? __pfx_mempool_kmalloc+0x10/0x10
[   13.857936]  ? __pfx_mempool_kfree+0x10/0x10
[   13.857960]  ? __pfx_read_tsc+0x10/0x10
[   13.857980]  ? ktime_get_ts64+0x86/0x230
[   13.858004]  kunit_try_run_case+0x1a5/0x480
[   13.858027]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.858048]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.858071]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.858092]  ? __kthread_parkme+0x82/0x180
[   13.858112]  ? preempt_count_sub+0x50/0x80
[   13.858133]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.858156]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.858178]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.858200]  kthread+0x337/0x6f0
[   13.858219]  ? trace_preempt_on+0x20/0xc0
[   13.858241]  ? __pfx_kthread+0x10/0x10
[   13.858260]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.858281]  ? calculate_sigpending+0x7b/0xa0
[   13.858303]  ? __pfx_kthread+0x10/0x10
[   13.858323]  ret_from_fork+0x116/0x1d0
[   13.858341]  ? __pfx_kthread+0x10/0x10
[   13.858410]  ret_from_fork_asm+0x1a/0x30
[   13.858439]  </TASK>
[   13.858449] 
[   13.872256] The buggy address belongs to the physical page:
[   13.872504] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103ac0
[   13.872867] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   13.873126] flags: 0x200000000000040(head|node=0|zone=2)
[   13.873383] page_type: f8(unknown)
[   13.873552] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   13.873872] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   13.874174] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   13.874478] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   13.874740] head: 0200000000000002 ffffea00040eb001 00000000ffffffff 00000000ffffffff
[   13.874980] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   13.875318] page dumped because: kasan: bad access detected
[   13.875787] 
[   13.875881] Memory state around the buggy address:
[   13.876050]  ffff888103abff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.876421]  ffff888103abff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.876810] >ffff888103ac0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.877094]                    ^
[   13.877244]  ffff888103ac0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.877629]  ffff888103ac0100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.877954] ==================================================================
[   13.914047] ==================================================================
[   13.914464] BUG: KASAN: use-after-free in mempool_uaf_helper+0x392/0x400
[   13.914865] Read of size 1 at addr ffff888102b8c000 by task kunit_try_catch/250
[   13.915319] 
[   13.915747] CPU: 0 UID: 0 PID: 250 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   13.915808] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.915819] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.915841] Call Trace:
[   13.915853]  <TASK>
[   13.915868]  dump_stack_lvl+0x73/0xb0
[   13.915900]  print_report+0xd1/0x610
[   13.915934]  ? __virt_addr_valid+0x1db/0x2d0
[   13.915957]  ? mempool_uaf_helper+0x392/0x400
[   13.915978]  ? kasan_addr_to_slab+0x11/0xa0
[   13.915998]  ? mempool_uaf_helper+0x392/0x400
[   13.916021]  kasan_report+0x141/0x180
[   13.916042]  ? mempool_uaf_helper+0x392/0x400
[   13.916070]  __asan_report_load1_noabort+0x18/0x20
[   13.916093]  mempool_uaf_helper+0x392/0x400
[   13.916115]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   13.916138]  ? __kasan_check_write+0x18/0x20
[   13.916156]  ? __pfx_sched_clock_cpu+0x10/0x10
[   13.916178]  ? finish_task_switch.isra.0+0x153/0x700
[   13.916203]  mempool_page_alloc_uaf+0xed/0x140
[   13.916226]  ? __pfx_mempool_page_alloc_uaf+0x10/0x10
[   13.916251]  ? __pfx_mempool_alloc_pages+0x10/0x10
[   13.916275]  ? __pfx_mempool_free_pages+0x10/0x10
[   13.916300]  ? __pfx_read_tsc+0x10/0x10
[   13.916320]  ? ktime_get_ts64+0x86/0x230
[   13.916343]  kunit_try_run_case+0x1a5/0x480
[   13.916367]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.916388]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.916411]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.916434]  ? __kthread_parkme+0x82/0x180
[   13.916453]  ? preempt_count_sub+0x50/0x80
[   13.916474]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.916497]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.916520]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.916542]  kthread+0x337/0x6f0
[   13.916560]  ? trace_preempt_on+0x20/0xc0
[   13.916583]  ? __pfx_kthread+0x10/0x10
[   13.916602]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.916623]  ? calculate_sigpending+0x7b/0xa0
[   13.916646]  ? __pfx_kthread+0x10/0x10
[   13.916666]  ret_from_fork+0x116/0x1d0
[   13.916684]  ? __pfx_kthread+0x10/0x10
[   13.916703]  ret_from_fork_asm+0x1a/0x30
[   13.916733]  </TASK>
[   13.916743] 
[   13.925418] The buggy address belongs to the physical page:
[   13.925693] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b8c
[   13.926037] flags: 0x200000000000000(node=0|zone=2)
[   13.926223] raw: 0200000000000000 0000000000000000 dead000000000122 0000000000000000
[   13.926828] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   13.927131] page dumped because: kasan: bad access detected
[   13.927347] 
[   13.927443] Memory state around the buggy address:
[   13.927639]  ffff888102b8bf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.927963]  ffff888102b8bf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.928223] >ffff888102b8c000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.928503]                    ^
[   13.928655]  ffff888102b8c080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.929035]  ffff888102b8c100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.929258] ==================================================================