Hay
Date
July 10, 2025, 11:10 p.m.

Environment
qemu-arm64
qemu-x86_64

[   15.881406] ==================================================================
[   15.881503] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x180/0x520
[   15.881566] Read of size 1 at addr fff00000c17b6e00 by task kunit_try_catch/164
[   15.881956] 
[   15.882022] CPU: 1 UID: 0 PID: 164 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   15.884409] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.884529] Hardware name: linux,dummy-virt (DT)
[   15.884666] Call trace:
[   15.884694]  show_stack+0x20/0x38 (C)
[   15.884875]  dump_stack_lvl+0x8c/0xd0
[   15.885091]  print_report+0x118/0x608
[   15.885193]  kasan_report+0xdc/0x128
[   15.885261]  __kasan_check_byte+0x54/0x70
[   15.885374]  krealloc_noprof+0x44/0x360
[   15.885453]  krealloc_uaf+0x180/0x520
[   15.885525]  kunit_try_run_case+0x170/0x3f0
[   15.885603]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.885680]  kthread+0x328/0x630
[   15.885751]  ret_from_fork+0x10/0x20
[   15.885839] 
[   15.885869] Allocated by task 164:
[   15.885930]  kasan_save_stack+0x3c/0x68
[   15.886103]  kasan_save_track+0x20/0x40
[   15.886323]  kasan_save_alloc_info+0x40/0x58
[   15.886396]  __kasan_kmalloc+0xd4/0xd8
[   15.886504]  __kmalloc_cache_noprof+0x16c/0x3c0
[   15.886590]  krealloc_uaf+0xc8/0x520
[   15.886676]  kunit_try_run_case+0x170/0x3f0
[   15.886741]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.886784]  kthread+0x328/0x630
[   15.886816]  ret_from_fork+0x10/0x20
[   15.886972] 
[   15.887011] Freed by task 164:
[   15.887222]  kasan_save_stack+0x3c/0x68
[   15.887319]  kasan_save_track+0x20/0x40
[   15.887398]  kasan_save_free_info+0x4c/0x78
[   15.887462]  __kasan_slab_free+0x6c/0x98
[   15.887552]  kfree+0x214/0x3c8
[   15.887609]  krealloc_uaf+0x12c/0x520
[   15.887666]  kunit_try_run_case+0x170/0x3f0
[   15.887703]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.887746]  kthread+0x328/0x630
[   15.887789]  ret_from_fork+0x10/0x20
[   15.887862] 
[   15.887901] The buggy address belongs to the object at fff00000c17b6e00
[   15.887901]  which belongs to the cache kmalloc-256 of size 256
[   15.888006] The buggy address is located 0 bytes inside of
[   15.888006]  freed 256-byte region [fff00000c17b6e00, fff00000c17b6f00)
[   15.888089] 
[   15.888112] The buggy address belongs to the physical page:
[   15.888159] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1017b6
[   15.888211] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   15.888262] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   15.888352] page_type: f5(slab)
[   15.888393] raw: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000
[   15.888441] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   15.888489] head: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000
[   15.888535] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   15.888581] head: 0bfffe0000000001 ffffc1ffc305ed81 00000000ffffffff 00000000ffffffff
[   15.888628] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   15.888666] page dumped because: kasan: bad access detected
[   15.888712] 
[   15.888729] Memory state around the buggy address:
[   15.888761]  fff00000c17b6d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.888810]  fff00000c17b6d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.888859] >fff00000c17b6e00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   15.888903]                    ^
[   15.888936]  fff00000c17b6e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   15.889012]  fff00000c17b6f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.889073] ==================================================================
[   15.890614] ==================================================================
[   15.890682] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x4c8/0x520
[   15.890733] Read of size 1 at addr fff00000c17b6e00 by task kunit_try_catch/164
[   15.890813] 
[   15.890863] CPU: 1 UID: 0 PID: 164 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   15.890942] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.890967] Hardware name: linux,dummy-virt (DT)
[   15.891005] Call trace:
[   15.891045]  show_stack+0x20/0x38 (C)
[   15.891107]  dump_stack_lvl+0x8c/0xd0
[   15.891165]  print_report+0x118/0x608
[   15.891212]  kasan_report+0xdc/0x128
[   15.891260]  __asan_report_load1_noabort+0x20/0x30
[   15.891409]  krealloc_uaf+0x4c8/0x520
[   15.891461]  kunit_try_run_case+0x170/0x3f0
[   15.891508]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.891732]  kthread+0x328/0x630
[   15.891804]  ret_from_fork+0x10/0x20
[   15.891860] 
[   15.891886] Allocated by task 164:
[   15.891922]  kasan_save_stack+0x3c/0x68
[   15.891972]  kasan_save_track+0x20/0x40
[   15.892019]  kasan_save_alloc_info+0x40/0x58
[   15.892076]  __kasan_kmalloc+0xd4/0xd8
[   15.892165]  __kmalloc_cache_noprof+0x16c/0x3c0
[   15.892212]  krealloc_uaf+0xc8/0x520
[   15.892247]  kunit_try_run_case+0x170/0x3f0
[   15.892284]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.892326]  kthread+0x328/0x630
[   15.892357]  ret_from_fork+0x10/0x20
[   15.892518] 
[   15.892543] Freed by task 164:
[   15.892569]  kasan_save_stack+0x3c/0x68
[   15.892833]  kasan_save_track+0x20/0x40
[   15.892890]  kasan_save_free_info+0x4c/0x78
[   15.892936]  __kasan_slab_free+0x6c/0x98
[   15.892975]  kfree+0x214/0x3c8
[   15.893007]  krealloc_uaf+0x12c/0x520
[   15.893165]  kunit_try_run_case+0x170/0x3f0
[   15.893205]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.893255]  kthread+0x328/0x630
[   15.893356]  ret_from_fork+0x10/0x20
[   15.893466] 
[   15.893554] The buggy address belongs to the object at fff00000c17b6e00
[   15.893554]  which belongs to the cache kmalloc-256 of size 256
[   15.893629] The buggy address is located 0 bytes inside of
[   15.893629]  freed 256-byte region [fff00000c17b6e00, fff00000c17b6f00)
[   15.893688] 
[   15.893708] The buggy address belongs to the physical page:
[   15.893761] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1017b6
[   15.893864] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   15.893957] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   15.894076] page_type: f5(slab)
[   15.894151] raw: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000
[   15.894235] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   15.894327] head: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000
[   15.894374] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   15.894421] head: 0bfffe0000000001 ffffc1ffc305ed81 00000000ffffffff 00000000ffffffff
[   15.894476] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   15.894514] page dumped because: kasan: bad access detected
[   15.894544] 
[   15.894561] Memory state around the buggy address:
[   15.894629]  fff00000c17b6d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.894672]  fff00000c17b6d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.894884] >fff00000c17b6e00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   15.894970]                    ^
[   15.895097]  fff00000c17b6e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   15.895175]  fff00000c17b6f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.895229] ==================================================================

[   12.652081] ==================================================================
[   12.652514] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x1b8/0x5e0
[   12.652746] Read of size 1 at addr ffff88810099de00 by task kunit_try_catch/181
[   12.652966] 
[   12.653052] CPU: 1 UID: 0 PID: 181 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   12.653092] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.653104] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.653123] Call Trace:
[   12.653135]  <TASK>
[   12.653151]  dump_stack_lvl+0x73/0xb0
[   12.653179]  print_report+0xd1/0x650
[   12.653200]  ? __virt_addr_valid+0x1db/0x2d0
[   12.653223]  ? krealloc_uaf+0x1b8/0x5e0
[   12.653242]  ? kasan_complete_mode_report_info+0x64/0x200
[   12.653263]  ? krealloc_uaf+0x1b8/0x5e0
[   12.653283]  kasan_report+0x141/0x180
[   12.653303]  ? krealloc_uaf+0x1b8/0x5e0
[   12.653326]  ? krealloc_uaf+0x1b8/0x5e0
[   12.653346]  __kasan_check_byte+0x3d/0x50
[   12.653725]  krealloc_noprof+0x3f/0x340
[   12.653759]  krealloc_uaf+0x1b8/0x5e0
[   12.653782]  ? __pfx_krealloc_uaf+0x10/0x10
[   12.653804]  ? finish_task_switch.isra.0+0x153/0x700
[   12.653827]  ? __switch_to+0x47/0xf50
[   12.653852]  ? __schedule+0x10cc/0x2b60
[   12.654051]  ? __pfx_read_tsc+0x10/0x10
[   12.654073]  ? ktime_get_ts64+0x86/0x230
[   12.654099]  kunit_try_run_case+0x1a5/0x480
[   12.654125]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.654147]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.654170]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.654194]  ? __kthread_parkme+0x82/0x180
[   12.654215]  ? preempt_count_sub+0x50/0x80
[   12.654237]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.654260]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.654284]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.654308]  kthread+0x337/0x6f0
[   12.654326]  ? trace_preempt_on+0x20/0xc0
[   12.654391]  ? __pfx_kthread+0x10/0x10
[   12.654439]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.654460]  ? calculate_sigpending+0x7b/0xa0
[   12.654485]  ? __pfx_kthread+0x10/0x10
[   12.654506]  ret_from_fork+0x116/0x1d0
[   12.654525]  ? __pfx_kthread+0x10/0x10
[   12.654545]  ret_from_fork_asm+0x1a/0x30
[   12.654575]  </TASK>
[   12.654585] 
[   12.668778] Allocated by task 181:
[   12.669219]  kasan_save_stack+0x45/0x70
[   12.669764]  kasan_save_track+0x18/0x40
[   12.669978]  kasan_save_alloc_info+0x3b/0x50
[   12.670194]  __kasan_kmalloc+0xb7/0xc0
[   12.670398]  __kmalloc_cache_noprof+0x189/0x420
[   12.670654]  krealloc_uaf+0xbb/0x5e0
[   12.670789]  kunit_try_run_case+0x1a5/0x480
[   12.670994]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.671555]  kthread+0x337/0x6f0
[   12.671788]  ret_from_fork+0x116/0x1d0
[   12.671973]  ret_from_fork_asm+0x1a/0x30
[   12.672192] 
[   12.672289] Freed by task 181:
[   12.672521]  kasan_save_stack+0x45/0x70
[   12.672691]  kasan_save_track+0x18/0x40
[   12.672930]  kasan_save_free_info+0x3f/0x60
[   12.673188]  __kasan_slab_free+0x56/0x70
[   12.673460]  kfree+0x222/0x3f0
[   12.673687]  krealloc_uaf+0x13d/0x5e0
[   12.673853]  kunit_try_run_case+0x1a5/0x480
[   12.674082]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.674340]  kthread+0x337/0x6f0
[   12.674662]  ret_from_fork+0x116/0x1d0
[   12.674867]  ret_from_fork_asm+0x1a/0x30
[   12.675056] 
[   12.675170] The buggy address belongs to the object at ffff88810099de00
[   12.675170]  which belongs to the cache kmalloc-256 of size 256
[   12.675916] The buggy address is located 0 bytes inside of
[   12.675916]  freed 256-byte region [ffff88810099de00, ffff88810099df00)
[   12.676412] 
[   12.676681] The buggy address belongs to the physical page:
[   12.677065] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10099c
[   12.677481] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   12.677850] flags: 0x200000000000040(head|node=0|zone=2)
[   12.678103] page_type: f5(slab)
[   12.678312] raw: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000
[   12.678843] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.679164] head: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000
[   12.679642] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.679996] head: 0200000000000001 ffffea0004026701 00000000ffffffff 00000000ffffffff
[   12.680415] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   12.680776] page dumped because: kasan: bad access detected
[   12.680981] 
[   12.681064] Memory state around the buggy address:
[   12.681254]  ffff88810099dd00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.681533]  ffff88810099dd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.681833] >ffff88810099de00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.682085]                    ^
[   12.682241]  ffff88810099de80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.682605]  ffff88810099df00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.682868] ==================================================================
[   12.683861] ==================================================================
[   12.684134] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x53c/0x5e0
[   12.684407] Read of size 1 at addr ffff88810099de00 by task kunit_try_catch/181
[   12.684747] 
[   12.684851] CPU: 1 UID: 0 PID: 181 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   12.684888] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.684899] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.684917] Call Trace:
[   12.684927]  <TASK>
[   12.684941]  dump_stack_lvl+0x73/0xb0
[   12.685208]  print_report+0xd1/0x650
[   12.685240]  ? __virt_addr_valid+0x1db/0x2d0
[   12.685263]  ? krealloc_uaf+0x53c/0x5e0
[   12.685283]  ? kasan_complete_mode_report_info+0x64/0x200
[   12.685306]  ? krealloc_uaf+0x53c/0x5e0
[   12.685326]  kasan_report+0x141/0x180
[   12.685607]  ? krealloc_uaf+0x53c/0x5e0
[   12.685640]  __asan_report_load1_noabort+0x18/0x20
[   12.685665]  krealloc_uaf+0x53c/0x5e0
[   12.685686]  ? __pfx_krealloc_uaf+0x10/0x10
[   12.685706]  ? finish_task_switch.isra.0+0x153/0x700
[   12.685729]  ? __switch_to+0x47/0xf50
[   12.685752]  ? __schedule+0x10cc/0x2b60
[   12.685775]  ? __pfx_read_tsc+0x10/0x10
[   12.685795]  ? ktime_get_ts64+0x86/0x230
[   12.685818]  kunit_try_run_case+0x1a5/0x480
[   12.685841]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.685863]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.685886]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.685910]  ? __kthread_parkme+0x82/0x180
[   12.685929]  ? preempt_count_sub+0x50/0x80
[   12.685952]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.685975]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.685999]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.686023]  kthread+0x337/0x6f0
[   12.686041]  ? trace_preempt_on+0x20/0xc0
[   12.686063]  ? __pfx_kthread+0x10/0x10
[   12.686083]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.686104]  ? calculate_sigpending+0x7b/0xa0
[   12.686128]  ? __pfx_kthread+0x10/0x10
[   12.686149]  ret_from_fork+0x116/0x1d0
[   12.686167]  ? __pfx_kthread+0x10/0x10
[   12.686186]  ret_from_fork_asm+0x1a/0x30
[   12.686216]  </TASK>
[   12.686227] 
[   12.694025] Allocated by task 181:
[   12.694216]  kasan_save_stack+0x45/0x70
[   12.694545]  kasan_save_track+0x18/0x40
[   12.694754]  kasan_save_alloc_info+0x3b/0x50
[   12.694972]  __kasan_kmalloc+0xb7/0xc0
[   12.695158]  __kmalloc_cache_noprof+0x189/0x420
[   12.695379]  krealloc_uaf+0xbb/0x5e0
[   12.695596]  kunit_try_run_case+0x1a5/0x480
[   12.695808]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.696005]  kthread+0x337/0x6f0
[   12.696125]  ret_from_fork+0x116/0x1d0
[   12.696265]  ret_from_fork_asm+0x1a/0x30
[   12.696438] 
[   12.696531] Freed by task 181:
[   12.696686]  kasan_save_stack+0x45/0x70
[   12.696882]  kasan_save_track+0x18/0x40
[   12.697259]  kasan_save_free_info+0x3f/0x60
[   12.697605]  __kasan_slab_free+0x56/0x70
[   12.697808]  kfree+0x222/0x3f0
[   12.697925]  krealloc_uaf+0x13d/0x5e0
[   12.698072]  kunit_try_run_case+0x1a5/0x480
[   12.698282]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.698715]  kthread+0x337/0x6f0
[   12.698868]  ret_from_fork+0x116/0x1d0
[   12.699032]  ret_from_fork_asm+0x1a/0x30
[   12.699180] 
[   12.699274] The buggy address belongs to the object at ffff88810099de00
[   12.699274]  which belongs to the cache kmalloc-256 of size 256
[   12.699894] The buggy address is located 0 bytes inside of
[   12.699894]  freed 256-byte region [ffff88810099de00, ffff88810099df00)
[   12.700340] 
[   12.700597] The buggy address belongs to the physical page:
[   12.700833] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10099c
[   12.701145] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   12.701427] flags: 0x200000000000040(head|node=0|zone=2)
[   12.701700] page_type: f5(slab)
[   12.701859] raw: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000
[   12.702117] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.702346] head: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000
[   12.702716] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.703063] head: 0200000000000001 ffffea0004026701 00000000ffffffff 00000000ffffffff
[   12.703501] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   12.703804] page dumped because: kasan: bad access detected
[   12.703983] 
[   12.704077] Memory state around the buggy address:
[   12.704303]  ffff88810099dd00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.704636]  ffff88810099dd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.704918] >ffff88810099de00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.705207]                    ^
[   12.705369]  ffff88810099de80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.705655]  ffff88810099df00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.705920] ==================================================================