Hay
Date
July 8, 2025, 11:09 p.m.

Environment
qemu-arm64
qemu-x86_64

[   19.312413] ==================================================================
[   19.312983] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x4c8/0x520
[   19.313046] Read of size 1 at addr fff00000c454d000 by task kunit_try_catch/164
[   19.313168] 
[   19.313216] CPU: 1 UID: 0 PID: 164 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   19.313298] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.313323] Hardware name: linux,dummy-virt (DT)
[   19.313526] Call trace:
[   19.313563]  show_stack+0x20/0x38 (C)
[   19.313717]  dump_stack_lvl+0x8c/0xd0
[   19.313988]  print_report+0x118/0x608
[   19.314204]  kasan_report+0xdc/0x128
[   19.314265]  __asan_report_load1_noabort+0x20/0x30
[   19.314912]  krealloc_uaf+0x4c8/0x520
[   19.314983]  kunit_try_run_case+0x170/0x3f0
[   19.315108]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.315178]  kthread+0x328/0x630
[   19.315226]  ret_from_fork+0x10/0x20
[   19.315416] 
[   19.315510] Allocated by task 164:
[   19.315635]  kasan_save_stack+0x3c/0x68
[   19.315763]  kasan_save_track+0x20/0x40
[   19.315924]  kasan_save_alloc_info+0x40/0x58
[   19.316073]  __kasan_kmalloc+0xd4/0xd8
[   19.316225]  __kmalloc_cache_noprof+0x16c/0x3c0
[   19.316268]  krealloc_uaf+0xc8/0x520
[   19.316707]  kunit_try_run_case+0x170/0x3f0
[   19.316871]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.316986]  kthread+0x328/0x630
[   19.317133]  ret_from_fork+0x10/0x20
[   19.317659] 
[   19.317726] Freed by task 164:
[   19.317813]  kasan_save_stack+0x3c/0x68
[   19.317936]  kasan_save_track+0x20/0x40
[   19.318077]  kasan_save_free_info+0x4c/0x78
[   19.318218]  __kasan_slab_free+0x6c/0x98
[   19.318258]  kfree+0x214/0x3c8
[   19.318617]  krealloc_uaf+0x12c/0x520
[   19.318813]  kunit_try_run_case+0x170/0x3f0
[   19.318926]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.319058]  kthread+0x328/0x630
[   19.319176]  ret_from_fork+0x10/0x20
[   19.319483] 
[   19.319541] The buggy address belongs to the object at fff00000c454d000
[   19.319541]  which belongs to the cache kmalloc-256 of size 256
[   19.319694] The buggy address is located 0 bytes inside of
[   19.319694]  freed 256-byte region [fff00000c454d000, fff00000c454d100)
[   19.319878] 
[   19.320070] The buggy address belongs to the physical page:
[   19.320257] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10454c
[   19.320367] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   19.320512] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   19.320708] page_type: f5(slab)
[   19.320929] raw: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000
[   19.321121] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   19.321376] head: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000
[   19.321603] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   19.321711] head: 0bfffe0000000001 ffffc1ffc3115301 00000000ffffffff 00000000ffffffff
[   19.321773] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   19.321821] page dumped because: kasan: bad access detected
[   19.321857] 
[   19.321875] Memory state around the buggy address:
[   19.321906]  fff00000c454cf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.321984]  fff00000c454cf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.322036] >fff00000c454d000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   19.322072]                    ^
[   19.322105]  fff00000c454d080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   19.322167]  fff00000c454d100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.322203] ==================================================================
[   19.298832] ==================================================================
[   19.299398] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x180/0x520
[   19.299798] Read of size 1 at addr fff00000c454d000 by task kunit_try_catch/164
[   19.299975] 
[   19.300199] CPU: 1 UID: 0 PID: 164 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   19.300437] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.300647] Hardware name: linux,dummy-virt (DT)
[   19.300754] Call trace:
[   19.300856]  show_stack+0x20/0x38 (C)
[   19.301066]  dump_stack_lvl+0x8c/0xd0
[   19.301218]  print_report+0x118/0x608
[   19.301428]  kasan_report+0xdc/0x128
[   19.301593]  __kasan_check_byte+0x54/0x70
[   19.301760]  krealloc_noprof+0x44/0x360
[   19.302218]  krealloc_uaf+0x180/0x520
[   19.302330]  kunit_try_run_case+0x170/0x3f0
[   19.302438]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.302650]  kthread+0x328/0x630
[   19.302712]  ret_from_fork+0x10/0x20
[   19.302979] 
[   19.303250] Allocated by task 164:
[   19.303362]  kasan_save_stack+0x3c/0x68
[   19.303448]  kasan_save_track+0x20/0x40
[   19.303596]  kasan_save_alloc_info+0x40/0x58
[   19.303636]  __kasan_kmalloc+0xd4/0xd8
[   19.303688]  __kmalloc_cache_noprof+0x16c/0x3c0
[   19.303728]  krealloc_uaf+0xc8/0x520
[   19.304072]  kunit_try_run_case+0x170/0x3f0
[   19.304837]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.304929]  kthread+0x328/0x630
[   19.305088]  ret_from_fork+0x10/0x20
[   19.305147] 
[   19.305197] Freed by task 164:
[   19.305764]  kasan_save_stack+0x3c/0x68
[   19.305968]  kasan_save_track+0x20/0x40
[   19.306264]  kasan_save_free_info+0x4c/0x78
[   19.306498]  __kasan_slab_free+0x6c/0x98
[   19.306787]  kfree+0x214/0x3c8
[   19.307012]  krealloc_uaf+0x12c/0x520
[   19.307072]  kunit_try_run_case+0x170/0x3f0
[   19.307267]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.307473]  kthread+0x328/0x630
[   19.307565]  ret_from_fork+0x10/0x20
[   19.307867] 
[   19.307997] The buggy address belongs to the object at fff00000c454d000
[   19.307997]  which belongs to the cache kmalloc-256 of size 256
[   19.308280] The buggy address is located 0 bytes inside of
[   19.308280]  freed 256-byte region [fff00000c454d000, fff00000c454d100)
[   19.308465] 
[   19.308597] The buggy address belongs to the physical page:
[   19.308718] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10454c
[   19.309039] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   19.309171] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   19.309229] page_type: f5(slab)
[   19.309278] raw: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000
[   19.309335] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   19.309384] head: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000
[   19.309432] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   19.309495] head: 0bfffe0000000001 ffffc1ffc3115301 00000000ffffffff 00000000ffffffff
[   19.309542] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   19.309592] page dumped because: kasan: bad access detected
[   19.309621] 
[   19.309639] Memory state around the buggy address:
[   19.309669]  fff00000c454cf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.309720]  fff00000c454cf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.309762] >fff00000c454d000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   19.309814]                    ^
[   19.309841]  fff00000c454d080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   19.309881]  fff00000c454d100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.309933] ==================================================================

[   12.426208] ==================================================================
[   12.426847] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x1b8/0x5e0
[   12.427554] Read of size 1 at addr ffff888100aab200 by task kunit_try_catch/182
[   12.428324] 
[   12.428455] CPU: 1 UID: 0 PID: 182 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   12.428506] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.428571] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.428594] Call Trace:
[   12.428615]  <TASK>
[   12.428632]  dump_stack_lvl+0x73/0xb0
[   12.428665]  print_report+0xd1/0x650
[   12.428687]  ? __virt_addr_valid+0x1db/0x2d0
[   12.428711]  ? krealloc_uaf+0x1b8/0x5e0
[   12.428732]  ? kasan_complete_mode_report_info+0x64/0x200
[   12.428754]  ? krealloc_uaf+0x1b8/0x5e0
[   12.428775]  kasan_report+0x141/0x180
[   12.428796]  ? krealloc_uaf+0x1b8/0x5e0
[   12.428820]  ? krealloc_uaf+0x1b8/0x5e0
[   12.428840]  __kasan_check_byte+0x3d/0x50
[   12.428863]  krealloc_noprof+0x3f/0x340
[   12.428882]  ? stack_depot_save_flags+0x48b/0x840
[   12.428913]  krealloc_uaf+0x1b8/0x5e0
[   12.428972]  ? __pfx_krealloc_uaf+0x10/0x10
[   12.429006]  ? finish_task_switch.isra.0+0x153/0x700
[   12.429030]  ? __switch_to+0x47/0xf50
[   12.429056]  ? __schedule+0x10cc/0x2b60
[   12.429078]  ? __pfx_read_tsc+0x10/0x10
[   12.429099]  ? ktime_get_ts64+0x86/0x230
[   12.429124]  kunit_try_run_case+0x1a5/0x480
[   12.429149]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.429171]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.429195]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.429218]  ? __kthread_parkme+0x82/0x180
[   12.429239]  ? preempt_count_sub+0x50/0x80
[   12.429261]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.429285]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.429308]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.429332]  kthread+0x337/0x6f0
[   12.429350]  ? trace_preempt_on+0x20/0xc0
[   12.429374]  ? __pfx_kthread+0x10/0x10
[   12.429394]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.429415]  ? calculate_sigpending+0x7b/0xa0
[   12.429439]  ? __pfx_kthread+0x10/0x10
[   12.429460]  ret_from_fork+0x116/0x1d0
[   12.429477]  ? __pfx_kthread+0x10/0x10
[   12.429497]  ret_from_fork_asm+0x1a/0x30
[   12.429528]  </TASK>
[   12.429538] 
[   12.438031] Allocated by task 182:
[   12.438336]  kasan_save_stack+0x45/0x70
[   12.438487]  kasan_save_track+0x18/0x40
[   12.438801]  kasan_save_alloc_info+0x3b/0x50
[   12.439035]  __kasan_kmalloc+0xb7/0xc0
[   12.439300]  __kmalloc_cache_noprof+0x189/0x420
[   12.439582]  krealloc_uaf+0xbb/0x5e0
[   12.439770]  kunit_try_run_case+0x1a5/0x480
[   12.439918]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.440279]  kthread+0x337/0x6f0
[   12.440639]  ret_from_fork+0x116/0x1d0
[   12.440883]  ret_from_fork_asm+0x1a/0x30
[   12.441047] 
[   12.441165] Freed by task 182:
[   12.441412]  kasan_save_stack+0x45/0x70
[   12.441691]  kasan_save_track+0x18/0x40
[   12.441884]  kasan_save_free_info+0x3f/0x60
[   12.442190]  __kasan_slab_free+0x56/0x70
[   12.442336]  kfree+0x222/0x3f0
[   12.442452]  krealloc_uaf+0x13d/0x5e0
[   12.442580]  kunit_try_run_case+0x1a5/0x480
[   12.442736]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.442909]  kthread+0x337/0x6f0
[   12.443109]  ret_from_fork+0x116/0x1d0
[   12.443293]  ret_from_fork_asm+0x1a/0x30
[   12.443504] 
[   12.443616] The buggy address belongs to the object at ffff888100aab200
[   12.443616]  which belongs to the cache kmalloc-256 of size 256
[   12.444644] The buggy address is located 0 bytes inside of
[   12.444644]  freed 256-byte region [ffff888100aab200, ffff888100aab300)
[   12.444985] 
[   12.445057] The buggy address belongs to the physical page:
[   12.445315] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x100aaa
[   12.445988] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   12.446354] flags: 0x200000000000040(head|node=0|zone=2)
[   12.446741] page_type: f5(slab)
[   12.446864] raw: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000
[   12.447300] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.447789] head: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000
[   12.448320] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.448713] head: 0200000000000001 ffffea000402aa81 00000000ffffffff 00000000ffffffff
[   12.449121] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   12.449453] page dumped because: kasan: bad access detected
[   12.449771] 
[   12.449859] Memory state around the buggy address:
[   12.450213]  ffff888100aab100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.450633]  ffff888100aab180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.451003] >ffff888100aab200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.451316]                    ^
[   12.451479]  ffff888100aab280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.451838]  ffff888100aab300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.452158] ==================================================================
[   12.452574] ==================================================================
[   12.452968] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x53c/0x5e0
[   12.453648] Read of size 1 at addr ffff888100aab200 by task kunit_try_catch/182
[   12.453876] 
[   12.453959] CPU: 1 UID: 0 PID: 182 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   12.453998] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.454009] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.454027] Call Trace:
[   12.454039]  <TASK>
[   12.454053]  dump_stack_lvl+0x73/0xb0
[   12.454081]  print_report+0xd1/0x650
[   12.454103]  ? __virt_addr_valid+0x1db/0x2d0
[   12.454125]  ? krealloc_uaf+0x53c/0x5e0
[   12.454145]  ? kasan_complete_mode_report_info+0x64/0x200
[   12.454168]  ? krealloc_uaf+0x53c/0x5e0
[   12.454189]  kasan_report+0x141/0x180
[   12.454211]  ? krealloc_uaf+0x53c/0x5e0
[   12.454295]  __asan_report_load1_noabort+0x18/0x20
[   12.454336]  krealloc_uaf+0x53c/0x5e0
[   12.454358]  ? __pfx_krealloc_uaf+0x10/0x10
[   12.454378]  ? finish_task_switch.isra.0+0x153/0x700
[   12.454400]  ? __switch_to+0x47/0xf50
[   12.454424]  ? __schedule+0x10cc/0x2b60
[   12.454445]  ? __pfx_read_tsc+0x10/0x10
[   12.454474]  ? ktime_get_ts64+0x86/0x230
[   12.454499]  kunit_try_run_case+0x1a5/0x480
[   12.454544]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.454567]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.454591]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.454625]  ? __kthread_parkme+0x82/0x180
[   12.454645]  ? preempt_count_sub+0x50/0x80
[   12.454668]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.454692]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.454716]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.454741]  kthread+0x337/0x6f0
[   12.454760]  ? trace_preempt_on+0x20/0xc0
[   12.454784]  ? __pfx_kthread+0x10/0x10
[   12.454806]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.454828]  ? calculate_sigpending+0x7b/0xa0
[   12.454851]  ? __pfx_kthread+0x10/0x10
[   12.454872]  ret_from_fork+0x116/0x1d0
[   12.454890]  ? __pfx_kthread+0x10/0x10
[   12.454909]  ret_from_fork_asm+0x1a/0x30
[   12.454981]  </TASK>
[   12.454991] 
[   12.467083] Allocated by task 182:
[   12.467400]  kasan_save_stack+0x45/0x70
[   12.467789]  kasan_save_track+0x18/0x40
[   12.468230]  kasan_save_alloc_info+0x3b/0x50
[   12.468608]  __kasan_kmalloc+0xb7/0xc0
[   12.468997]  __kmalloc_cache_noprof+0x189/0x420
[   12.469417]  krealloc_uaf+0xbb/0x5e0
[   12.469571]  kunit_try_run_case+0x1a5/0x480
[   12.469733]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.469909]  kthread+0x337/0x6f0
[   12.470289]  ret_from_fork+0x116/0x1d0
[   12.470674]  ret_from_fork_asm+0x1a/0x30
[   12.471130] 
[   12.471303] Freed by task 182:
[   12.471626]  kasan_save_stack+0x45/0x70
[   12.472050]  kasan_save_track+0x18/0x40
[   12.472420]  kasan_save_free_info+0x3f/0x60
[   12.472835]  __kasan_slab_free+0x56/0x70
[   12.473318]  kfree+0x222/0x3f0
[   12.473661]  krealloc_uaf+0x13d/0x5e0
[   12.474153]  kunit_try_run_case+0x1a5/0x480
[   12.474532]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.474726]  kthread+0x337/0x6f0
[   12.475125]  ret_from_fork+0x116/0x1d0
[   12.475498]  ret_from_fork_asm+0x1a/0x30
[   12.475920] 
[   12.476002] The buggy address belongs to the object at ffff888100aab200
[   12.476002]  which belongs to the cache kmalloc-256 of size 256
[   12.476372] The buggy address is located 0 bytes inside of
[   12.476372]  freed 256-byte region [ffff888100aab200, ffff888100aab300)
[   12.476836] 
[   12.476907] The buggy address belongs to the physical page:
[   12.477141] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x100aaa
[   12.477465] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   12.478010] flags: 0x200000000000040(head|node=0|zone=2)
[   12.478268] page_type: f5(slab)
[   12.478460] raw: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000
[   12.478737] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.479116] head: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000
[   12.479444] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.479787] head: 0200000000000001 ffffea000402aa81 00000000ffffffff 00000000ffffffff
[   12.480090] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   12.480721] page dumped because: kasan: bad access detected
[   12.480954] 
[   12.481054] Memory state around the buggy address:
[   12.481271]  ffff888100aab100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.481635]  ffff888100aab180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.482064] >ffff888100aab200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.482372]                    ^
[   12.482500]  ffff888100aab280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.482830]  ffff888100aab300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.483169] ==================================================================