Hay
Date
July 5, 2025, 5:09 p.m.

Environment
qemu-arm64
qemu-x86_64

[   18.241663] ==================================================================
[   18.241749] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x180/0x520
[   18.241819] Read of size 1 at addr fff00000c47a5c00 by task kunit_try_catch/164
[   18.242215] 
[   18.242268] CPU: 1 UID: 0 PID: 164 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   18.242597] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.242639] Hardware name: linux,dummy-virt (DT)
[   18.242781] Call trace:
[   18.242822]  show_stack+0x20/0x38 (C)
[   18.242937]  dump_stack_lvl+0x8c/0xd0
[   18.243043]  print_report+0x118/0x608
[   18.243284]  kasan_report+0xdc/0x128
[   18.243498]  __kasan_check_byte+0x54/0x70
[   18.243555]  krealloc_noprof+0x44/0x360
[   18.243711]  krealloc_uaf+0x180/0x520
[   18.243795]  kunit_try_run_case+0x170/0x3f0
[   18.244045]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.244192]  kthread+0x328/0x630
[   18.244348]  ret_from_fork+0x10/0x20
[   18.244464] 
[   18.244522] Allocated by task 164:
[   18.244749]  kasan_save_stack+0x3c/0x68
[   18.245010]  kasan_save_track+0x20/0x40
[   18.245177]  kasan_save_alloc_info+0x40/0x58
[   18.245333]  __kasan_kmalloc+0xd4/0xd8
[   18.245389]  __kmalloc_cache_noprof+0x16c/0x3c0
[   18.245636]  krealloc_uaf+0xc8/0x520
[   18.245683]  kunit_try_run_case+0x170/0x3f0
[   18.246221]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.246321]  kthread+0x328/0x630
[   18.246356]  ret_from_fork+0x10/0x20
[   18.246392] 
[   18.246620] Freed by task 164:
[   18.246903]  kasan_save_stack+0x3c/0x68
[   18.247059]  kasan_save_track+0x20/0x40
[   18.247113]  kasan_save_free_info+0x4c/0x78
[   18.247161]  __kasan_slab_free+0x6c/0x98
[   18.247203]  kfree+0x214/0x3c8
[   18.247235]  krealloc_uaf+0x12c/0x520
[   18.247269]  kunit_try_run_case+0x170/0x3f0
[   18.247573]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.247768]  kthread+0x328/0x630
[   18.247918]  ret_from_fork+0x10/0x20
[   18.248065] 
[   18.248213] The buggy address belongs to the object at fff00000c47a5c00
[   18.248213]  which belongs to the cache kmalloc-256 of size 256
[   18.248933] The buggy address is located 0 bytes inside of
[   18.248933]  freed 256-byte region [fff00000c47a5c00, fff00000c47a5d00)
[   18.249086] 
[   18.249123] The buggy address belongs to the physical page:
[   18.249235] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1047a4
[   18.249423] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   18.249471] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   18.249551] page_type: f5(slab)
[   18.249600] raw: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000
[   18.249657] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   18.249704] head: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000
[   18.249749] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   18.249795] head: 0bfffe0000000001 ffffc1ffc311e901 00000000ffffffff 00000000ffffffff
[   18.249841] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   18.249888] page dumped because: kasan: bad access detected
[   18.249918] 
[   18.249936] Memory state around the buggy address:
[   18.250002]  fff00000c47a5b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.250044]  fff00000c47a5b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.250084] >fff00000c47a5c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   18.250122]                    ^
[   18.250175]  fff00000c47a5c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   18.250214]  fff00000c47a5d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.250250] ==================================================================
[   18.252091] ==================================================================
[   18.252143] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x4c8/0x520
[   18.252188] Read of size 1 at addr fff00000c47a5c00 by task kunit_try_catch/164
[   18.252546] 
[   18.252742] CPU: 1 UID: 0 PID: 164 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   18.252830] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.252856] Hardware name: linux,dummy-virt (DT)
[   18.252900] Call trace:
[   18.252921]  show_stack+0x20/0x38 (C)
[   18.252972]  dump_stack_lvl+0x8c/0xd0
[   18.253402]  print_report+0x118/0x608
[   18.253483]  kasan_report+0xdc/0x128
[   18.253529]  __asan_report_load1_noabort+0x20/0x30
[   18.253789]  krealloc_uaf+0x4c8/0x520
[   18.253843]  kunit_try_run_case+0x170/0x3f0
[   18.254013]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.254078]  kthread+0x328/0x630
[   18.254275]  ret_from_fork+0x10/0x20
[   18.254745] 
[   18.254987] Allocated by task 164:
[   18.255021]  kasan_save_stack+0x3c/0x68
[   18.255216]  kasan_save_track+0x20/0x40
[   18.255831]  kasan_save_alloc_info+0x40/0x58
[   18.255924]  __kasan_kmalloc+0xd4/0xd8
[   18.255992]  __kmalloc_cache_noprof+0x16c/0x3c0
[   18.256055]  krealloc_uaf+0xc8/0x520
[   18.256222]  kunit_try_run_case+0x170/0x3f0
[   18.256289]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.256340]  kthread+0x328/0x630
[   18.256753]  ret_from_fork+0x10/0x20
[   18.256890] 
[   18.257029] Freed by task 164:
[   18.257231]  kasan_save_stack+0x3c/0x68
[   18.257387]  kasan_save_track+0x20/0x40
[   18.257591]  kasan_save_free_info+0x4c/0x78
[   18.257793]  __kasan_slab_free+0x6c/0x98
[   18.258009]  kfree+0x214/0x3c8
[   18.258078]  krealloc_uaf+0x12c/0x520
[   18.258181]  kunit_try_run_case+0x170/0x3f0
[   18.258218]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.258260]  kthread+0x328/0x630
[   18.258292]  ret_from_fork+0x10/0x20
[   18.258344] 
[   18.258379] The buggy address belongs to the object at fff00000c47a5c00
[   18.258379]  which belongs to the cache kmalloc-256 of size 256
[   18.258434] The buggy address is located 0 bytes inside of
[   18.258434]  freed 256-byte region [fff00000c47a5c00, fff00000c47a5d00)
[   18.258492] 
[   18.258512] The buggy address belongs to the physical page:
[   18.258550] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1047a4
[   18.258608] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   18.258662] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   18.258710] page_type: f5(slab)
[   18.258973] raw: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000
[   18.259599] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   18.259737] head: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000
[   18.260118] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   18.260191] head: 0bfffe0000000001 ffffc1ffc311e901 00000000ffffffff 00000000ffffffff
[   18.260341] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   18.260424] page dumped because: kasan: bad access detected
[   18.260746] 
[   18.260912] Memory state around the buggy address:
[   18.260975]  fff00000c47a5b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.261296]  fff00000c47a5b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.261366] >fff00000c47a5c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   18.261470]                    ^
[   18.261567]  fff00000c47a5c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   18.261633]  fff00000c47a5d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.261670] ==================================================================

[   11.538972] ==================================================================
[   11.539785] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x1b8/0x5e0
[   11.540126] Read of size 1 at addr ffff888100ab4200 by task kunit_try_catch/182
[   11.540449] 
[   11.540588] CPU: 1 UID: 0 PID: 182 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   11.540648] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.540727] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.540750] Call Trace:
[   11.540763]  <TASK>
[   11.540779]  dump_stack_lvl+0x73/0xb0
[   11.540808]  print_report+0xd1/0x650
[   11.540831]  ? __virt_addr_valid+0x1db/0x2d0
[   11.540874]  ? krealloc_uaf+0x1b8/0x5e0
[   11.540896]  ? kasan_complete_mode_report_info+0x64/0x200
[   11.540931]  ? krealloc_uaf+0x1b8/0x5e0
[   11.540952]  kasan_report+0x141/0x180
[   11.540973]  ? krealloc_uaf+0x1b8/0x5e0
[   11.540997]  ? krealloc_uaf+0x1b8/0x5e0
[   11.541018]  __kasan_check_byte+0x3d/0x50
[   11.541039]  krealloc_noprof+0x3f/0x340
[   11.541061]  krealloc_uaf+0x1b8/0x5e0
[   11.541082]  ? __pfx_krealloc_uaf+0x10/0x10
[   11.541102]  ? finish_task_switch.isra.0+0x153/0x700
[   11.541124]  ? __switch_to+0x47/0xf50
[   11.541150]  ? __schedule+0x10cc/0x2b60
[   11.541171]  ? __pfx_read_tsc+0x10/0x10
[   11.541240]  ? ktime_get_ts64+0x86/0x230
[   11.541268]  kunit_try_run_case+0x1a5/0x480
[   11.541293]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.541314]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.541336]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.541358]  ? __kthread_parkme+0x82/0x180
[   11.541383]  ? preempt_count_sub+0x50/0x80
[   11.541405]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.541427]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.541449]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.541481]  kthread+0x337/0x6f0
[   11.541500]  ? trace_preempt_on+0x20/0xc0
[   11.541523]  ? __pfx_kthread+0x10/0x10
[   11.541542]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.541562]  ? calculate_sigpending+0x7b/0xa0
[   11.541586]  ? __pfx_kthread+0x10/0x10
[   11.541606]  ret_from_fork+0x116/0x1d0
[   11.541623]  ? __pfx_kthread+0x10/0x10
[   11.541643]  ret_from_fork_asm+0x1a/0x30
[   11.541673]  </TASK>
[   11.541683] 
[   11.550257] Allocated by task 182:
[   11.550448]  kasan_save_stack+0x45/0x70
[   11.550682]  kasan_save_track+0x18/0x40
[   11.550886]  kasan_save_alloc_info+0x3b/0x50
[   11.551130]  __kasan_kmalloc+0xb7/0xc0
[   11.551326]  __kmalloc_cache_noprof+0x189/0x420
[   11.551557]  krealloc_uaf+0xbb/0x5e0
[   11.551737]  kunit_try_run_case+0x1a5/0x480
[   11.551987]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.552165]  kthread+0x337/0x6f0
[   11.552281]  ret_from_fork+0x116/0x1d0
[   11.552598]  ret_from_fork_asm+0x1a/0x30
[   11.552995] 
[   11.553136] Freed by task 182:
[   11.553559]  kasan_save_stack+0x45/0x70
[   11.553788]  kasan_save_track+0x18/0x40
[   11.553954]  kasan_save_free_info+0x3f/0x60
[   11.554098]  __kasan_slab_free+0x56/0x70
[   11.554364]  kfree+0x222/0x3f0
[   11.554547]  krealloc_uaf+0x13d/0x5e0
[   11.554783]  kunit_try_run_case+0x1a5/0x480
[   11.554995]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.555317]  kthread+0x337/0x6f0
[   11.555444]  ret_from_fork+0x116/0x1d0
[   11.555585]  ret_from_fork_asm+0x1a/0x30
[   11.555762] 
[   11.555932] The buggy address belongs to the object at ffff888100ab4200
[   11.555932]  which belongs to the cache kmalloc-256 of size 256
[   11.556690] The buggy address is located 0 bytes inside of
[   11.556690]  freed 256-byte region [ffff888100ab4200, ffff888100ab4300)
[   11.557093] 
[   11.557166] The buggy address belongs to the physical page:
[   11.557340] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x100ab4
[   11.557710] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   11.558057] flags: 0x200000000000040(head|node=0|zone=2)
[   11.558600] page_type: f5(slab)
[   11.558784] raw: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000
[   11.559164] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   11.559517] head: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000
[   11.559746] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   11.560189] head: 0200000000000001 ffffea000402ad01 00000000ffffffff 00000000ffffffff
[   11.560810] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   11.561188] page dumped because: kasan: bad access detected
[   11.561555] 
[   11.561674] Memory state around the buggy address:
[   11.561830]  ffff888100ab4100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.562153]  ffff888100ab4180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.562632] >ffff888100ab4200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   11.562967]                    ^
[   11.563085]  ffff888100ab4280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   11.563616]  ffff888100ab4300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.563968] ==================================================================
[   11.564714] ==================================================================
[   11.565059] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x53c/0x5e0
[   11.565664] Read of size 1 at addr ffff888100ab4200 by task kunit_try_catch/182
[   11.566009] 
[   11.566115] CPU: 1 UID: 0 PID: 182 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   11.566156] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.566168] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.566188] Call Trace:
[   11.566475]  <TASK>
[   11.566494]  dump_stack_lvl+0x73/0xb0
[   11.566524]  print_report+0xd1/0x650
[   11.566567]  ? __virt_addr_valid+0x1db/0x2d0
[   11.566589]  ? krealloc_uaf+0x53c/0x5e0
[   11.566610]  ? kasan_complete_mode_report_info+0x64/0x200
[   11.566631]  ? krealloc_uaf+0x53c/0x5e0
[   11.566651]  kasan_report+0x141/0x180
[   11.566673]  ? krealloc_uaf+0x53c/0x5e0
[   11.566698]  __asan_report_load1_noabort+0x18/0x20
[   11.566722]  krealloc_uaf+0x53c/0x5e0
[   11.566761]  ? __pfx_krealloc_uaf+0x10/0x10
[   11.566782]  ? finish_task_switch.isra.0+0x153/0x700
[   11.566803]  ? __switch_to+0x47/0xf50
[   11.566828]  ? __schedule+0x10cc/0x2b60
[   11.566850]  ? __pfx_read_tsc+0x10/0x10
[   11.566870]  ? ktime_get_ts64+0x86/0x230
[   11.566908]  kunit_try_run_case+0x1a5/0x480
[   11.566931]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.566952]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.566974]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.566996]  ? __kthread_parkme+0x82/0x180
[   11.567015]  ? preempt_count_sub+0x50/0x80
[   11.567036]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.567059]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.567080]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.567102]  kthread+0x337/0x6f0
[   11.567121]  ? trace_preempt_on+0x20/0xc0
[   11.567143]  ? __pfx_kthread+0x10/0x10
[   11.567163]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.567183]  ? calculate_sigpending+0x7b/0xa0
[   11.567205]  ? __pfx_kthread+0x10/0x10
[   11.567225]  ret_from_fork+0x116/0x1d0
[   11.567303]  ? __pfx_kthread+0x10/0x10
[   11.567326]  ret_from_fork_asm+0x1a/0x30
[   11.567356]  </TASK>
[   11.567368] 
[   11.575995] Allocated by task 182:
[   11.576160]  kasan_save_stack+0x45/0x70
[   11.576441]  kasan_save_track+0x18/0x40
[   11.576594]  kasan_save_alloc_info+0x3b/0x50
[   11.576960]  __kasan_kmalloc+0xb7/0xc0
[   11.577144]  __kmalloc_cache_noprof+0x189/0x420
[   11.577466]  krealloc_uaf+0xbb/0x5e0
[   11.577643]  kunit_try_run_case+0x1a5/0x480
[   11.577913]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.578106]  kthread+0x337/0x6f0
[   11.578306]  ret_from_fork+0x116/0x1d0
[   11.578536]  ret_from_fork_asm+0x1a/0x30
[   11.578729] 
[   11.578825] Freed by task 182:
[   11.579065]  kasan_save_stack+0x45/0x70
[   11.579250]  kasan_save_track+0x18/0x40
[   11.579435]  kasan_save_free_info+0x3f/0x60
[   11.579721]  __kasan_slab_free+0x56/0x70
[   11.579885]  kfree+0x222/0x3f0
[   11.579999]  krealloc_uaf+0x13d/0x5e0
[   11.580132]  kunit_try_run_case+0x1a5/0x480
[   11.580341]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.581024]  kthread+0x337/0x6f0
[   11.581176]  ret_from_fork+0x116/0x1d0
[   11.581448]  ret_from_fork_asm+0x1a/0x30
[   11.581637] 
[   11.581771] The buggy address belongs to the object at ffff888100ab4200
[   11.581771]  which belongs to the cache kmalloc-256 of size 256
[   11.582303] The buggy address is located 0 bytes inside of
[   11.582303]  freed 256-byte region [ffff888100ab4200, ffff888100ab4300)
[   11.582847] 
[   11.582944] The buggy address belongs to the physical page:
[   11.583164] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x100ab4
[   11.583573] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   11.584028] flags: 0x200000000000040(head|node=0|zone=2)
[   11.584326] page_type: f5(slab)
[   11.584504] raw: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000
[   11.584792] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   11.585021] head: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000
[   11.585710] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   11.586334] head: 0200000000000001 ffffea000402ad01 00000000ffffffff 00000000ffffffff
[   11.586739] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   11.587078] page dumped because: kasan: bad access detected
[   11.587492] 
[   11.587568] Memory state around the buggy address:
[   11.587724]  ffff888100ab4100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.588294]  ffff888100ab4180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.588702] >ffff888100ab4200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   11.589018]                    ^
[   11.589139]  ffff888100ab4280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   11.589795]  ffff888100ab4300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.590095] ==================================================================