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

Environment
e850-96
qemu-arm64
qemu-x86_64

[   38.522743] ==================================================================
[   38.532718] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2cc/0x2f8
[   38.539313] Read of size 1 at addr ffff000806dc4000 by task kunit_try_catch/232
[   38.546603] 
[   38.548089] CPU: 4 UID: 0 PID: 232 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5-next-20250711 #1 PREEMPT 
[   38.548146] Tainted: [B]=BAD_PAGE, [N]=TEST
[   38.548163] Hardware name: WinLink E850-96 board (DT)
[   38.548185] Call trace:
[   38.548200]  show_stack+0x20/0x38 (C)
[   38.548236]  dump_stack_lvl+0x8c/0xd0
[   38.548271]  print_report+0x118/0x5d0
[   38.548303]  kasan_report+0xdc/0x128
[   38.548330]  __asan_report_load1_noabort+0x20/0x30
[   38.548366]  kmalloc_large_uaf+0x2cc/0x2f8
[   38.548399]  kunit_try_run_case+0x170/0x3f0
[   38.548437]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   38.548469]  kthread+0x328/0x630
[   38.548499]  ret_from_fork+0x10/0x20
[   38.548535] 
[   38.612057] The buggy address belongs to the physical page:
[   38.617612] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x886dc4
[   38.625596] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   38.632117] raw: 0bfffe0000000000 fffffdffe01b7208 ffff00085afabfc0 0000000000000000
[   38.639837] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   38.647558] page dumped because: kasan: bad access detected
[   38.653111] 
[   38.654587] Memory state around the buggy address:
[   38.659367]  ffff000806dc3f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   38.666570]  ffff000806dc3f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   38.673777] >ffff000806dc4000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   38.680976]                    ^
[   38.684191]  ffff000806dc4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   38.691396]  ffff000806dc4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   38.698597] ==================================================================

[   30.129762] ==================================================================
[   30.129829] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2cc/0x2f8
[   30.129890] Read of size 1 at addr fff00000c91b4000 by task kunit_try_catch/179
[   30.129939] 
[   30.129977] CPU: 1 UID: 0 PID: 179 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5-next-20250711 #1 PREEMPT 
[   30.130061] Tainted: [B]=BAD_PAGE, [N]=TEST
[   30.130088] Hardware name: linux,dummy-virt (DT)
[   30.130134] Call trace:
[   30.130190]  show_stack+0x20/0x38 (C)
[   30.130242]  dump_stack_lvl+0x8c/0xd0
[   30.130289]  print_report+0x118/0x5d0
[   30.130344]  kasan_report+0xdc/0x128
[   30.130385]  __asan_report_load1_noabort+0x20/0x30
[   30.130432]  kmalloc_large_uaf+0x2cc/0x2f8
[   30.130476]  kunit_try_run_case+0x170/0x3f0
[   30.130524]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.130592]  kthread+0x328/0x630
[   30.130644]  ret_from_fork+0x10/0x20
[   30.130699] 
[   30.130736] The buggy address belongs to the physical page:
[   30.130774] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1091b4
[   30.130827] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   30.130904] raw: 0bfffe0000000000 fff00000da478d00 fff00000da478d00 0000000000000000
[   30.130962] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   30.131000] page dumped because: kasan: bad access detected
[   30.131047] 
[   30.131065] Memory state around the buggy address:
[   30.131097]  fff00000c91b3f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.131137]  fff00000c91b3f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.131177] >fff00000c91b4000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   30.131213]                    ^
[   30.131265]  fff00000c91b4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   30.131305]  fff00000c91b4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   30.131350] ==================================================================

[   23.264427] ==================================================================
[   23.265493] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2f1/0x340
[   23.265761] Read of size 1 at addr ffff888103f68000 by task kunit_try_catch/198
[   23.266807] 
[   23.267014] CPU: 0 UID: 0 PID: 198 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5-next-20250711 #1 PREEMPT(voluntary) 
[   23.267181] Tainted: [B]=BAD_PAGE, [N]=TEST
[   23.267195] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   23.267219] Call Trace:
[   23.267234]  <TASK>
[   23.267253]  dump_stack_lvl+0x73/0xb0
[   23.267401]  print_report+0xd1/0x610
[   23.267428]  ? __virt_addr_valid+0x1db/0x2d0
[   23.267455]  ? kmalloc_large_uaf+0x2f1/0x340
[   23.267475]  ? kasan_addr_to_slab+0x11/0xa0
[   23.267495]  ? kmalloc_large_uaf+0x2f1/0x340
[   23.267515]  kasan_report+0x141/0x180
[   23.267537]  ? kmalloc_large_uaf+0x2f1/0x340
[   23.267562]  __asan_report_load1_noabort+0x18/0x20
[   23.267585]  kmalloc_large_uaf+0x2f1/0x340
[   23.267605]  ? __pfx_kmalloc_large_uaf+0x10/0x10
[   23.267626]  ? __schedule+0x10cc/0x2b60
[   23.267649]  ? __pfx_read_tsc+0x10/0x10
[   23.267672]  ? ktime_get_ts64+0x86/0x230
[   23.267699]  kunit_try_run_case+0x1a5/0x480
[   23.267723]  ? __pfx_kunit_try_run_case+0x10/0x10
[   23.267755]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   23.267778]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   23.267800]  ? __kthread_parkme+0x82/0x180
[   23.267822]  ? preempt_count_sub+0x50/0x80
[   23.267846]  ? __pfx_kunit_try_run_case+0x10/0x10
[   23.267867]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   23.267891]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   23.267916]  kthread+0x337/0x6f0
[   23.267935]  ? trace_preempt_on+0x20/0xc0
[   23.267959]  ? __pfx_kthread+0x10/0x10
[   23.267980]  ? _raw_spin_unlock_irq+0x47/0x80
[   23.268001]  ? calculate_sigpending+0x7b/0xa0
[   23.268025]  ? __pfx_kthread+0x10/0x10
[   23.268046]  ret_from_fork+0x116/0x1d0
[   23.268065]  ? __pfx_kthread+0x10/0x10
[   23.268085]  ret_from_fork_asm+0x1a/0x30
[   23.268117]  </TASK>
[   23.268128] 
[   23.281888] The buggy address belongs to the physical page:
[   23.282072] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103f68
[   23.282326] flags: 0x200000000000000(node=0|zone=2)
[   23.282568] raw: 0200000000000000 ffffea00040fdb08 ffff88815b039fc0 0000000000000000
[   23.283027] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   23.283453] page dumped because: kasan: bad access detected
[   23.283774] 
[   23.283889] Memory state around the buggy address:
[   23.284092]  ffff888103f67f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.284416]  ffff888103f67f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.284819] >ffff888103f68000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   23.285130]                    ^
[   23.285277]  ffff888103f68080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   23.285776]  ffff888103f68100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   23.286081] ==================================================================