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

Environment
e850-96
qemu-arm64
qemu-x86_64

[   44.897589] ==================================================================
[   44.907917] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x300/0x338
[   44.914424] Read of size 1 at addr ffff000804b5a0a8 by task kunit_try_catch/268
[   44.921715] 
[   44.923202] CPU: 2 UID: 0 PID: 268 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250714 #1 PREEMPT 
[   44.923263] Tainted: [B]=BAD_PAGE, [N]=TEST
[   44.923280] Hardware name: WinLink E850-96 board (DT)
[   44.923299] Call trace:
[   44.923312]  show_stack+0x20/0x38 (C)
[   44.923348]  dump_stack_lvl+0x8c/0xd0
[   44.923380]  print_report+0x118/0x5d0
[   44.923409]  kasan_report+0xdc/0x128
[   44.923436]  __asan_report_load1_noabort+0x20/0x30
[   44.923470]  kmalloc_uaf+0x300/0x338
[   44.923499]  kunit_try_run_case+0x170/0x3f0
[   44.923540]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   44.923572]  kthread+0x328/0x630
[   44.923600]  ret_from_fork+0x10/0x20
[   44.923636] 
[   44.986646] Allocated by task 268:
[   44.990034]  kasan_save_stack+0x3c/0x68
[   44.993849]  kasan_save_track+0x20/0x40
[   44.997670]  kasan_save_alloc_info+0x40/0x58
[   45.001922]  __kasan_kmalloc+0xd4/0xd8
[   45.005655]  __kmalloc_cache_noprof+0x16c/0x3c0
[   45.010169]  kmalloc_uaf+0xb8/0x338
[   45.013641]  kunit_try_run_case+0x170/0x3f0
[   45.017807]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   45.023276]  kthread+0x328/0x630
[   45.026488]  ret_from_fork+0x10/0x20
[   45.030047] 
[   45.031525] Freed by task 268:
[   45.034562]  kasan_save_stack+0x3c/0x68
[   45.038380]  kasan_save_track+0x20/0x40
[   45.042199]  kasan_save_free_info+0x4c/0x78
[   45.046366]  __kasan_slab_free+0x6c/0x98
[   45.050272]  kfree+0x214/0x3c8
[   45.053310]  kmalloc_uaf+0x11c/0x338
[   45.056869]  kunit_try_run_case+0x170/0x3f0
[   45.061036]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   45.066504]  kthread+0x328/0x630
[   45.069717]  ret_from_fork+0x10/0x20
[   45.073275] 
[   45.074752] The buggy address belongs to the object at ffff000804b5a0a0
[   45.074752]  which belongs to the cache kmalloc-16 of size 16
[   45.087080] The buggy address is located 8 bytes inside of
[   45.087080]  freed 16-byte region [ffff000804b5a0a0, ffff000804b5a0b0)
[   45.099056] 
[   45.100534] The buggy address belongs to the physical page:
[   45.106092] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x884b5a
[   45.114076] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   45.120587] page_type: f5(slab)
[   45.123721] raw: 0bfffe0000000000 ffff000800002640 dead000000000122 0000000000000000
[   45.131441] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   45.139162] page dumped because: kasan: bad access detected
[   45.144715] 
[   45.146192] Memory state around the buggy address:
[   45.150970]  ffff000804b59f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   45.158175]  ffff000804b5a000: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   45.165378] >ffff000804b5a080: fa fb fc fc fa fb fc fc fc fc fc fc fc fc fc fc
[   45.172579]                                   ^
[   45.177097]  ffff000804b5a100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   45.184302]  ffff000804b5a180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   45.191505] ==================================================================

[   29.735339] ==================================================================
[   29.735822] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x300/0x338
[   29.736073] Read of size 1 at addr fff00000c64c1b08 by task kunit_try_catch/215
[   29.736126] 
[   29.736163] CPU: 0 UID: 0 PID: 215 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250714 #1 PREEMPT 
[   29.736289] Tainted: [B]=BAD_PAGE, [N]=TEST
[   29.736314] Hardware name: linux,dummy-virt (DT)
[   29.736347] Call trace:
[   29.736371]  show_stack+0x20/0x38 (C)
[   29.736420]  dump_stack_lvl+0x8c/0xd0
[   29.736467]  print_report+0x118/0x5d0
[   29.736508]  kasan_report+0xdc/0x128
[   29.736777]  __asan_report_load1_noabort+0x20/0x30
[   29.736835]  kmalloc_uaf+0x300/0x338
[   29.737037]  kunit_try_run_case+0x170/0x3f0
[   29.737226]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   29.737280]  kthread+0x328/0x630
[   29.737321]  ret_from_fork+0x10/0x20
[   29.737397] 
[   29.737416] Allocated by task 215:
[   29.737451]  kasan_save_stack+0x3c/0x68
[   29.737495]  kasan_save_track+0x20/0x40
[   29.737550]  kasan_save_alloc_info+0x40/0x58
[   29.737593]  __kasan_kmalloc+0xd4/0xd8
[   29.737831]  __kmalloc_cache_noprof+0x16c/0x3c0
[   29.738031]  kmalloc_uaf+0xb8/0x338
[   29.738082]  kunit_try_run_case+0x170/0x3f0
[   29.738160]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   29.738213]  kthread+0x328/0x630
[   29.738287]  ret_from_fork+0x10/0x20
[   29.738460] 
[   29.738481] Freed by task 215:
[   29.738507]  kasan_save_stack+0x3c/0x68
[   29.738663]  kasan_save_track+0x20/0x40
[   29.738776]  kasan_save_free_info+0x4c/0x78
[   29.738814]  __kasan_slab_free+0x6c/0x98
[   29.739177]  kfree+0x214/0x3c8
[   29.739231]  kmalloc_uaf+0x11c/0x338
[   29.739268]  kunit_try_run_case+0x170/0x3f0
[   29.739347]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   29.739530]  kthread+0x328/0x630
[   29.739695]  ret_from_fork+0x10/0x20
[   29.739733] 
[   29.739788] The buggy address belongs to the object at fff00000c64c1b00
[   29.739788]  which belongs to the cache kmalloc-16 of size 16
[   29.739846] The buggy address is located 8 bytes inside of
[   29.739846]  freed 16-byte region [fff00000c64c1b00, fff00000c64c1b10)
[   29.739927] 
[   29.740034] The buggy address belongs to the physical page:
[   29.740371] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xfff00000c64c1a40 pfn:0x1064c1
[   29.740543] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   29.740597] page_type: f5(slab)
[   29.740639] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   29.740801] raw: fff00000c64c1a40 000000008080007f 00000000f5000000 0000000000000000
[   29.740845] page dumped because: kasan: bad access detected
[   29.740933] 
[   29.741016] Memory state around the buggy address:
[   29.741132]  fff00000c64c1a00: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   29.741177]  fff00000c64c1a80: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   29.741219] >fff00000c64c1b00: fa fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.741312]                       ^
[   29.741383]  fff00000c64c1b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.741453]  fff00000c64c1c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.741496] ==================================================================

[   24.534522] ==================================================================
[   24.535181] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x320/0x380
[   24.535501] Read of size 1 at addr ffff888103e49468 by task kunit_try_catch/233
[   24.535856] 
[   24.536220] CPU: 0 UID: 0 PID: 233 Comm: kunit_try_catch Tainted: G    B   W        N  6.16.0-rc6-next-20250714 #1 PREEMPT(voluntary) 
[   24.536279] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST
[   24.536292] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   24.536315] Call Trace:
[   24.536329]  <TASK>
[   24.536348]  dump_stack_lvl+0x73/0xb0
[   24.536400]  print_report+0xd1/0x610
[   24.536423]  ? __virt_addr_valid+0x1db/0x2d0
[   24.536447]  ? kmalloc_uaf+0x320/0x380
[   24.536477]  ? kasan_complete_mode_report_info+0x64/0x200
[   24.536502]  ? kmalloc_uaf+0x320/0x380
[   24.536521]  kasan_report+0x141/0x180
[   24.536542]  ? kmalloc_uaf+0x320/0x380
[   24.536575]  __asan_report_load1_noabort+0x18/0x20
[   24.536598]  kmalloc_uaf+0x320/0x380
[   24.536616]  ? __pfx_kmalloc_uaf+0x10/0x10
[   24.536648]  ? __pfx_kmalloc_uaf+0x10/0x10
[   24.536681]  kunit_try_run_case+0x1a5/0x480
[   24.536705]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.536724]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   24.536757]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   24.536780]  ? __kthread_parkme+0x82/0x180
[   24.536802]  ? preempt_count_sub+0x50/0x80
[   24.536835]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.536856]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.536880]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   24.536904]  kthread+0x337/0x6f0
[   24.536924]  ? trace_preempt_on+0x20/0xc0
[   24.537046]  ? __pfx_kthread+0x10/0x10
[   24.537067]  ? _raw_spin_unlock_irq+0x47/0x80
[   24.537088]  ? calculate_sigpending+0x7b/0xa0
[   24.537111]  ? __pfx_kthread+0x10/0x10
[   24.537132]  ret_from_fork+0x116/0x1d0
[   24.537152]  ? __pfx_kthread+0x10/0x10
[   24.537172]  ret_from_fork_asm+0x1a/0x30
[   24.537202]  </TASK>
[   24.537214] 
[   24.544598] Allocated by task 233:
[   24.544780]  kasan_save_stack+0x45/0x70
[   24.545136]  kasan_save_track+0x18/0x40
[   24.545347]  kasan_save_alloc_info+0x3b/0x50
[   24.545549]  __kasan_kmalloc+0xb7/0xc0
[   24.545738]  __kmalloc_cache_noprof+0x189/0x420
[   24.546077]  kmalloc_uaf+0xaa/0x380
[   24.546247]  kunit_try_run_case+0x1a5/0x480
[   24.546448]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.546719]  kthread+0x337/0x6f0
[   24.546910]  ret_from_fork+0x116/0x1d0
[   24.547172]  ret_from_fork_asm+0x1a/0x30
[   24.547373] 
[   24.547475] Freed by task 233:
[   24.547620]  kasan_save_stack+0x45/0x70
[   24.547764]  kasan_save_track+0x18/0x40
[   24.547899]  kasan_save_free_info+0x3f/0x60
[   24.548039]  __kasan_slab_free+0x56/0x70
[   24.548169]  kfree+0x222/0x3f0
[   24.548600]  kmalloc_uaf+0x12c/0x380
[   24.548855]  kunit_try_run_case+0x1a5/0x480
[   24.549191]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.549451]  kthread+0x337/0x6f0
[   24.549642]  ret_from_fork+0x116/0x1d0
[   24.549865]  ret_from_fork_asm+0x1a/0x30
[   24.550112] 
[   24.550271] The buggy address belongs to the object at ffff888103e49460
[   24.550271]  which belongs to the cache kmalloc-16 of size 16
[   24.550696] The buggy address is located 8 bytes inside of
[   24.550696]  freed 16-byte region [ffff888103e49460, ffff888103e49470)
[   24.551259] 
[   24.551358] The buggy address belongs to the physical page:
[   24.551645] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103e49
[   24.552337] flags: 0x200000000000000(node=0|zone=2)
[   24.552512] page_type: f5(slab)
[   24.552673] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   24.553144] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   24.553506] page dumped because: kasan: bad access detected
[   24.553693] 
[   24.553782] Memory state around the buggy address:
[   24.554066]  ffff888103e49300: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   24.554436]  ffff888103e49380: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   24.554745] >ffff888103e49400: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   24.555144]                                                           ^
[   24.555421]  ffff888103e49480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.555708]  ffff888103e49500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.556214] ==================================================================