Hay
Date
July 15, 2025, 11:09 a.m.

Environment
qemu-arm64
qemu-x86_64

[   15.457367] ==================================================================
[   15.457427] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x4c8/0x520
[   15.457482] Read of size 1 at addr fff00000c175f200 by task kunit_try_catch/165
[   15.457531] 
[   15.457563] CPU: 1 UID: 0 PID: 165 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   15.457641] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.458332] Hardware name: linux,dummy-virt (DT)
[   15.458376] Call trace:
[   15.458398]  show_stack+0x20/0x38 (C)
[   15.458450]  dump_stack_lvl+0x8c/0xd0
[   15.458496]  print_report+0x118/0x5d0
[   15.459000]  kasan_report+0xdc/0x128
[   15.459216]  __asan_report_load1_noabort+0x20/0x30
[   15.459290]  krealloc_uaf+0x4c8/0x520
[   15.459334]  kunit_try_run_case+0x170/0x3f0
[   15.459380]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.459431]  kthread+0x328/0x630
[   15.459473]  ret_from_fork+0x10/0x20
[   15.459519] 
[   15.459536] Allocated by task 165:
[   15.459564]  kasan_save_stack+0x3c/0x68
[   15.459949]  kasan_save_track+0x20/0x40
[   15.459994]  kasan_save_alloc_info+0x40/0x58
[   15.460033]  __kasan_kmalloc+0xd4/0xd8
[   15.460068]  __kmalloc_cache_noprof+0x16c/0x3c0
[   15.460105]  krealloc_uaf+0xc8/0x520
[   15.460138]  kunit_try_run_case+0x170/0x3f0
[   15.460418]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.460472]  kthread+0x328/0x630
[   15.460505]  ret_from_fork+0x10/0x20
[   15.460540] 
[   15.460558] Freed by task 165:
[   15.460630]  kasan_save_stack+0x3c/0x68
[   15.460712]  kasan_save_track+0x20/0x40
[   15.460822]  kasan_save_free_info+0x4c/0x78
[   15.461003]  __kasan_slab_free+0x6c/0x98
[   15.461040]  kfree+0x214/0x3c8
[   15.461072]  krealloc_uaf+0x12c/0x520
[   15.461105]  kunit_try_run_case+0x170/0x3f0
[   15.461140]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.461463]  kthread+0x328/0x630
[   15.461526]  ret_from_fork+0x10/0x20
[   15.461561] 
[   15.461580] The buggy address belongs to the object at fff00000c175f200
[   15.461580]  which belongs to the cache kmalloc-256 of size 256
[   15.461649] The buggy address is located 0 bytes inside of
[   15.461649]  freed 256-byte region [fff00000c175f200, fff00000c175f300)
[   15.461825] 
[   15.461843] The buggy address belongs to the physical page:
[   15.461902] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10175e
[   15.461958] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   15.462005] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   15.462057] page_type: f5(slab)
[   15.462093] raw: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000
[   15.462152] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   15.462212] head: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000
[   15.462260] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   15.462483] head: 0bfffe0000000001 ffffc1ffc305d781 00000000ffffffff 00000000ffffffff
[   15.462535] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   15.462800] page dumped because: kasan: bad access detected
[   15.462833] 
[   15.462849] Memory state around the buggy address:
[   15.462881]  fff00000c175f100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.462923]  fff00000c175f180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.462965] >fff00000c175f200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   15.463002]                    ^
[   15.463034]  fff00000c175f280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   15.463427]  fff00000c175f300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.463468] ==================================================================
[   15.440041] ==================================================================
[   15.440291] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x180/0x520
[   15.440350] Read of size 1 at addr fff00000c175f200 by task kunit_try_catch/165
[   15.440401] 
[   15.440434] CPU: 1 UID: 0 PID: 165 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   15.440521] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.440546] Hardware name: linux,dummy-virt (DT)
[   15.440575] Call trace:
[   15.440596]  show_stack+0x20/0x38 (C)
[   15.440644]  dump_stack_lvl+0x8c/0xd0
[   15.441241]  print_report+0x118/0x5d0
[   15.441659]  kasan_report+0xdc/0x128
[   15.441799]  __kasan_check_byte+0x54/0x70
[   15.441996]  krealloc_noprof+0x44/0x360
[   15.442270]  krealloc_uaf+0x180/0x520
[   15.442517]  kunit_try_run_case+0x170/0x3f0
[   15.442568]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.442738]  kthread+0x328/0x630
[   15.442784]  ret_from_fork+0x10/0x20
[   15.443217] 
[   15.443266] Allocated by task 165:
[   15.443522]  kasan_save_stack+0x3c/0x68
[   15.443738]  kasan_save_track+0x20/0x40
[   15.443848]  kasan_save_alloc_info+0x40/0x58
[   15.443902]  __kasan_kmalloc+0xd4/0xd8
[   15.444022]  __kmalloc_cache_noprof+0x16c/0x3c0
[   15.444059]  krealloc_uaf+0xc8/0x520
[   15.444505]  kunit_try_run_case+0x170/0x3f0
[   15.444555]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.444607]  kthread+0x328/0x630
[   15.444638]  ret_from_fork+0x10/0x20
[   15.444674] 
[   15.444693] Freed by task 165:
[   15.445266]  kasan_save_stack+0x3c/0x68
[   15.445314]  kasan_save_track+0x20/0x40
[   15.445350]  kasan_save_free_info+0x4c/0x78
[   15.445389]  __kasan_slab_free+0x6c/0x98
[   15.445702]  kfree+0x214/0x3c8
[   15.445913]  krealloc_uaf+0x12c/0x520
[   15.445955]  kunit_try_run_case+0x170/0x3f0
[   15.445992]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.446062]  kthread+0x328/0x630
[   15.446207]  ret_from_fork+0x10/0x20
[   15.446529] 
[   15.446726] The buggy address belongs to the object at fff00000c175f200
[   15.446726]  which belongs to the cache kmalloc-256 of size 256
[   15.447040] The buggy address is located 0 bytes inside of
[   15.447040]  freed 256-byte region [fff00000c175f200, fff00000c175f300)
[   15.447513] 
[   15.447538] The buggy address belongs to the physical page:
[   15.447572] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10175e
[   15.447895] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   15.447948] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   15.448001] page_type: f5(slab)
[   15.448047] raw: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000
[   15.448235] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   15.448283] head: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000
[   15.448735] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   15.448788] head: 0bfffe0000000001 ffffc1ffc305d781 00000000ffffffff 00000000ffffffff
[   15.449043] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   15.449360] page dumped because: kasan: bad access detected
[   15.449394] 
[   15.449411] Memory state around the buggy address:
[   15.449443]  fff00000c175f100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.449685]  fff00000c175f180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.449729] >fff00000c175f200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   15.449998]                    ^
[   15.450193]  fff00000c175f280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   15.450334]  fff00000c175f300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.451403] ==================================================================

[   12.444425] ==================================================================
[   12.445167] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x1b8/0x5e0
[   12.445440] Read of size 1 at addr ffff888100350800 by task kunit_try_catch/181
[   12.446006] 
[   12.446120] CPU: 0 UID: 0 PID: 181 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   12.446166] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.446177] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.446198] Call Trace:
[   12.446209]  <TASK>
[   12.446223]  dump_stack_lvl+0x73/0xb0
[   12.446255]  print_report+0xd1/0x610
[   12.446278]  ? __virt_addr_valid+0x1db/0x2d0
[   12.446301]  ? krealloc_uaf+0x1b8/0x5e0
[   12.446323]  ? kasan_complete_mode_report_info+0x64/0x200
[   12.446347]  ? krealloc_uaf+0x1b8/0x5e0
[   12.446369]  kasan_report+0x141/0x180
[   12.446397]  ? krealloc_uaf+0x1b8/0x5e0
[   12.446422]  ? krealloc_uaf+0x1b8/0x5e0
[   12.446516]  __kasan_check_byte+0x3d/0x50
[   12.446542]  krealloc_noprof+0x3f/0x340
[   12.446566]  krealloc_uaf+0x1b8/0x5e0
[   12.446589]  ? __pfx_krealloc_uaf+0x10/0x10
[   12.446612]  ? finish_task_switch.isra.0+0x153/0x700
[   12.446639]  ? __switch_to+0x47/0xf50
[   12.446666]  ? __schedule+0x10cc/0x2b60
[   12.446689]  ? __pfx_read_tsc+0x10/0x10
[   12.446709]  ? ktime_get_ts64+0x86/0x230
[   12.446737]  kunit_try_run_case+0x1a5/0x480
[   12.446775]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.446799]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.446824]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.446850]  ? __kthread_parkme+0x82/0x180
[   12.446872]  ? preempt_count_sub+0x50/0x80
[   12.446896]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.446921]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.446946]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.446972]  kthread+0x337/0x6f0
[   12.446991]  ? trace_preempt_on+0x20/0xc0
[   12.447014]  ? __pfx_kthread+0x10/0x10
[   12.447035]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.447057]  ? calculate_sigpending+0x7b/0xa0
[   12.447081]  ? __pfx_kthread+0x10/0x10
[   12.447103]  ret_from_fork+0x116/0x1d0
[   12.447121]  ? __pfx_kthread+0x10/0x10
[   12.447142]  ret_from_fork_asm+0x1a/0x30
[   12.447173]  </TASK>
[   12.447183] 
[   12.455098] Allocated by task 181:
[   12.455234]  kasan_save_stack+0x45/0x70
[   12.455459]  kasan_save_track+0x18/0x40
[   12.455652]  kasan_save_alloc_info+0x3b/0x50
[   12.455975]  __kasan_kmalloc+0xb7/0xc0
[   12.456168]  __kmalloc_cache_noprof+0x189/0x420
[   12.456372]  krealloc_uaf+0xbb/0x5e0
[   12.456658]  kunit_try_run_case+0x1a5/0x480
[   12.456828]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.457007]  kthread+0x337/0x6f0
[   12.457166]  ret_from_fork+0x116/0x1d0
[   12.457349]  ret_from_fork_asm+0x1a/0x30
[   12.457648] 
[   12.457803] Freed by task 181:
[   12.457985]  kasan_save_stack+0x45/0x70
[   12.458171]  kasan_save_track+0x18/0x40
[   12.458307]  kasan_save_free_info+0x3f/0x60
[   12.458522]  __kasan_slab_free+0x56/0x70
[   12.458795]  kfree+0x222/0x3f0
[   12.458966]  krealloc_uaf+0x13d/0x5e0
[   12.459106]  kunit_try_run_case+0x1a5/0x480
[   12.459309]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.459749]  kthread+0x337/0x6f0
[   12.459951]  ret_from_fork+0x116/0x1d0
[   12.460141]  ret_from_fork_asm+0x1a/0x30
[   12.460325] 
[   12.460411] The buggy address belongs to the object at ffff888100350800
[   12.460411]  which belongs to the cache kmalloc-256 of size 256
[   12.461012] The buggy address is located 0 bytes inside of
[   12.461012]  freed 256-byte region [ffff888100350800, ffff888100350900)
[   12.461552] 
[   12.461652] The buggy address belongs to the physical page:
[   12.461891] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x100350
[   12.462235] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   12.462590] flags: 0x200000000000040(head|node=0|zone=2)
[   12.462850] page_type: f5(slab)
[   12.463007] raw: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000
[   12.463325] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.463675] head: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000
[   12.464067] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.464404] head: 0200000000000001 ffffea000400d401 00000000ffffffff 00000000ffffffff
[   12.464681] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   12.464921] page dumped because: kasan: bad access detected
[   12.465092] 
[   12.465189] Memory state around the buggy address:
[   12.465604]  ffff888100350700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.465984]  ffff888100350780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.466545] >ffff888100350800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.466855]                    ^
[   12.467010]  ffff888100350880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.467287]  ffff888100350900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.467581] ==================================================================
[   12.471496] ==================================================================
[   12.471815] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x53c/0x5e0
[   12.472124] Read of size 1 at addr ffff888100350800 by task kunit_try_catch/181
[   12.472420] 
[   12.472529] CPU: 0 UID: 0 PID: 181 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   12.472571] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.472582] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.472602] Call Trace:
[   12.472613]  <TASK>
[   12.472626]  dump_stack_lvl+0x73/0xb0
[   12.472654]  print_report+0xd1/0x610
[   12.472675]  ? __virt_addr_valid+0x1db/0x2d0
[   12.472696]  ? krealloc_uaf+0x53c/0x5e0
[   12.472716]  ? kasan_complete_mode_report_info+0x64/0x200
[   12.472739]  ? krealloc_uaf+0x53c/0x5e0
[   12.472926]  kasan_report+0x141/0x180
[   12.472956]  ? krealloc_uaf+0x53c/0x5e0
[   12.472983]  __asan_report_load1_noabort+0x18/0x20
[   12.473009]  krealloc_uaf+0x53c/0x5e0
[   12.473030]  ? __pfx_krealloc_uaf+0x10/0x10
[   12.473052]  ? finish_task_switch.isra.0+0x153/0x700
[   12.473075]  ? __switch_to+0x47/0xf50
[   12.473100]  ? __schedule+0x10cc/0x2b60
[   12.473122]  ? __pfx_read_tsc+0x10/0x10
[   12.473144]  ? ktime_get_ts64+0x86/0x230
[   12.473167]  kunit_try_run_case+0x1a5/0x480
[   12.473192]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.473215]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.473240]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.473264]  ? __kthread_parkme+0x82/0x180
[   12.473284]  ? preempt_count_sub+0x50/0x80
[   12.473307]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.473661]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.473687]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.473713]  kthread+0x337/0x6f0
[   12.473733]  ? trace_preempt_on+0x20/0xc0
[   12.473769]  ? __pfx_kthread+0x10/0x10
[   12.473790]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.473812]  ? calculate_sigpending+0x7b/0xa0
[   12.473837]  ? __pfx_kthread+0x10/0x10
[   12.473858]  ret_from_fork+0x116/0x1d0
[   12.473877]  ? __pfx_kthread+0x10/0x10
[   12.473898]  ret_from_fork_asm+0x1a/0x30
[   12.473928]  </TASK>
[   12.473938] 
[   12.481560] Allocated by task 181:
[   12.481722]  kasan_save_stack+0x45/0x70
[   12.481900]  kasan_save_track+0x18/0x40
[   12.482037]  kasan_save_alloc_info+0x3b/0x50
[   12.482186]  __kasan_kmalloc+0xb7/0xc0
[   12.482589]  __kmalloc_cache_noprof+0x189/0x420
[   12.482842]  krealloc_uaf+0xbb/0x5e0
[   12.483031]  kunit_try_run_case+0x1a5/0x480
[   12.483230]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.483568]  kthread+0x337/0x6f0
[   12.483703]  ret_from_fork+0x116/0x1d0
[   12.483860]  ret_from_fork_asm+0x1a/0x30
[   12.484060] 
[   12.484158] Freed by task 181:
[   12.484381]  kasan_save_stack+0x45/0x70
[   12.484599]  kasan_save_track+0x18/0x40
[   12.484782]  kasan_save_free_info+0x3f/0x60
[   12.484970]  __kasan_slab_free+0x56/0x70
[   12.485131]  kfree+0x222/0x3f0
[   12.485249]  krealloc_uaf+0x13d/0x5e0
[   12.485440]  kunit_try_run_case+0x1a5/0x480
[   12.485623]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.485889]  kthread+0x337/0x6f0
[   12.486059]  ret_from_fork+0x116/0x1d0
[   12.486245]  ret_from_fork_asm+0x1a/0x30
[   12.486530] 
[   12.486632] The buggy address belongs to the object at ffff888100350800
[   12.486632]  which belongs to the cache kmalloc-256 of size 256
[   12.487176] The buggy address is located 0 bytes inside of
[   12.487176]  freed 256-byte region [ffff888100350800, ffff888100350900)
[   12.487790] 
[   12.487893] The buggy address belongs to the physical page:
[   12.488149] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x100350
[   12.488517] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   12.488849] flags: 0x200000000000040(head|node=0|zone=2)
[   12.489032] page_type: f5(slab)
[   12.489170] raw: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000
[   12.489519] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.489938] head: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000
[   12.490270] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.490661] head: 0200000000000001 ffffea000400d401 00000000ffffffff 00000000ffffffff
[   12.490994] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   12.491306] page dumped because: kasan: bad access detected
[   12.491590] 
[   12.491686] Memory state around the buggy address:
[   12.491904]  ffff888100350700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.492152]  ffff888100350780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.492528] >ffff888100350800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.492860]                    ^
[   12.492988]  ffff888100350880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.493204]  ffff888100350900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.493746] ==================================================================