Hay
Date
July 8, 2025, 4:38 p.m.

Environment
qemu-arm64
qemu-x86_64

[   19.847495] ==================================================================
[   19.847556] BUG: KASAN: slab-use-after-free in mempool_uaf_helper+0x314/0x340
[   19.847610] Read of size 1 at addr fff00000c6e6c240 by task kunit_try_catch/233
[   19.847676] 
[   19.847710] CPU: 0 UID: 0 PID: 233 Comm: kunit_try_catch Tainted: G    B            N  6.15.6-rc1 #1 PREEMPT 
[   19.847790] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.847817] Hardware name: linux,dummy-virt (DT)
[   19.847847] Call trace:
[   19.847870]  show_stack+0x20/0x38 (C)
[   19.847918]  dump_stack_lvl+0x8c/0xd0
[   19.847984]  print_report+0x118/0x608
[   19.848030]  kasan_report+0xdc/0x128
[   19.848072]  __asan_report_load1_noabort+0x20/0x30
[   19.848127]  mempool_uaf_helper+0x314/0x340
[   19.848174]  mempool_slab_uaf+0xc0/0x118
[   19.848225]  kunit_try_run_case+0x170/0x3f0
[   19.848274]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.848329]  kthread+0x328/0x630
[   19.848388]  ret_from_fork+0x10/0x20
[   19.848450] 
[   19.848469] Allocated by task 233:
[   19.848497]  kasan_save_stack+0x3c/0x68
[   19.848534]  kasan_save_track+0x20/0x40
[   19.848571]  kasan_save_alloc_info+0x40/0x58
[   19.848616]  __kasan_mempool_unpoison_object+0xbc/0x180
[   19.848659]  remove_element+0x16c/0x1f8
[   19.848705]  mempool_alloc_preallocated+0x58/0xc0
[   19.848747]  mempool_uaf_helper+0xa4/0x340
[   19.848785]  mempool_slab_uaf+0xc0/0x118
[   19.848820]  kunit_try_run_case+0x170/0x3f0
[   19.848857]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.848909]  kthread+0x328/0x630
[   19.848944]  ret_from_fork+0x10/0x20
[   19.848980] 
[   19.849006] Freed by task 233:
[   19.849031]  kasan_save_stack+0x3c/0x68
[   19.849067]  kasan_save_track+0x20/0x40
[   19.849101]  kasan_save_free_info+0x4c/0x78
[   19.849139]  __kasan_mempool_poison_object+0xc0/0x150
[   19.849177]  mempool_free+0x28c/0x328
[   19.849215]  mempool_uaf_helper+0x104/0x340
[   19.849254]  mempool_slab_uaf+0xc0/0x118
[   19.849288]  kunit_try_run_case+0x170/0x3f0
[   19.849347]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.849391]  kthread+0x328/0x630
[   19.849426]  ret_from_fork+0x10/0x20
[   19.849889] 
[   19.849926] The buggy address belongs to the object at fff00000c6e6c240
[   19.849926]  which belongs to the cache test_cache of size 123
[   19.850048] The buggy address is located 0 bytes inside of
[   19.850048]  freed 123-byte region [fff00000c6e6c240, fff00000c6e6c2bb)
[   19.850153] 
[   19.850181] The buggy address belongs to the physical page:
[   19.850212] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106e6c
[   19.850281] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.850396] page_type: f5(slab)
[   19.850458] raw: 0bfffe0000000000 fff00000ffe8e000 dead000000000122 0000000000000000
[   19.850508] raw: 0000000000000000 0000000080150015 00000000f5000000 0000000000000000
[   19.850547] page dumped because: kasan: bad access detected
[   19.850578] 
[   19.850595] Memory state around the buggy address:
[   19.850627]  fff00000c6e6c100: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   19.850790]  fff00000c6e6c180: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   19.850925] >fff00000c6e6c200: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
[   19.850994]                                            ^
[   19.851098]  fff00000c6e6c280: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   19.851186]  fff00000c6e6c300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.851255] ==================================================================
[   19.825412] ==================================================================
[   19.825493] BUG: KASAN: slab-use-after-free in mempool_uaf_helper+0x314/0x340
[   19.825575] Read of size 1 at addr fff00000c6369d00 by task kunit_try_catch/229
[   19.825627] 
[   19.825679] CPU: 0 UID: 0 PID: 229 Comm: kunit_try_catch Tainted: G    B            N  6.15.6-rc1 #1 PREEMPT 
[   19.825925] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.825991] Hardware name: linux,dummy-virt (DT)
[   19.826025] Call trace:
[   19.826048]  show_stack+0x20/0x38 (C)
[   19.826102]  dump_stack_lvl+0x8c/0xd0
[   19.826379]  print_report+0x118/0x608
[   19.826455]  kasan_report+0xdc/0x128
[   19.826520]  __asan_report_load1_noabort+0x20/0x30
[   19.826587]  mempool_uaf_helper+0x314/0x340
[   19.826653]  mempool_kmalloc_uaf+0xc4/0x120
[   19.826701]  kunit_try_run_case+0x170/0x3f0
[   19.826754]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.826807]  kthread+0x328/0x630
[   19.826994]  ret_from_fork+0x10/0x20
[   19.827076] 
[   19.827115] Allocated by task 229:
[   19.827178]  kasan_save_stack+0x3c/0x68
[   19.827226]  kasan_save_track+0x20/0x40
[   19.827262]  kasan_save_alloc_info+0x40/0x58
[   19.827318]  __kasan_mempool_unpoison_object+0x11c/0x180
[   19.827393]  remove_element+0x130/0x1f8
[   19.827433]  mempool_alloc_preallocated+0x58/0xc0
[   19.827475]  mempool_uaf_helper+0xa4/0x340
[   19.827512]  mempool_kmalloc_uaf+0xc4/0x120
[   19.827639]  kunit_try_run_case+0x170/0x3f0
[   19.827753]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.827834]  kthread+0x328/0x630
[   19.827890]  ret_from_fork+0x10/0x20
[   19.827926] 
[   19.827988] Freed by task 229:
[   19.828036]  kasan_save_stack+0x3c/0x68
[   19.828103]  kasan_save_track+0x20/0x40
[   19.828144]  kasan_save_free_info+0x4c/0x78
[   19.828182]  __kasan_mempool_poison_object+0xc0/0x150
[   19.828312]  mempool_free+0x28c/0x328
[   19.828531]  mempool_uaf_helper+0x104/0x340
[   19.828618]  mempool_kmalloc_uaf+0xc4/0x120
[   19.828696]  kunit_try_run_case+0x170/0x3f0
[   19.828771]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.828861]  kthread+0x328/0x630
[   19.828938]  ret_from_fork+0x10/0x20
[   19.828975] 
[   19.828998] The buggy address belongs to the object at fff00000c6369d00
[   19.828998]  which belongs to the cache kmalloc-128 of size 128
[   19.829058] The buggy address is located 0 bytes inside of
[   19.829058]  freed 128-byte region [fff00000c6369d00, fff00000c6369d80)
[   19.829307] 
[   19.829466] The buggy address belongs to the physical page:
[   19.829565] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106369
[   19.829659] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.829718] page_type: f5(slab)
[   19.829757] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   19.829845] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   19.829943] page dumped because: kasan: bad access detected
[   19.830010] 
[   19.830028] Memory state around the buggy address:
[   19.830061]  fff00000c6369c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   19.830318]  fff00000c6369c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.830450] >fff00000c6369d00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   19.830551]                    ^
[   19.830631]  fff00000c6369d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.830714]  fff00000c6369e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   19.830753] ==================================================================

[   12.907003] ==================================================================
[   12.907515] BUG: KASAN: slab-use-after-free in mempool_uaf_helper+0x392/0x400
[   12.907866] Read of size 1 at addr ffff8881029e6240 by task kunit_try_catch/251
[   12.908250] 
[   12.908385] CPU: 1 UID: 0 PID: 251 Comm: kunit_try_catch Tainted: G    B            N  6.15.6-rc1 #1 PREEMPT(voluntary) 
[   12.908448] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.908461] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.908486] Call Trace:
[   12.908500]  <TASK>
[   12.908527]  dump_stack_lvl+0x73/0xb0
[   12.908569]  print_report+0xd1/0x650
[   12.908593]  ? __virt_addr_valid+0x1db/0x2d0
[   12.908630]  ? mempool_uaf_helper+0x392/0x400
[   12.908653]  ? kasan_complete_mode_report_info+0x64/0x200
[   12.908676]  ? mempool_uaf_helper+0x392/0x400
[   12.908700]  kasan_report+0x141/0x180
[   12.908723]  ? mempool_uaf_helper+0x392/0x400
[   12.908750]  __asan_report_load1_noabort+0x18/0x20
[   12.908772]  mempool_uaf_helper+0x392/0x400
[   12.908797]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   12.908832]  ? finish_task_switch.isra.0+0x153/0x700
[   12.908863]  mempool_slab_uaf+0xea/0x140
[   12.908901]  ? __pfx_mempool_slab_uaf+0x10/0x10
[   12.908974]  ? __kasan_check_write+0x18/0x20
[   12.909001]  ? __pfx_mempool_alloc_slab+0x10/0x10
[   12.909026]  ? __pfx_mempool_free_slab+0x10/0x10
[   12.909049]  ? __pfx_read_tsc+0x10/0x10
[   12.909083]  ? ktime_get_ts64+0x86/0x230
[   12.909107]  ? sysvec_apic_timer_interrupt+0x50/0x90
[   12.909133]  kunit_try_run_case+0x1a5/0x480
[   12.909168]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.909190]  ? queued_spin_lock_slowpath+0x116/0xb40
[   12.909217]  ? __kthread_parkme+0x82/0x180
[   12.909241]  ? preempt_count_sub+0x50/0x80
[   12.909266]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.909287]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.909312]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.909336]  kthread+0x337/0x6f0
[   12.909354]  ? trace_preempt_on+0x20/0xc0
[   12.909379]  ? __pfx_kthread+0x10/0x10
[   12.909398]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.909421]  ? calculate_sigpending+0x7b/0xa0
[   12.909444]  ? __pfx_kthread+0x10/0x10
[   12.909463]  ret_from_fork+0x41/0x80
[   12.909484]  ? __pfx_kthread+0x10/0x10
[   12.909503]  ret_from_fork_asm+0x1a/0x30
[   12.909535]  </TASK>
[   12.909547] 
[   12.918244] Allocated by task 251:
[   12.918520]  kasan_save_stack+0x45/0x70
[   12.918779]  kasan_save_track+0x18/0x40
[   12.919217]  kasan_save_alloc_info+0x3b/0x50
[   12.919446]  __kasan_mempool_unpoison_object+0x1bb/0x200
[   12.919787]  remove_element+0x11e/0x190
[   12.920141]  mempool_alloc_preallocated+0x4d/0x90
[   12.920309]  mempool_uaf_helper+0x96/0x400
[   12.920505]  mempool_slab_uaf+0xea/0x140
[   12.920716]  kunit_try_run_case+0x1a5/0x480
[   12.920971]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.921244]  kthread+0x337/0x6f0
[   12.921371]  ret_from_fork+0x41/0x80
[   12.921530]  ret_from_fork_asm+0x1a/0x30
[   12.921736] 
[   12.921897] Freed by task 251:
[   12.922163]  kasan_save_stack+0x45/0x70
[   12.922429]  kasan_save_track+0x18/0x40
[   12.922742]  kasan_save_free_info+0x3f/0x60
[   12.923056]  __kasan_mempool_poison_object+0x131/0x1d0
[   12.923317]  mempool_free+0x2ec/0x380
[   12.923538]  mempool_uaf_helper+0x11a/0x400
[   12.923724]  mempool_slab_uaf+0xea/0x140
[   12.923865]  kunit_try_run_case+0x1a5/0x480
[   12.924029]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.924289]  kthread+0x337/0x6f0
[   12.924484]  ret_from_fork+0x41/0x80
[   12.924617]  ret_from_fork_asm+0x1a/0x30
[   12.924758] 
[   12.924962] The buggy address belongs to the object at ffff8881029e6240
[   12.924962]  which belongs to the cache test_cache of size 123
[   12.925559] The buggy address is located 0 bytes inside of
[   12.925559]  freed 123-byte region [ffff8881029e6240, ffff8881029e62bb)
[   12.926259] 
[   12.926377] The buggy address belongs to the physical page:
[   12.926934] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029e6
[   12.927282] flags: 0x200000000000000(node=0|zone=2)
[   12.927527] page_type: f5(slab)
[   12.927800] raw: 0200000000000000 ffff8881010b3780 dead000000000122 0000000000000000
[   12.928245] raw: 0000000000000000 0000000080150015 00000000f5000000 0000000000000000
[   12.928632] page dumped because: kasan: bad access detected
[   12.928943] 
[   12.929038] Memory state around the buggy address:
[   12.929201]  ffff8881029e6100: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   12.929419]  ffff8881029e6180: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.929762] >ffff8881029e6200: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
[   12.930088]                                            ^
[   12.930257]  ffff8881029e6280: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   12.930984]  ffff8881029e6300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.931406] ==================================================================
[   12.829715] ==================================================================
[   12.830397] BUG: KASAN: slab-use-after-free in mempool_uaf_helper+0x392/0x400
[   12.831653] Read of size 1 at addr ffff8881029cae00 by task kunit_try_catch/247
[   12.832605] 
[   12.832887] CPU: 1 UID: 0 PID: 247 Comm: kunit_try_catch Tainted: G    B            N  6.15.6-rc1 #1 PREEMPT(voluntary) 
[   12.832947] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.832960] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.832986] Call Trace:
[   12.833000]  <TASK>
[   12.833019]  dump_stack_lvl+0x73/0xb0
[   12.833051]  print_report+0xd1/0x650
[   12.833077]  ? __virt_addr_valid+0x1db/0x2d0
[   12.833101]  ? mempool_uaf_helper+0x392/0x400
[   12.833125]  ? kasan_complete_mode_report_info+0x64/0x200
[   12.833150]  ? mempool_uaf_helper+0x392/0x400
[   12.833174]  kasan_report+0x141/0x180
[   12.833198]  ? mempool_uaf_helper+0x392/0x400
[   12.833227]  __asan_report_load1_noabort+0x18/0x20
[   12.833249]  mempool_uaf_helper+0x392/0x400
[   12.833274]  ? __pfx_mempool_uaf_helper+0x10/0x10
[   12.833298]  ? dequeue_entities+0x852/0x1740
[   12.833326]  ? finish_task_switch.isra.0+0x153/0x700
[   12.833355]  mempool_kmalloc_uaf+0xef/0x140
[   12.833379]  ? __pfx_mempool_kmalloc_uaf+0x10/0x10
[   12.833404]  ? dequeue_task_fair+0x166/0x4e0
[   12.833427]  ? __pfx_mempool_kmalloc+0x10/0x10
[   12.833449]  ? __pfx_mempool_kfree+0x10/0x10
[   12.833473]  ? __pfx_read_tsc+0x10/0x10
[   12.833502]  ? ktime_get_ts64+0x86/0x230
[   12.833530]  kunit_try_run_case+0x1a5/0x480
[   12.833554]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.833574]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.833601]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.833626]  ? __kthread_parkme+0x82/0x180
[   12.833651]  ? preempt_count_sub+0x50/0x80
[   12.833677]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.833698]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.833723]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.833748]  kthread+0x337/0x6f0
[   12.833766]  ? trace_preempt_on+0x20/0xc0
[   12.833791]  ? __pfx_kthread+0x10/0x10
[   12.833810]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.833834]  ? calculate_sigpending+0x7b/0xa0
[   12.833857]  ? __pfx_kthread+0x10/0x10
[   12.833886]  ret_from_fork+0x41/0x80
[   12.833908]  ? __pfx_kthread+0x10/0x10
[   12.833926]  ret_from_fork_asm+0x1a/0x30
[   12.833960]  </TASK>
[   12.833972] 
[   12.848259] Allocated by task 247:
[   12.848404]  kasan_save_stack+0x45/0x70
[   12.848588]  kasan_save_track+0x18/0x40
[   12.848982]  kasan_save_alloc_info+0x3b/0x50
[   12.849454]  __kasan_mempool_unpoison_object+0x1a9/0x200
[   12.850131]  remove_element+0x11e/0x190
[   12.850633]  mempool_alloc_preallocated+0x4d/0x90
[   12.851165]  mempool_uaf_helper+0x96/0x400
[   12.851469]  mempool_kmalloc_uaf+0xef/0x140
[   12.851626]  kunit_try_run_case+0x1a5/0x480
[   12.851887]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.852073]  kthread+0x337/0x6f0
[   12.852197]  ret_from_fork+0x41/0x80
[   12.852332]  ret_from_fork_asm+0x1a/0x30
[   12.852476] 
[   12.852705] Freed by task 247:
[   12.853027]  kasan_save_stack+0x45/0x70
[   12.853381]  kasan_save_track+0x18/0x40
[   12.853720]  kasan_save_free_info+0x3f/0x60
[   12.854184]  __kasan_mempool_poison_object+0x131/0x1d0
[   12.855655]  mempool_free+0x2ec/0x380
[   12.856812]  mempool_uaf_helper+0x11a/0x400
[   12.857713]  mempool_kmalloc_uaf+0xef/0x140
[   12.857915]  kunit_try_run_case+0x1a5/0x480
[   12.858068]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.858245]  kthread+0x337/0x6f0
[   12.858364]  ret_from_fork+0x41/0x80
[   12.858495]  ret_from_fork_asm+0x1a/0x30
[   12.858634] 
[   12.858709] The buggy address belongs to the object at ffff8881029cae00
[   12.858709]  which belongs to the cache kmalloc-128 of size 128
[   12.859074] The buggy address is located 0 bytes inside of
[   12.859074]  freed 128-byte region [ffff8881029cae00, ffff8881029cae80)
[   12.859409] 
[   12.859483] The buggy address belongs to the physical page:
[   12.859665] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029ca
[   12.860725] flags: 0x200000000000000(node=0|zone=2)
[   12.861187] page_type: f5(slab)
[   12.861374] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   12.862124] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.862535] page dumped because: kasan: bad access detected
[   12.862802] 
[   12.863141] Memory state around the buggy address:
[   12.863570]  ffff8881029cad00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.864426]  ffff8881029cad80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.865090] >ffff8881029cae00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.865316]                    ^
[   12.865437]  ffff8881029cae80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.866088]  ffff8881029caf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.866864] ==================================================================