Hay
Date
May 29, 2025, 7:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   21.417944] ==================================================================
[   21.418102] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x4c8/0x520
[   21.418342] Read of size 1 at addr fff00000c4729800 by task kunit_try_catch/164
[   21.418797] 
[   21.418905] CPU: 1 UID: 0 PID: 164 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250529 #1 PREEMPT 
[   21.419078] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.419136] Hardware name: linux,dummy-virt (DT)
[   21.419197] Call trace:
[   21.419247]  show_stack+0x20/0x38 (C)
[   21.419390]  dump_stack_lvl+0x8c/0xd0
[   21.419535]  print_report+0x118/0x608
[   21.419654]  kasan_report+0xdc/0x128
[   21.419767]  __asan_report_load1_noabort+0x20/0x30
[   21.419896]  krealloc_uaf+0x4c8/0x520
[   21.420013]  kunit_try_run_case+0x170/0x3f0
[   21.420133]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.420264]  kthread+0x328/0x630
[   21.420376]  ret_from_fork+0x10/0x20
[   21.420498] 
[   21.420541] Allocated by task 164:
[   21.420606]  kasan_save_stack+0x3c/0x68
[   21.420749]  kasan_save_track+0x20/0x40
[   21.420857]  kasan_save_alloc_info+0x40/0x58
[   21.420963]  __kasan_kmalloc+0xd4/0xd8
[   21.421054]  __kmalloc_cache_noprof+0x15c/0x3c0
[   21.421516]  krealloc_uaf+0xc8/0x520
[   21.421607]  kunit_try_run_case+0x170/0x3f0
[   21.421730]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.422063]  kthread+0x328/0x630
[   21.422239]  ret_from_fork+0x10/0x20
[   21.422496] 
[   21.422673] Freed by task 164:
[   21.422766]  kasan_save_stack+0x3c/0x68
[   21.422864]  kasan_save_track+0x20/0x40
[   21.422945]  kasan_save_free_info+0x4c/0x78
[   21.423542]  __kasan_slab_free+0x6c/0x98
[   21.423640]  kfree+0x214/0x3c8
[   21.423682]  krealloc_uaf+0x12c/0x520
[   21.423723]  kunit_try_run_case+0x170/0x3f0
[   21.423802]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.423908]  kthread+0x328/0x630
[   21.424048]  ret_from_fork+0x10/0x20
[   21.424151] 
[   21.424202] The buggy address belongs to the object at fff00000c4729800
[   21.424202]  which belongs to the cache kmalloc-256 of size 256
[   21.424346] The buggy address is located 0 bytes inside of
[   21.424346]  freed 256-byte region [fff00000c4729800, fff00000c4729900)
[   21.424513] 
[   21.424566] The buggy address belongs to the physical page:
[   21.424646] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x104728
[   21.424780] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   21.424897] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   21.425037] page_type: f5(slab)
[   21.425163] raw: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000
[   21.425333] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   21.425463] head: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000
[   21.425580] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   21.425748] head: 0bfffe0000000001 ffffc1ffc311ca01 00000000ffffffff 00000000ffffffff
[   21.426056] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   21.426301] page dumped because: kasan: bad access detected
[   21.426611] 
[   21.426672] Memory state around the buggy address:
[   21.426749]  fff00000c4729700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.426867]  fff00000c4729780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.426958] >fff00000c4729800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   21.427033]                    ^
[   21.427093]  fff00000c4729880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   21.427188]  fff00000c4729900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.427581] ==================================================================
[   21.402545] ==================================================================
[   21.402757] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x180/0x520
[   21.402923] Read of size 1 at addr fff00000c4729800 by task kunit_try_catch/164
[   21.403047] 
[   21.403143] CPU: 1 UID: 0 PID: 164 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250529 #1 PREEMPT 
[   21.403357] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.403429] Hardware name: linux,dummy-virt (DT)
[   21.403501] Call trace:
[   21.403554]  show_stack+0x20/0x38 (C)
[   21.403675]  dump_stack_lvl+0x8c/0xd0
[   21.403801]  print_report+0x118/0x608
[   21.403991]  kasan_report+0xdc/0x128
[   21.405093]  __kasan_check_byte+0x54/0x70
[   21.405234]  krealloc_noprof+0x44/0x360
[   21.405351]  krealloc_uaf+0x180/0x520
[   21.405680]  kunit_try_run_case+0x170/0x3f0
[   21.405801]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.405959]  kthread+0x328/0x630
[   21.406088]  ret_from_fork+0x10/0x20
[   21.406216] 
[   21.406263] Allocated by task 164:
[   21.406331]  kasan_save_stack+0x3c/0x68
[   21.406490]  kasan_save_track+0x20/0x40
[   21.406601]  kasan_save_alloc_info+0x40/0x58
[   21.406936]  __kasan_kmalloc+0xd4/0xd8
[   21.407050]  __kmalloc_cache_noprof+0x15c/0x3c0
[   21.407140]  krealloc_uaf+0xc8/0x520
[   21.407219]  kunit_try_run_case+0x170/0x3f0
[   21.407450]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.407567]  kthread+0x328/0x630
[   21.407649]  ret_from_fork+0x10/0x20
[   21.407781] 
[   21.407874] Freed by task 164:
[   21.408518]  kasan_save_stack+0x3c/0x68
[   21.408648]  kasan_save_track+0x20/0x40
[   21.408905]  kasan_save_free_info+0x4c/0x78
[   21.409769]  __kasan_slab_free+0x6c/0x98
[   21.409921]  kfree+0x214/0x3c8
[   21.410274]  krealloc_uaf+0x12c/0x520
[   21.410396]  kunit_try_run_case+0x170/0x3f0
[   21.410635]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.410756]  kthread+0x328/0x630
[   21.410851]  ret_from_fork+0x10/0x20
[   21.410984] 
[   21.411053] The buggy address belongs to the object at fff00000c4729800
[   21.411053]  which belongs to the cache kmalloc-256 of size 256
[   21.411383] The buggy address is located 0 bytes inside of
[   21.411383]  freed 256-byte region [fff00000c4729800, fff00000c4729900)
[   21.411706] 
[   21.411763] The buggy address belongs to the physical page:
[   21.411936] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x104728
[   21.412224] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   21.412385] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   21.412762] page_type: f5(slab)
[   21.413003] raw: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000
[   21.413247] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   21.413369] head: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000
[   21.413501] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   21.413619] head: 0bfffe0000000001 ffffc1ffc311ca01 00000000ffffffff 00000000ffffffff
[   21.413731] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   21.413833] page dumped because: kasan: bad access detected
[   21.413910] 
[   21.414278] Memory state around the buggy address:
[   21.414511]  fff00000c4729700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.414613]  fff00000c4729780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.414714] >fff00000c4729800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   21.415054]                    ^
[   21.415135]  fff00000c4729880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   21.415247]  fff00000c4729900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.415407] ==================================================================


[   10.836352] ==================================================================
[   10.836692] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x53c/0x5e0
[   10.837046] Read of size 1 at addr ffff888100a1de00 by task kunit_try_catch/181
[   10.837352] 
[   10.837753] CPU: 1 UID: 0 PID: 181 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250529 #1 PREEMPT(voluntary) 
[   10.837962] Tainted: [B]=BAD_PAGE, [N]=TEST
[   10.837978] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   10.837999] Call Trace:
[   10.838011]  <TASK>
[   10.838027]  dump_stack_lvl+0x73/0xb0
[   10.838056]  print_report+0xd1/0x650
[   10.838079]  ? __virt_addr_valid+0x1db/0x2d0
[   10.838102]  ? krealloc_uaf+0x53c/0x5e0
[   10.838123]  ? kasan_complete_mode_report_info+0x64/0x200
[   10.838146]  ? krealloc_uaf+0x53c/0x5e0
[   10.838167]  kasan_report+0x141/0x180
[   10.838189]  ? krealloc_uaf+0x53c/0x5e0
[   10.838215]  __asan_report_load1_noabort+0x18/0x20
[   10.838236]  krealloc_uaf+0x53c/0x5e0
[   10.838257]  ? __pfx_krealloc_uaf+0x10/0x10
[   10.838278]  ? finish_task_switch.isra.0+0x153/0x700
[   10.838299]  ? __switch_to+0x47/0xf50
[   10.838324]  ? __schedule+0x10cc/0x2b60
[   10.838347]  ? __pfx_read_tsc+0x10/0x10
[   10.838367]  ? ktime_get_ts64+0x86/0x230
[   10.838391]  kunit_try_run_case+0x1a5/0x480
[   10.838412]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.838431]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   10.838455]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   10.838479]  ? __kthread_parkme+0x82/0x180
[   10.838499]  ? preempt_count_sub+0x50/0x80
[   10.838521]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.838547]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.838571]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   10.838595]  kthread+0x337/0x6f0
[   10.838624]  ? trace_preempt_on+0x20/0xc0
[   10.838647]  ? __pfx_kthread+0x10/0x10
[   10.838667]  ? _raw_spin_unlock_irq+0x47/0x80
[   10.838689]  ? calculate_sigpending+0x7b/0xa0
[   10.838713]  ? __pfx_kthread+0x10/0x10
[   10.838734]  ret_from_fork+0x116/0x1d0
[   10.838819]  ? __pfx_kthread+0x10/0x10
[   10.838841]  ret_from_fork_asm+0x1a/0x30
[   10.838872]  </TASK>
[   10.838882] 
[   10.849548] Allocated by task 181:
[   10.849782]  kasan_save_stack+0x45/0x70
[   10.850040]  kasan_save_track+0x18/0x40
[   10.850255]  kasan_save_alloc_info+0x3b/0x50
[   10.850600]  __kasan_kmalloc+0xb7/0xc0
[   10.850794]  __kmalloc_cache_noprof+0x189/0x420
[   10.851031]  krealloc_uaf+0xbb/0x5e0
[   10.851169]  kunit_try_run_case+0x1a5/0x480
[   10.851326]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.851593]  kthread+0x337/0x6f0
[   10.851848]  ret_from_fork+0x116/0x1d0
[   10.852199]  ret_from_fork_asm+0x1a/0x30
[   10.852578] 
[   10.852721] Freed by task 181:
[   10.853123]  kasan_save_stack+0x45/0x70
[   10.853408]  kasan_save_track+0x18/0x40
[   10.853606]  kasan_save_free_info+0x3f/0x60
[   10.853904]  __kasan_slab_free+0x56/0x70
[   10.854077]  kfree+0x222/0x3f0
[   10.854197]  krealloc_uaf+0x13d/0x5e0
[   10.854386]  kunit_try_run_case+0x1a5/0x480
[   10.854627]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.855001]  kthread+0x337/0x6f0
[   10.855205]  ret_from_fork+0x116/0x1d0
[   10.855365]  ret_from_fork_asm+0x1a/0x30
[   10.855590] 
[   10.855725] The buggy address belongs to the object at ffff888100a1de00
[   10.855725]  which belongs to the cache kmalloc-256 of size 256
[   10.856322] The buggy address is located 0 bytes inside of
[   10.856322]  freed 256-byte region [ffff888100a1de00, ffff888100a1df00)
[   10.856929] 
[   10.857046] The buggy address belongs to the physical page:
[   10.857324] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x100a1c
[   10.857625] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   10.857996] flags: 0x200000000000040(head|node=0|zone=2)
[   10.858463] page_type: f5(slab)
[   10.858646] raw: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000
[   10.859178] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   10.859515] head: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000
[   10.859937] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   10.860325] head: 0200000000000001 ffffea0004028701 00000000ffffffff 00000000ffffffff
[   10.860641] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   10.861003] page dumped because: kasan: bad access detected
[   10.861241] 
[   10.861426] Memory state around the buggy address:
[   10.861591]  ffff888100a1dd00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.862153]  ffff888100a1dd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.862500] >ffff888100a1de00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   10.862825]                    ^
[   10.863115]  ffff888100a1de80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   10.863552]  ffff888100a1df00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.863917] ==================================================================
[   10.804223] ==================================================================
[   10.804737] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x1b8/0x5e0
[   10.805124] Read of size 1 at addr ffff888100a1de00 by task kunit_try_catch/181
[   10.805437] 
[   10.805552] CPU: 1 UID: 0 PID: 181 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250529 #1 PREEMPT(voluntary) 
[   10.805597] Tainted: [B]=BAD_PAGE, [N]=TEST
[   10.805621] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   10.805642] Call Trace:
[   10.805654]  <TASK>
[   10.805669]  dump_stack_lvl+0x73/0xb0
[   10.805694]  print_report+0xd1/0x650
[   10.805716]  ? __virt_addr_valid+0x1db/0x2d0
[   10.805739]  ? krealloc_uaf+0x1b8/0x5e0
[   10.805828]  ? kasan_complete_mode_report_info+0x64/0x200
[   10.805853]  ? krealloc_uaf+0x1b8/0x5e0
[   10.805875]  kasan_report+0x141/0x180
[   10.805897]  ? krealloc_uaf+0x1b8/0x5e0
[   10.805923]  ? krealloc_uaf+0x1b8/0x5e0
[   10.805944]  __kasan_check_byte+0x3d/0x50
[   10.805966]  krealloc_noprof+0x3f/0x340
[   10.805992]  krealloc_uaf+0x1b8/0x5e0
[   10.806014]  ? __pfx_krealloc_uaf+0x10/0x10
[   10.806035]  ? finish_task_switch.isra.0+0x153/0x700
[   10.806057]  ? __switch_to+0x47/0xf50
[   10.806080]  ? __schedule+0x10cc/0x2b60
[   10.806104]  ? __pfx_read_tsc+0x10/0x10
[   10.806124]  ? ktime_get_ts64+0x86/0x230
[   10.806149]  kunit_try_run_case+0x1a5/0x480
[   10.806170]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.806189]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   10.806213]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   10.806237]  ? __kthread_parkme+0x82/0x180
[   10.806256]  ? preempt_count_sub+0x50/0x80
[   10.806279]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.806300]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.806324]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   10.806348]  kthread+0x337/0x6f0
[   10.806367]  ? trace_preempt_on+0x20/0xc0
[   10.806390]  ? __pfx_kthread+0x10/0x10
[   10.806410]  ? _raw_spin_unlock_irq+0x47/0x80
[   10.806432]  ? calculate_sigpending+0x7b/0xa0
[   10.806456]  ? __pfx_kthread+0x10/0x10
[   10.806478]  ret_from_fork+0x116/0x1d0
[   10.806495]  ? __pfx_kthread+0x10/0x10
[   10.806516]  ret_from_fork_asm+0x1a/0x30
[   10.806553]  </TASK>
[   10.806564] 
[   10.818518] Allocated by task 181:
[   10.818709]  kasan_save_stack+0x45/0x70
[   10.819324]  kasan_save_track+0x18/0x40
[   10.819528]  kasan_save_alloc_info+0x3b/0x50
[   10.819734]  __kasan_kmalloc+0xb7/0xc0
[   10.820170]  __kmalloc_cache_noprof+0x189/0x420
[   10.820382]  krealloc_uaf+0xbb/0x5e0
[   10.820557]  kunit_try_run_case+0x1a5/0x480
[   10.821021]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.821327]  kthread+0x337/0x6f0
[   10.821719]  ret_from_fork+0x116/0x1d0
[   10.822104]  ret_from_fork_asm+0x1a/0x30
[   10.822299] 
[   10.822409] Freed by task 181:
[   10.822577]  kasan_save_stack+0x45/0x70
[   10.822738]  kasan_save_track+0x18/0x40
[   10.822881]  kasan_save_free_info+0x3f/0x60
[   10.823200]  __kasan_slab_free+0x56/0x70
[   10.823431]  kfree+0x222/0x3f0
[   10.823579]  krealloc_uaf+0x13d/0x5e0
[   10.823792]  kunit_try_run_case+0x1a5/0x480
[   10.824098]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.824282]  kthread+0x337/0x6f0
[   10.824453]  ret_from_fork+0x116/0x1d0
[   10.824679]  ret_from_fork_asm+0x1a/0x30
[   10.824994] 
[   10.825172] The buggy address belongs to the object at ffff888100a1de00
[   10.825172]  which belongs to the cache kmalloc-256 of size 256
[   10.825692] The buggy address is located 0 bytes inside of
[   10.825692]  freed 256-byte region [ffff888100a1de00, ffff888100a1df00)
[   10.826320] 
[   10.826397] The buggy address belongs to the physical page:
[   10.827029] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x100a1c
[   10.827606] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   10.828318] flags: 0x200000000000040(head|node=0|zone=2)
[   10.828667] page_type: f5(slab)
[   10.828898] raw: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000
[   10.829520] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   10.829998] head: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000
[   10.830416] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   10.830898] head: 0200000000000001 ffffea0004028701 00000000ffffffff 00000000ffffffff
[   10.831280] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   10.831659] page dumped because: kasan: bad access detected
[   10.832163] 
[   10.832273] Memory state around the buggy address:
[   10.832547]  ffff888100a1dd00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.832984]  ffff888100a1dd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.833692] >ffff888100a1de00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   10.834183]                    ^
[   10.834352]  ffff888100a1de80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   10.834687]  ffff888100a1df00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.835215] ==================================================================