Hay
Date
July 14, 2025, 10:38 a.m.

Environment
e850-96
qemu-arm64
qemu-x86_64

[   42.527865] ==================================================================
[   42.537122] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x3bc/0x438
[   42.543888] Read of size 16 at addr ffff000804b5a080 by task kunit_try_catch/252
[   42.551265] 
[   42.552750] CPU: 2 UID: 0 PID: 252 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250714 #1 PREEMPT 
[   42.552801] Tainted: [B]=BAD_PAGE, [N]=TEST
[   42.552819] Hardware name: WinLink E850-96 board (DT)
[   42.552839] Call trace:
[   42.552854]  show_stack+0x20/0x38 (C)
[   42.552887]  dump_stack_lvl+0x8c/0xd0
[   42.552919]  print_report+0x118/0x5d0
[   42.552946]  kasan_report+0xdc/0x128
[   42.552973]  __asan_report_load16_noabort+0x20/0x30
[   42.553007]  kmalloc_uaf_16+0x3bc/0x438
[   42.553036]  kunit_try_run_case+0x170/0x3f0
[   42.553073]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   42.553105]  kthread+0x328/0x630
[   42.553135]  ret_from_fork+0x10/0x20
[   42.553168] 
[   42.616542] Allocated by task 252:
[   42.619930]  kasan_save_stack+0x3c/0x68
[   42.623746]  kasan_save_track+0x20/0x40
[   42.627565]  kasan_save_alloc_info+0x40/0x58
[   42.631818]  __kasan_kmalloc+0xd4/0xd8
[   42.635552]  __kmalloc_cache_noprof+0x16c/0x3c0
[   42.640065]  kmalloc_uaf_16+0x140/0x438
[   42.643884]  kunit_try_run_case+0x170/0x3f0
[   42.648051]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   42.653521]  kthread+0x328/0x630
[   42.656731]  ret_from_fork+0x10/0x20
[   42.660291] 
[   42.661766] Freed by task 252:
[   42.664805]  kasan_save_stack+0x3c/0x68
[   42.668624]  kasan_save_track+0x20/0x40
[   42.672445]  kasan_save_free_info+0x4c/0x78
[   42.676610]  __kasan_slab_free+0x6c/0x98
[   42.680516]  kfree+0x214/0x3c8
[   42.683554]  kmalloc_uaf_16+0x190/0x438
[   42.687374]  kunit_try_run_case+0x170/0x3f0
[   42.691540]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   42.697009]  kthread+0x328/0x630
[   42.700221]  ret_from_fork+0x10/0x20
[   42.703779] 
[   42.705255] The buggy address belongs to the object at ffff000804b5a080
[   42.705255]  which belongs to the cache kmalloc-16 of size 16
[   42.717585] The buggy address is located 0 bytes inside of
[   42.717585]  freed 16-byte region [ffff000804b5a080, ffff000804b5a090)
[   42.729560] 
[   42.731038] The buggy address belongs to the physical page:
[   42.736596] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x884b5a
[   42.744581] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   42.751091] page_type: f5(slab)
[   42.754226] raw: 0bfffe0000000000 ffff000800002640 dead000000000122 0000000000000000
[   42.761945] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   42.769666] page dumped because: kasan: bad access detected
[   42.775219] 
[   42.776695] Memory state around the buggy address:
[   42.781477]  ffff000804b59f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   42.788679]  ffff000804b5a000: fa fb fc fc fa fb fc fc fa fb fc fc 00 00 fc fc
[   42.795883] >ffff000804b5a080: fa fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   42.803084]                    ^
[   42.806299]  ffff000804b5a100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   42.813504]  ffff000804b5a180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   42.820706] ==================================================================

[   29.562476] ==================================================================
[   29.562555] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x3bc/0x438
[   29.562618] Read of size 16 at addr fff00000c64c1ae0 by task kunit_try_catch/199
[   29.562854] 
[   29.562913] CPU: 0 UID: 0 PID: 199 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250714 #1 PREEMPT 
[   29.562999] Tainted: [B]=BAD_PAGE, [N]=TEST
[   29.563031] Hardware name: linux,dummy-virt (DT)
[   29.563100] Call trace:
[   29.563133]  show_stack+0x20/0x38 (C)
[   29.563185]  dump_stack_lvl+0x8c/0xd0
[   29.563230]  print_report+0x118/0x5d0
[   29.563272]  kasan_report+0xdc/0x128
[   29.563314]  __asan_report_load16_noabort+0x20/0x30
[   29.563362]  kmalloc_uaf_16+0x3bc/0x438
[   29.563416]  kunit_try_run_case+0x170/0x3f0
[   29.563472]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   29.563521]  kthread+0x328/0x630
[   29.563562]  ret_from_fork+0x10/0x20
[   29.563608] 
[   29.563626] Allocated by task 199:
[   29.563822]  kasan_save_stack+0x3c/0x68
[   29.563880]  kasan_save_track+0x20/0x40
[   29.563918]  kasan_save_alloc_info+0x40/0x58
[   29.564123]  __kasan_kmalloc+0xd4/0xd8
[   29.564658]  __kmalloc_cache_noprof+0x16c/0x3c0
[   29.564894]  kmalloc_uaf_16+0x140/0x438
[   29.564944]  kunit_try_run_case+0x170/0x3f0
[   29.564984]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   29.565384]  kthread+0x328/0x630
[   29.565593]  ret_from_fork+0x10/0x20
[   29.565898] 
[   29.565974] Freed by task 199:
[   29.566002]  kasan_save_stack+0x3c/0x68
[   29.566044]  kasan_save_track+0x20/0x40
[   29.566728]  kasan_save_free_info+0x4c/0x78
[   29.566775]  __kasan_slab_free+0x6c/0x98
[   29.567040]  kfree+0x214/0x3c8
[   29.567094]  kmalloc_uaf_16+0x190/0x438
[   29.567131]  kunit_try_run_case+0x170/0x3f0
[   29.567169]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   29.567947]  kthread+0x328/0x630
[   29.568009]  ret_from_fork+0x10/0x20
[   29.568472] 
[   29.568654] The buggy address belongs to the object at fff00000c64c1ae0
[   29.568654]  which belongs to the cache kmalloc-16 of size 16
[   29.568720] The buggy address is located 0 bytes inside of
[   29.568720]  freed 16-byte region [fff00000c64c1ae0, fff00000c64c1af0)
[   29.568779] 
[   29.569119] The buggy address belongs to the physical page:
[   29.569371] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xfff00000c64c1a40 pfn:0x1064c1
[   29.569952] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   29.570261] page_type: f5(slab)
[   29.570507] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   29.570655] raw: fff00000c64c1a40 000000008080007f 00000000f5000000 0000000000000000
[   29.570957] page dumped because: kasan: bad access detected
[   29.570989] 
[   29.571007] Memory state around the buggy address:
[   29.571043]  fff00000c64c1980: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   29.571474]  fff00000c64c1a00: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   29.571548] >fff00000c64c1a80: fa fb fc fc fa fb fc fc 00 00 fc fc fa fb fc fc
[   29.571585]                                                        ^
[   29.571829]  fff00000c64c1b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.571872]  fff00000c64c1b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.571909] ==================================================================

[   24.273911] ==================================================================
[   24.275036] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x47b/0x4c0
[   24.275630] Read of size 16 at addr ffff888103e49440 by task kunit_try_catch/217
[   24.276504] 
[   24.276704] CPU: 0 UID: 0 PID: 217 Comm: kunit_try_catch Tainted: G    B   W        N  6.16.0-rc6-next-20250714 #1 PREEMPT(voluntary) 
[   24.276759] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST
[   24.276772] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   24.276796] Call Trace:
[   24.276810]  <TASK>
[   24.276842]  dump_stack_lvl+0x73/0xb0
[   24.276876]  print_report+0xd1/0x610
[   24.276899]  ? __virt_addr_valid+0x1db/0x2d0
[   24.276923]  ? kmalloc_uaf_16+0x47b/0x4c0
[   24.276942]  ? kasan_complete_mode_report_info+0x64/0x200
[   24.276979]  ? kmalloc_uaf_16+0x47b/0x4c0
[   24.276999]  kasan_report+0x141/0x180
[   24.277020]  ? kmalloc_uaf_16+0x47b/0x4c0
[   24.277044]  __asan_report_load16_noabort+0x18/0x20
[   24.277067]  kmalloc_uaf_16+0x47b/0x4c0
[   24.277087]  ? __pfx_kmalloc_uaf_16+0x10/0x10
[   24.277108]  ? __schedule+0x10cc/0x2b60
[   24.277131]  ? __pfx_read_tsc+0x10/0x10
[   24.277152]  ? ktime_get_ts64+0x86/0x230
[   24.277177]  kunit_try_run_case+0x1a5/0x480
[   24.277200]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.277219]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   24.277242]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   24.277265]  ? __kthread_parkme+0x82/0x180
[   24.277287]  ? preempt_count_sub+0x50/0x80
[   24.277311]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.277331]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.277356]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   24.277380]  kthread+0x337/0x6f0
[   24.277400]  ? trace_preempt_on+0x20/0xc0
[   24.277423]  ? __pfx_kthread+0x10/0x10
[   24.277443]  ? _raw_spin_unlock_irq+0x47/0x80
[   24.277464]  ? calculate_sigpending+0x7b/0xa0
[   24.277487]  ? __pfx_kthread+0x10/0x10
[   24.277508]  ret_from_fork+0x116/0x1d0
[   24.277527]  ? __pfx_kthread+0x10/0x10
[   24.277547]  ret_from_fork_asm+0x1a/0x30
[   24.277577]  </TASK>
[   24.277588] 
[   24.288843] Allocated by task 217:
[   24.289228]  kasan_save_stack+0x45/0x70
[   24.289550]  kasan_save_track+0x18/0x40
[   24.289985]  kasan_save_alloc_info+0x3b/0x50
[   24.290427]  __kasan_kmalloc+0xb7/0xc0
[   24.290562]  __kmalloc_cache_noprof+0x189/0x420
[   24.290724]  kmalloc_uaf_16+0x15b/0x4c0
[   24.291159]  kunit_try_run_case+0x1a5/0x480
[   24.291640]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.292311]  kthread+0x337/0x6f0
[   24.292606]  ret_from_fork+0x116/0x1d0
[   24.293098]  ret_from_fork_asm+0x1a/0x30
[   24.293445] 
[   24.293512] Freed by task 217:
[   24.293617]  kasan_save_stack+0x45/0x70
[   24.293764]  kasan_save_track+0x18/0x40
[   24.293892]  kasan_save_free_info+0x3f/0x60
[   24.294030]  __kasan_slab_free+0x56/0x70
[   24.294163]  kfree+0x222/0x3f0
[   24.294273]  kmalloc_uaf_16+0x1d6/0x4c0
[   24.294402]  kunit_try_run_case+0x1a5/0x480
[   24.294539]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.294922]  kthread+0x337/0x6f0
[   24.295211]  ret_from_fork+0x116/0x1d0
[   24.295586]  ret_from_fork_asm+0x1a/0x30
[   24.295997] 
[   24.296246] The buggy address belongs to the object at ffff888103e49440
[   24.296246]  which belongs to the cache kmalloc-16 of size 16
[   24.297385] The buggy address is located 0 bytes inside of
[   24.297385]  freed 16-byte region [ffff888103e49440, ffff888103e49450)
[   24.298375] 
[   24.298548] The buggy address belongs to the physical page:
[   24.299084] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103e49
[   24.299896] flags: 0x200000000000000(node=0|zone=2)
[   24.300460] page_type: f5(slab)
[   24.300825] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   24.301711] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   24.302513] page dumped because: kasan: bad access detected
[   24.303137] 
[   24.303353] Memory state around the buggy address:
[   24.303801]  ffff888103e49300: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   24.304071]  ffff888103e49380: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   24.304296] >ffff888103e49400: fa fb fc fc 00 00 fc fc fa fb fc fc fc fc fc fc
[   24.304503]                                            ^
[   24.304677]  ffff888103e49480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.304886]  ffff888103e49500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.305090] ==================================================================