Hay
Date
July 9, 2025, 11:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   16.664196] ==================================================================
[   16.664291] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x4c8/0x520
[   16.664340] Read of size 1 at addr fff00000c461d000 by task kunit_try_catch/164
[   16.664395] 
[   16.664716] CPU: 1 UID: 0 PID: 164 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   16.664800] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.664865] Hardware name: linux,dummy-virt (DT)
[   16.664897] Call trace:
[   16.664924]  show_stack+0x20/0x38 (C)
[   16.665035]  dump_stack_lvl+0x8c/0xd0
[   16.665128]  print_report+0x118/0x608
[   16.665201]  kasan_report+0xdc/0x128
[   16.665247]  __asan_report_load1_noabort+0x20/0x30
[   16.665546]  krealloc_uaf+0x4c8/0x520
[   16.666864]  kunit_try_run_case+0x170/0x3f0
[   16.666928]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.666980]  kthread+0x328/0x630
[   16.667023]  ret_from_fork+0x10/0x20
[   16.667070] 
[   16.667088] Allocated by task 164:
[   16.667128]  kasan_save_stack+0x3c/0x68
[   16.667167]  kasan_save_track+0x20/0x40
[   16.667203]  kasan_save_alloc_info+0x40/0x58
[   16.667362]  __kasan_kmalloc+0xd4/0xd8
[   16.668798]  __kmalloc_cache_noprof+0x16c/0x3c0
[   16.668843]  krealloc_uaf+0xc8/0x520
[   16.668877]  kunit_try_run_case+0x170/0x3f0
[   16.668914]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.669427]  kthread+0x328/0x630
[   16.669488]  ret_from_fork+0x10/0x20
[   16.669562] 
[   16.669580] Freed by task 164:
[   16.669606]  kasan_save_stack+0x3c/0x68
[   16.669643]  kasan_save_track+0x20/0x40
[   16.669679]  kasan_save_free_info+0x4c/0x78
[   16.669717]  __kasan_slab_free+0x6c/0x98
[   16.669798]  kfree+0x214/0x3c8
[   16.669860]  krealloc_uaf+0x12c/0x520
[   16.669943]  kunit_try_run_case+0x170/0x3f0
[   16.670043]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.670105]  kthread+0x328/0x630
[   16.670178]  ret_from_fork+0x10/0x20
[   16.670252] 
[   16.670288] The buggy address belongs to the object at fff00000c461d000
[   16.670288]  which belongs to the cache kmalloc-256 of size 256
[   16.670370] The buggy address is located 0 bytes inside of
[   16.670370]  freed 256-byte region [fff00000c461d000, fff00000c461d100)
[   16.670563] 
[   16.670593] The buggy address belongs to the physical page:
[   16.670625] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10461c
[   16.670680] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   16.670919] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   16.671017] page_type: f5(slab)
[   16.671123] raw: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000
[   16.671792] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   16.671960] head: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000
[   16.672010] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   16.672080] head: 0bfffe0000000001 ffffc1ffc3118701 00000000ffffffff 00000000ffffffff
[   16.672140] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   16.672344] page dumped because: kasan: bad access detected
[   16.672493] 
[   16.672512] Memory state around the buggy address:
[   16.672544]  fff00000c461cf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.672591]  fff00000c461cf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.672631] >fff00000c461d000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   16.672669]                    ^
[   16.672695]  fff00000c461d080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   16.672748]  fff00000c461d100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.672784] ==================================================================
[   16.653829] ==================================================================
[   16.653933] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x180/0x520
[   16.654008] Read of size 1 at addr fff00000c461d000 by task kunit_try_catch/164
[   16.654057] 
[   16.654100] CPU: 1 UID: 0 PID: 164 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   16.654346] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.654372] Hardware name: linux,dummy-virt (DT)
[   16.654402] Call trace:
[   16.654425]  show_stack+0x20/0x38 (C)
[   16.654474]  dump_stack_lvl+0x8c/0xd0
[   16.654522]  print_report+0x118/0x608
[   16.654567]  kasan_report+0xdc/0x128
[   16.654610]  __kasan_check_byte+0x54/0x70
[   16.654656]  krealloc_noprof+0x44/0x360
[   16.654707]  krealloc_uaf+0x180/0x520
[   16.654749]  kunit_try_run_case+0x170/0x3f0
[   16.654796]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.654846]  kthread+0x328/0x630
[   16.654887]  ret_from_fork+0x10/0x20
[   16.655174] 
[   16.655284] Allocated by task 164:
[   16.655316]  kasan_save_stack+0x3c/0x68
[   16.655360]  kasan_save_track+0x20/0x40
[   16.655397]  kasan_save_alloc_info+0x40/0x58
[   16.655435]  __kasan_kmalloc+0xd4/0xd8
[   16.655477]  __kmalloc_cache_noprof+0x16c/0x3c0
[   16.656143]  krealloc_uaf+0xc8/0x520
[   16.656185]  kunit_try_run_case+0x170/0x3f0
[   16.656222]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.656264]  kthread+0x328/0x630
[   16.656803]  ret_from_fork+0x10/0x20
[   16.656894] 
[   16.656987] Freed by task 164:
[   16.657026]  kasan_save_stack+0x3c/0x68
[   16.657086]  kasan_save_track+0x20/0x40
[   16.657282]  kasan_save_free_info+0x4c/0x78
[   16.657439]  __kasan_slab_free+0x6c/0x98
[   16.657476]  kfree+0x214/0x3c8
[   16.657508]  krealloc_uaf+0x12c/0x520
[   16.657556]  kunit_try_run_case+0x170/0x3f0
[   16.657592]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.657764]  kthread+0x328/0x630
[   16.657796]  ret_from_fork+0x10/0x20
[   16.657901] 
[   16.658003] The buggy address belongs to the object at fff00000c461d000
[   16.658003]  which belongs to the cache kmalloc-256 of size 256
[   16.658405] The buggy address is located 0 bytes inside of
[   16.658405]  freed 256-byte region [fff00000c461d000, fff00000c461d100)
[   16.658475] 
[   16.658496] The buggy address belongs to the physical page:
[   16.658530] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10461c
[   16.659267] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   16.659610] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   16.659712] page_type: f5(slab)
[   16.659793] raw: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000
[   16.659958] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   16.660025] head: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000
[   16.660089] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   16.660276] head: 0bfffe0000000001 ffffc1ffc3118701 00000000ffffffff 00000000ffffffff
[   16.660750] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   16.660999] page dumped because: kasan: bad access detected
[   16.661097] 
[   16.661128] Memory state around the buggy address:
[   16.661162]  fff00000c461cf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.661203]  fff00000c461cf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.661243] >fff00000c461d000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   16.661575]                    ^
[   16.661645]  fff00000c461d080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   16.661806]  fff00000c461d100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.661923] ==================================================================

[   12.495919] ==================================================================
[   12.496368] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x1b8/0x5e0
[   12.496595] Read of size 1 at addr ffff888100350a00 by task kunit_try_catch/181
[   12.497645] 
[   12.498141] CPU: 0 UID: 0 PID: 181 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   12.498255] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.498268] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.498288] Call Trace:
[   12.498300]  <TASK>
[   12.498316]  dump_stack_lvl+0x73/0xb0
[   12.498348]  print_report+0xd1/0x650
[   12.498378]  ? __virt_addr_valid+0x1db/0x2d0
[   12.498400]  ? krealloc_uaf+0x1b8/0x5e0
[   12.498421]  ? kasan_complete_mode_report_info+0x64/0x200
[   12.498443]  ? krealloc_uaf+0x1b8/0x5e0
[   12.498464]  kasan_report+0x141/0x180
[   12.498485]  ? krealloc_uaf+0x1b8/0x5e0
[   12.498509]  ? krealloc_uaf+0x1b8/0x5e0
[   12.498529]  __kasan_check_byte+0x3d/0x50
[   12.498551]  krealloc_noprof+0x3f/0x340
[   12.498573]  krealloc_uaf+0x1b8/0x5e0
[   12.498593]  ? __pfx_krealloc_uaf+0x10/0x10
[   12.498614]  ? finish_task_switch.isra.0+0x153/0x700
[   12.498636]  ? __switch_to+0x47/0xf50
[   12.498660]  ? __schedule+0x10cc/0x2b60
[   12.498682]  ? __pfx_read_tsc+0x10/0x10
[   12.498713]  ? ktime_get_ts64+0x86/0x230
[   12.498737]  kunit_try_run_case+0x1a5/0x480
[   12.498760]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.498783]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.498805]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.498829]  ? __kthread_parkme+0x82/0x180
[   12.498849]  ? preempt_count_sub+0x50/0x80
[   12.498872]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.498895]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.498919]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.498944]  kthread+0x337/0x6f0
[   12.498962]  ? trace_preempt_on+0x20/0xc0
[   12.498985]  ? __pfx_kthread+0x10/0x10
[   12.499005]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.499032]  ? calculate_sigpending+0x7b/0xa0
[   12.499055]  ? __pfx_kthread+0x10/0x10
[   12.499076]  ret_from_fork+0x116/0x1d0
[   12.499093]  ? __pfx_kthread+0x10/0x10
[   12.499113]  ret_from_fork_asm+0x1a/0x30
[   12.499143]  </TASK>
[   12.499153] 
[   12.511583] Allocated by task 181:
[   12.511821]  kasan_save_stack+0x45/0x70
[   12.512187]  kasan_save_track+0x18/0x40
[   12.512402]  kasan_save_alloc_info+0x3b/0x50
[   12.512615]  __kasan_kmalloc+0xb7/0xc0
[   12.512861]  __kmalloc_cache_noprof+0x189/0x420
[   12.513204]  krealloc_uaf+0xbb/0x5e0
[   12.513372]  kunit_try_run_case+0x1a5/0x480
[   12.513560]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.513782]  kthread+0x337/0x6f0
[   12.513950]  ret_from_fork+0x116/0x1d0
[   12.514143]  ret_from_fork_asm+0x1a/0x30
[   12.514338] 
[   12.514451] Freed by task 181:
[   12.514615]  kasan_save_stack+0x45/0x70
[   12.514768]  kasan_save_track+0x18/0x40
[   12.514903]  kasan_save_free_info+0x3f/0x60
[   12.515055]  __kasan_slab_free+0x56/0x70
[   12.515204]  kfree+0x222/0x3f0
[   12.515363]  krealloc_uaf+0x13d/0x5e0
[   12.515547]  kunit_try_run_case+0x1a5/0x480
[   12.516115]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.516381]  kthread+0x337/0x6f0
[   12.516549]  ret_from_fork+0x116/0x1d0
[   12.516746]  ret_from_fork_asm+0x1a/0x30
[   12.516989] 
[   12.517192] The buggy address belongs to the object at ffff888100350a00
[   12.517192]  which belongs to the cache kmalloc-256 of size 256
[   12.517697] The buggy address is located 0 bytes inside of
[   12.517697]  freed 256-byte region [ffff888100350a00, ffff888100350b00)
[   12.518326] 
[   12.518435] The buggy address belongs to the physical page:
[   12.518669] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x100350
[   12.519209] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   12.519569] flags: 0x200000000000040(head|node=0|zone=2)
[   12.519829] page_type: f5(slab)
[   12.519982] raw: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000
[   12.520417] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.520767] head: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000
[   12.521119] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.521475] head: 0200000000000001 ffffea000400d401 00000000ffffffff 00000000ffffffff
[   12.521807] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   12.522210] page dumped because: kasan: bad access detected
[   12.522451] 
[   12.522556] Memory state around the buggy address:
[   12.522785]  ffff888100350900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.523310]  ffff888100350980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.523626] >ffff888100350a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.523871]                    ^
[   12.524144]  ffff888100350a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.524474]  ffff888100350b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.524772] ==================================================================
[   12.526692] ==================================================================
[   12.527347] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x53c/0x5e0
[   12.527687] Read of size 1 at addr ffff888100350a00 by task kunit_try_catch/181
[   12.527971] 
[   12.528091] CPU: 0 UID: 0 PID: 181 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   12.528132] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.528143] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.528162] Call Trace:
[   12.528178]  <TASK>
[   12.528193]  dump_stack_lvl+0x73/0xb0
[   12.528221]  print_report+0xd1/0x650
[   12.528242]  ? __virt_addr_valid+0x1db/0x2d0
[   12.528265]  ? krealloc_uaf+0x53c/0x5e0
[   12.528285]  ? kasan_complete_mode_report_info+0x64/0x200
[   12.528308]  ? krealloc_uaf+0x53c/0x5e0
[   12.528333]  kasan_report+0x141/0x180
[   12.528354]  ? krealloc_uaf+0x53c/0x5e0
[   12.528379]  __asan_report_load1_noabort+0x18/0x20
[   12.528404]  krealloc_uaf+0x53c/0x5e0
[   12.528424]  ? __pfx_krealloc_uaf+0x10/0x10
[   12.528445]  ? finish_task_switch.isra.0+0x153/0x700
[   12.528467]  ? __switch_to+0x47/0xf50
[   12.528492]  ? __schedule+0x10cc/0x2b60
[   12.528513]  ? __pfx_read_tsc+0x10/0x10
[   12.528534]  ? ktime_get_ts64+0x86/0x230
[   12.528557]  kunit_try_run_case+0x1a5/0x480
[   12.528581]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.528603]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.528626]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.528649]  ? __kthread_parkme+0x82/0x180
[   12.528669]  ? preempt_count_sub+0x50/0x80
[   12.528692]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.528726]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.528750]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.528775]  kthread+0x337/0x6f0
[   12.528794]  ? trace_preempt_on+0x20/0xc0
[   12.528818]  ? __pfx_kthread+0x10/0x10
[   12.528838]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.528860]  ? calculate_sigpending+0x7b/0xa0
[   12.528883]  ? __pfx_kthread+0x10/0x10
[   12.528904]  ret_from_fork+0x116/0x1d0
[   12.528922]  ? __pfx_kthread+0x10/0x10
[   12.528941]  ret_from_fork_asm+0x1a/0x30
[   12.528971]  </TASK>
[   12.528981] 
[   12.540980] Allocated by task 181:
[   12.541189]  kasan_save_stack+0x45/0x70
[   12.541339]  kasan_save_track+0x18/0x40
[   12.541473]  kasan_save_alloc_info+0x3b/0x50
[   12.541621]  __kasan_kmalloc+0xb7/0xc0
[   12.541770]  __kmalloc_cache_noprof+0x189/0x420
[   12.541993]  krealloc_uaf+0xbb/0x5e0
[   12.542347]  kunit_try_run_case+0x1a5/0x480
[   12.542535]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.542746]  kthread+0x337/0x6f0
[   12.542912]  ret_from_fork+0x116/0x1d0
[   12.543198]  ret_from_fork_asm+0x1a/0x30
[   12.543393] 
[   12.543468] Freed by task 181:
[   12.543626]  kasan_save_stack+0x45/0x70
[   12.543820]  kasan_save_track+0x18/0x40
[   12.544087]  kasan_save_free_info+0x3f/0x60
[   12.544282]  __kasan_slab_free+0x56/0x70
[   12.544454]  kfree+0x222/0x3f0
[   12.544615]  krealloc_uaf+0x13d/0x5e0
[   12.544761]  kunit_try_run_case+0x1a5/0x480
[   12.544967]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.545285]  kthread+0x337/0x6f0
[   12.545434]  ret_from_fork+0x116/0x1d0
[   12.545575]  ret_from_fork_asm+0x1a/0x30
[   12.545788] 
[   12.545885] The buggy address belongs to the object at ffff888100350a00
[   12.545885]  which belongs to the cache kmalloc-256 of size 256
[   12.546520] The buggy address is located 0 bytes inside of
[   12.546520]  freed 256-byte region [ffff888100350a00, ffff888100350b00)
[   12.546995] 
[   12.547221] The buggy address belongs to the physical page:
[   12.547444] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x100350
[   12.547736] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   12.547961] flags: 0x200000000000040(head|node=0|zone=2)
[   12.548290] page_type: f5(slab)
[   12.548464] raw: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000
[   12.548779] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.549075] head: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000
[   12.549425] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.549781] head: 0200000000000001 ffffea000400d401 00000000ffffffff 00000000ffffffff
[   12.550260] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   12.550563] page dumped because: kasan: bad access detected
[   12.550791] 
[   12.550881] Memory state around the buggy address:
[   12.551217]  ffff888100350900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.551502]  ffff888100350980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.551801] >ffff888100350a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.552176]                    ^
[   12.552342]  ffff888100350a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.552619]  ffff888100350b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.552921] ==================================================================