Hay
Date
July 1, 2025, 11:08 a.m.

Environment
qemu-arm64
qemu-x86_64

[   20.635312] ==================================================================
[   20.635989] BUG: KASAN: use-after-free in mempool_uaf_helper+0x314/0x340
[   20.636195] Read of size 1 at addr fff00000c784c000 by task kunit_try_catch/230
[   20.636343] 
[   20.636399] CPU: 0 UID: 0 PID: 230 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   20.636493] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.636525] Hardware name: linux,dummy-virt (DT)
[   20.636565] Call trace:
[   20.636592]  show_stack+0x20/0x38 (C)
[   20.636743]  dump_stack_lvl+0x8c/0xd0
[   20.636799]  print_report+0x118/0x608
[   20.636850]  kasan_report+0xdc/0x128
[   20.637056]  __asan_report_load1_noabort+0x20/0x30
[   20.637206]  mempool_uaf_helper+0x314/0x340
[   20.637258]  mempool_kmalloc_large_uaf+0xc4/0x120
[   20.637320]  kunit_try_run_case+0x170/0x3f0
[   20.637374]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.637581]  kthread+0x328/0x630
[   20.637708]  ret_from_fork+0x10/0x20
[   20.637812] 
[   20.637915] The buggy address belongs to the physical page:
[   20.637956] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10784c
[   20.638081] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   20.638155] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   20.638240] page_type: f8(unknown)
[   20.638293] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   20.638771] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   20.638936] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   20.639065] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   20.639304] head: 0bfffe0000000002 ffffc1ffc31e1301 00000000ffffffff 00000000ffffffff
[   20.639438] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   20.639656] page dumped because: kasan: bad access detected
[   20.639700] 
[   20.639722] Memory state around the buggy address:
[   20.639802]  fff00000c784bf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.639997]  fff00000c784bf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.640252] >fff00000c784c000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.640377]                    ^
[   20.640564]  fff00000c784c080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.640647]  fff00000c784c100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.640926] ==================================================================
[   20.710584] ==================================================================
[   20.710709] BUG: KASAN: use-after-free in mempool_uaf_helper+0x314/0x340
[   20.710911] Read of size 1 at addr fff00000c784c000 by task kunit_try_catch/234
[   20.711025] 
[   20.711439] CPU: 0 UID: 0 PID: 234 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   20.711656] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.711833] Hardware name: linux,dummy-virt (DT)
[   20.711938] Call trace:
[   20.712098]  show_stack+0x20/0x38 (C)
[   20.712353]  dump_stack_lvl+0x8c/0xd0
[   20.712728]  print_report+0x118/0x608
[   20.712934]  kasan_report+0xdc/0x128
[   20.713219]  __asan_report_load1_noabort+0x20/0x30
[   20.713476]  mempool_uaf_helper+0x314/0x340
[   20.713701]  mempool_page_alloc_uaf+0xc0/0x118
[   20.714097]  kunit_try_run_case+0x170/0x3f0
[   20.714325]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.714492]  kthread+0x328/0x630
[   20.714563]  ret_from_fork+0x10/0x20
[   20.715039] 
[   20.715101] The buggy address belongs to the physical page:
[   20.715190] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10784c
[   20.715399] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   20.715604] raw: 0bfffe0000000000 0000000000000000 dead000000000122 0000000000000000
[   20.715682] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   20.715730] page dumped because: kasan: bad access detected
[   20.715902] 
[   20.715926] Memory state around the buggy address:
[   20.716361]  fff00000c784bf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.716496]  fff00000c784bf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.716685] >fff00000c784c000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.716871]                    ^
[   20.716975]  fff00000c784c080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.717031]  fff00000c784c100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   20.717220] ==================================================================

[   13.067672] ==================================================================
[   13.068160] BUG: KASAN: use-after-free in mempool_uaf_helper+0x392/0x400
[   13.068488] Read of size 1 at addr ffff888102bfc000 by task kunit_try_catch/246
[   13.068793] 
[   13.068912] CPU: 0 UID: 0 PID: 246 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   13.068960] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.068972] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.068995] Call Trace:
[   13.069009]  <TASK>
[   13.069026]  dump_stack_lvl+0x73/0xb0
[   13.069054]  print_report+0xd1/0x650
[   13.069077]  ? __virt_addr_valid+0x1db/0x2d0
[   13.069099]  ? mempool_uaf_helper+0x392/0x400
[   13.069120]  ? kasan_addr_to_slab+0x11/0xa0
[   13.069142]  ? mempool_uaf_helper+0x392/0x400
[   13.069163]  kasan_report+0x141/0x180
[   13.069184]  ? mempool_uaf_helper+0x392/0x400
[   13.069210]  __asan_report_load1_noabort+0x18/0x20
[   13.069234]  mempool_uaf_helper+0x392/0x400
[   13.069256]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   13.069279]  ? __pfx_sched_clock_cpu+0x10/0x10
[   13.069300]  ? finish_task_switch.isra.0+0x153/0x700
[   13.069324]  mempool_kmalloc_large_uaf+0xef/0x140
[   13.069346]  ? __pfx_mempool_kmalloc_large_uaf+0x10/0x10
[   13.069371]  ? __pfx_mempool_kmalloc+0x10/0x10
[   13.070614]  ? __pfx_mempool_kfree+0x10/0x10
[   13.070643]  ? __pfx_read_tsc+0x10/0x10
[   13.070666]  ? ktime_get_ts64+0x86/0x230
[   13.070690]  kunit_try_run_case+0x1a5/0x480
[   13.070716]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.070738]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.070763]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.070786]  ? __kthread_parkme+0x82/0x180
[   13.070806]  ? preempt_count_sub+0x50/0x80
[   13.070828]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.070851]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.070874]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.070897]  kthread+0x337/0x6f0
[   13.070926]  ? trace_preempt_on+0x20/0xc0
[   13.070950]  ? __pfx_kthread+0x10/0x10
[   13.070970]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.070990]  ? calculate_sigpending+0x7b/0xa0
[   13.071013]  ? __pfx_kthread+0x10/0x10
[   13.071033]  ret_from_fork+0x116/0x1d0
[   13.071051]  ? __pfx_kthread+0x10/0x10
[   13.071072]  ret_from_fork_asm+0x1a/0x30
[   13.071103]  </TASK>
[   13.071115] 
[   13.088023] The buggy address belongs to the physical page:
[   13.088403] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102bfc
[   13.088693] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   13.089451] flags: 0x200000000000040(head|node=0|zone=2)
[   13.090005] page_type: f8(unknown)
[   13.090458] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   13.091264] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   13.091710] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   13.092146] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   13.092401] head: 0200000000000002 ffffea00040aff01 00000000ffffffff 00000000ffffffff
[   13.092646] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   13.093110] page dumped because: kasan: bad access detected
[   13.093326] 
[   13.093438] Memory state around the buggy address:
[   13.093673]  ffff888102bfbf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.093997]  ffff888102bfbf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.094232] >ffff888102bfc000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.094514]                    ^
[   13.094632]  ffff888102bfc080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.095092]  ffff888102bfc100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.095363] ==================================================================
[   13.137894] ==================================================================
[   13.138317] BUG: KASAN: use-after-free in mempool_uaf_helper+0x392/0x400
[   13.138586] Read of size 1 at addr ffff888103980000 by task kunit_try_catch/250
[   13.139639] 
[   13.139843] CPU: 0 UID: 0 PID: 250 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   13.139894] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.139907] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.139929] Call Trace:
[   13.139942]  <TASK>
[   13.139963]  dump_stack_lvl+0x73/0xb0
[   13.139996]  print_report+0xd1/0x650
[   13.140020]  ? __virt_addr_valid+0x1db/0x2d0
[   13.140045]  ? mempool_uaf_helper+0x392/0x400
[   13.140067]  ? kasan_addr_to_slab+0x11/0xa0
[   13.140087]  ? mempool_uaf_helper+0x392/0x400
[   13.140109]  kasan_report+0x141/0x180
[   13.140130]  ? mempool_uaf_helper+0x392/0x400
[   13.140156]  __asan_report_load1_noabort+0x18/0x20
[   13.140180]  mempool_uaf_helper+0x392/0x400
[   13.140202]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   13.140225]  ? __kasan_check_write+0x18/0x20
[   13.140243]  ? __pfx_sched_clock_cpu+0x10/0x10
[   13.140266]  ? finish_task_switch.isra.0+0x153/0x700
[   13.140292]  mempool_page_alloc_uaf+0xed/0x140
[   13.140314]  ? __pfx_mempool_page_alloc_uaf+0x10/0x10
[   13.140341]  ? __pfx_mempool_alloc_pages+0x10/0x10
[   13.140362]  ? __pfx_mempool_free_pages+0x10/0x10
[   13.140403]  ? __pfx_read_tsc+0x10/0x10
[   13.140425]  ? ktime_get_ts64+0x86/0x230
[   13.140449]  kunit_try_run_case+0x1a5/0x480
[   13.140476]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.140498]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.140522]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.140544]  ? __kthread_parkme+0x82/0x180
[   13.140566]  ? preempt_count_sub+0x50/0x80
[   13.140588]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.140610]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.140632]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.140656]  kthread+0x337/0x6f0
[   13.140675]  ? trace_preempt_on+0x20/0xc0
[   13.140698]  ? __pfx_kthread+0x10/0x10
[   13.140718]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.140738]  ? calculate_sigpending+0x7b/0xa0
[   13.140761]  ? __pfx_kthread+0x10/0x10
[   13.140782]  ret_from_fork+0x116/0x1d0
[   13.140799]  ? __pfx_kthread+0x10/0x10
[   13.140818]  ret_from_fork_asm+0x1a/0x30
[   13.140876]  </TASK>
[   13.140889] 
[   13.156455] The buggy address belongs to the physical page:
[   13.157020] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103980
[   13.157274] flags: 0x200000000000000(node=0|zone=2)
[   13.157470] raw: 0200000000000000 0000000000000000 dead000000000122 0000000000000000
[   13.157897] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   13.158673] page dumped because: kasan: bad access detected
[   13.159256] 
[   13.159534] Memory state around the buggy address:
[   13.159999]  ffff88810397ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.160707]  ffff88810397ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.161424] >ffff888103980000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.161831]                    ^
[   13.162021]  ffff888103980080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.162670]  ffff888103980100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   13.163289] ==================================================================