Hay
Date
July 17, 2025, 10:12 a.m.

Environment
qemu-arm64
qemu-x86_64

[   31.722641] ==================================================================
[   31.722978] BUG: KASAN: use-after-free in mempool_uaf_helper+0x314/0x340
[   31.723179] Read of size 1 at addr fff00000c9bd4000 by task kunit_try_catch/264
[   31.723324] 
[   31.723408] CPU: 0 UID: 0 PID: 264 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250717 #1 PREEMPT 
[   31.723499] Tainted: [B]=BAD_PAGE, [N]=TEST
[   31.723783] Hardware name: linux,dummy-virt (DT)
[   31.723912] Call trace:
[   31.723942]  show_stack+0x20/0x38 (C)
[   31.723999]  dump_stack_lvl+0x8c/0xd0
[   31.724192]  print_report+0x118/0x5d0
[   31.724254]  kasan_report+0xdc/0x128
[   31.724298]  __asan_report_load1_noabort+0x20/0x30
[   31.724534]  mempool_uaf_helper+0x314/0x340
[   31.724660]  mempool_page_alloc_uaf+0xc0/0x118
[   31.724813]  kunit_try_run_case+0x170/0x3f0
[   31.724929]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   31.724985]  kthread+0x328/0x630
[   31.725362]  ret_from_fork+0x10/0x20
[   31.725638] 
[   31.725696] The buggy address belongs to the physical page:
[   31.725830] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109bd4
[   31.725916] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   31.726040] raw: 0bfffe0000000000 0000000000000000 dead000000000122 0000000000000000
[   31.726435] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   31.726555] page dumped because: kasan: bad access detected
[   31.726658] 
[   31.726694] Memory state around the buggy address:
[   31.726741]  fff00000c9bd3f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   31.726817]  fff00000c9bd3f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   31.726860] >fff00000c9bd4000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   31.726897]                    ^
[   31.726925]  fff00000c9bd4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   31.726976]  fff00000c9bd4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   31.727014] ==================================================================
[   31.662738] ==================================================================
[   31.662804] BUG: KASAN: use-after-free in mempool_uaf_helper+0x314/0x340
[   31.662857] Read of size 1 at addr fff00000c9bd0000 by task kunit_try_catch/260
[   31.662905] 
[   31.662934] CPU: 0 UID: 0 PID: 260 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250717 #1 PREEMPT 
[   31.663020] Tainted: [B]=BAD_PAGE, [N]=TEST
[   31.663048] Hardware name: linux,dummy-virt (DT)
[   31.663096] Call trace:
[   31.663117]  show_stack+0x20/0x38 (C)
[   31.663167]  dump_stack_lvl+0x8c/0xd0
[   31.663217]  print_report+0x118/0x5d0
[   31.663261]  kasan_report+0xdc/0x128
[   31.663304]  __asan_report_load1_noabort+0x20/0x30
[   31.663351]  mempool_uaf_helper+0x314/0x340
[   31.663398]  mempool_kmalloc_large_uaf+0xc4/0x120
[   31.663465]  kunit_try_run_case+0x170/0x3f0
[   31.663527]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   31.663579]  kthread+0x328/0x630
[   31.663620]  ret_from_fork+0x10/0x20
[   31.663665] 
[   31.663702] The buggy address belongs to the physical page:
[   31.663739] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109bd0
[   31.663791] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   31.663845] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   31.663898] page_type: f8(unknown)
[   31.663950] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   31.663999] raw: 0000000000000000 0000000000000000 00000000f8000000 0000000000000000
[   31.664050] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   31.664869] head: 0000000000000000 0000000000000000 00000000f8000000 0000000000000000
[   31.664950] head: 0bfffe0000000002 ffffc1ffc326f401 00000000ffffffff 00000000ffffffff
[   31.665033] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   31.665085] page dumped because: kasan: bad access detected
[   31.665117] 
[   31.665136] Memory state around the buggy address:
[   31.665464]  fff00000c9bcff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   31.665725]  fff00000c9bcff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   31.665884] >fff00000c9bd0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   31.666334]                    ^
[   31.666403]  fff00000c9bd0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   31.666869]  fff00000c9bd0100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   31.667226] ==================================================================

[   27.188525] ==================================================================
[   27.190286] BUG: KASAN: use-after-free in mempool_uaf_helper+0x392/0x400
[   27.191610] Read of size 1 at addr ffff8881060ac000 by task kunit_try_catch/278
[   27.191997] 
[   27.192100] CPU: 1 UID: 0 PID: 278 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250717 #1 PREEMPT(voluntary) 
[   27.192150] Tainted: [B]=BAD_PAGE, [N]=TEST
[   27.192163] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   27.192183] Call Trace:
[   27.192196]  <TASK>
[   27.192210]  dump_stack_lvl+0x73/0xb0
[   27.192240]  print_report+0xd1/0x610
[   27.192261]  ? __virt_addr_valid+0x1db/0x2d0
[   27.192285]  ? mempool_uaf_helper+0x392/0x400
[   27.192306]  ? kasan_addr_to_slab+0x11/0xa0
[   27.192325]  ? mempool_uaf_helper+0x392/0x400
[   27.192706]  kasan_report+0x141/0x180
[   27.192730]  ? mempool_uaf_helper+0x392/0x400
[   27.192758]  __asan_report_load1_noabort+0x18/0x20
[   27.192781]  mempool_uaf_helper+0x392/0x400
[   27.192803]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   27.192826]  ? update_load_avg+0x1be/0x21b0
[   27.192847]  ? update_curr+0x7d/0x7f0
[   27.192869]  ? finish_task_switch.isra.0+0x153/0x700
[   27.192895]  mempool_kmalloc_large_uaf+0xef/0x140
[   27.192919]  ? __pfx_mempool_kmalloc_large_uaf+0x10/0x10
[   27.192945]  ? __pfx_mempool_kmalloc+0x10/0x10
[   27.192967]  ? __pfx_mempool_kfree+0x10/0x10
[   27.192992]  ? __pfx_read_tsc+0x10/0x10
[   27.193012]  ? ktime_get_ts64+0x86/0x230
[   27.193038]  kunit_try_run_case+0x1a5/0x480
[   27.193061]  ? __pfx_kunit_try_run_case+0x10/0x10
[   27.193094]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   27.193117]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   27.193140]  ? __kthread_parkme+0x82/0x180
[   27.193164]  ? preempt_count_sub+0x50/0x80
[   27.193186]  ? __pfx_kunit_try_run_case+0x10/0x10
[   27.193209]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   27.193231]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   27.193308]  kthread+0x337/0x6f0
[   27.193327]  ? trace_preempt_on+0x20/0xc0
[   27.193350]  ? __pfx_kthread+0x10/0x10
[   27.193370]  ? _raw_spin_unlock_irq+0x47/0x80
[   27.193392]  ? calculate_sigpending+0x7b/0xa0
[   27.193415]  ? __pfx_kthread+0x10/0x10
[   27.193435]  ret_from_fork+0x116/0x1d0
[   27.193453]  ? __pfx_kthread+0x10/0x10
[   27.193473]  ret_from_fork_asm+0x1a/0x30
[   27.193504]  </TASK>
[   27.193514] 
[   27.204531] The buggy address belongs to the physical page:
[   27.204770] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1060ac
[   27.205121] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   27.205757] flags: 0x200000000000040(head|node=0|zone=2)
[   27.205981] page_type: f8(unknown)
[   27.206172] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   27.207002] raw: 0000000000000000 0000000000000000 00000000f8000000 0000000000000000
[   27.207458] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   27.207761] head: 0000000000000000 0000000000000000 00000000f8000000 0000000000000000
[   27.208435] head: 0200000000000002 ffffea0004182b01 00000000ffffffff 00000000ffffffff
[   27.209190] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   27.209910] page dumped because: kasan: bad access detected
[   27.210401] 
[   27.210475] Memory state around the buggy address:
[   27.210630]  ffff8881060abf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.210843]  ffff8881060abf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.211052] >ffff8881060ac000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.211286]                    ^
[   27.211397]  ffff8881060ac080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.212195]  ffff8881060ac100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.212671] ==================================================================
[   27.258184] ==================================================================
[   27.259184] BUG: KASAN: use-after-free in mempool_uaf_helper+0x392/0x400
[   27.259782] Read of size 1 at addr ffff8881060ac000 by task kunit_try_catch/282
[   27.260122] 
[   27.260204] CPU: 1 UID: 0 PID: 282 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250717 #1 PREEMPT(voluntary) 
[   27.260255] Tainted: [B]=BAD_PAGE, [N]=TEST
[   27.260267] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   27.260288] Call Trace:
[   27.260301]  <TASK>
[   27.260318]  dump_stack_lvl+0x73/0xb0
[   27.260348]  print_report+0xd1/0x610
[   27.260370]  ? __virt_addr_valid+0x1db/0x2d0
[   27.260394]  ? mempool_uaf_helper+0x392/0x400
[   27.260415]  ? kasan_addr_to_slab+0x11/0xa0
[   27.260435]  ? mempool_uaf_helper+0x392/0x400
[   27.260456]  kasan_report+0x141/0x180
[   27.260478]  ? mempool_uaf_helper+0x392/0x400
[   27.260504]  __asan_report_load1_noabort+0x18/0x20
[   27.260527]  mempool_uaf_helper+0x392/0x400
[   27.260550]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   27.260575]  ? dequeue_entities+0x23f/0x1630
[   27.260598]  ? __kasan_check_write+0x18/0x20
[   27.260621]  ? __pfx_sched_clock_cpu+0x10/0x10
[   27.260641]  ? finish_task_switch.isra.0+0x153/0x700
[   27.260666]  mempool_page_alloc_uaf+0xed/0x140
[   27.260689]  ? __pfx_mempool_page_alloc_uaf+0x10/0x10
[   27.260715]  ? __pfx_mempool_alloc_pages+0x10/0x10
[   27.260737]  ? __pfx_mempool_free_pages+0x10/0x10
[   27.260812]  ? __pfx_read_tsc+0x10/0x10
[   27.260834]  ? ktime_get_ts64+0x86/0x230
[   27.260883]  kunit_try_run_case+0x1a5/0x480
[   27.260908]  ? __pfx_kunit_try_run_case+0x10/0x10
[   27.260930]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   27.260953]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   27.260975]  ? __kthread_parkme+0x82/0x180
[   27.260999]  ? preempt_count_sub+0x50/0x80
[   27.261021]  ? __pfx_kunit_try_run_case+0x10/0x10
[   27.261044]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   27.261067]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   27.261099]  kthread+0x337/0x6f0
[   27.261118]  ? trace_preempt_on+0x20/0xc0
[   27.261140]  ? __pfx_kthread+0x10/0x10
[   27.261160]  ? _raw_spin_unlock_irq+0x47/0x80
[   27.261181]  ? calculate_sigpending+0x7b/0xa0
[   27.261204]  ? __pfx_kthread+0x10/0x10
[   27.261225]  ret_from_fork+0x116/0x1d0
[   27.261244]  ? __pfx_kthread+0x10/0x10
[   27.261263]  ret_from_fork_asm+0x1a/0x30
[   27.261295]  </TASK>
[   27.261306] 
[   27.277972] The buggy address belongs to the physical page:
[   27.278162] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1060ac
[   27.278818] flags: 0x200000000000000(node=0|zone=2)
[   27.279350] raw: 0200000000000000 0000000000000000 dead000000000122 0000000000000000
[   27.280149] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   27.280828] page dumped because: kasan: bad access detected
[   27.281335] 
[   27.281519] Memory state around the buggy address:
[   27.281794]  ffff8881060abf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.282012]  ffff8881060abf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.282236] >ffff8881060ac000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.282728]                    ^
[   27.282902]  ffff8881060ac080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.283324]  ffff8881060ac100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.283566] ==================================================================