Hay
Date
June 18, 2025, 6:43 a.m.

Environment
qemu-arm64
qemu-x86_64

[   19.884903] ==================================================================
[   19.885084] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2cc/0x2f8
[   19.885225] Read of size 1 at addr fff00000c76cc000 by task kunit_try_catch/158
[   19.885345] 
[   19.885430] CPU: 0 UID: 0 PID: 158 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250618 #1 PREEMPT 
[   19.885624] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.885681] Hardware name: linux,dummy-virt (DT)
[   19.885750] Call trace:
[   19.885800]  show_stack+0x20/0x38 (C)
[   19.885906]  dump_stack_lvl+0x8c/0xd0
[   19.886011]  print_report+0x118/0x608
[   19.886334]  kasan_report+0xdc/0x128
[   19.886428]  __asan_report_load1_noabort+0x20/0x30
[   19.886531]  kmalloc_large_uaf+0x2cc/0x2f8
[   19.887414]  kunit_try_run_case+0x170/0x3f0
[   19.887810]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.887938]  kthread+0x328/0x630
[   19.888049]  ret_from_fork+0x10/0x20
[   19.888985] 
[   19.889071] The buggy address belongs to the physical page:
[   19.889219] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1076cc
[   19.889623] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.889781] raw: 0bfffe0000000000 ffffc1ffc31db408 fff00000da473c80 0000000000000000
[   19.889893] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   19.889982] page dumped because: kasan: bad access detected
[   19.890265] 
[   19.890466] Memory state around the buggy address:
[   19.890548]  fff00000c76cbf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.890654]  fff00000c76cbf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.890748] >fff00000c76cc000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   19.891335]                    ^
[   19.891472]  fff00000c76cc080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   19.891575]  fff00000c76cc100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   19.891661] ==================================================================

[   10.668232] ==================================================================
[   10.668635] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2f1/0x340
[   10.668861] Read of size 1 at addr ffff888102c40000 by task kunit_try_catch/174
[   10.669081] 
[   10.669160] CPU: 0 UID: 0 PID: 174 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250618 #1 PREEMPT(voluntary) 
[   10.669217] Tainted: [B]=BAD_PAGE, [N]=TEST
[   10.669229] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   10.669249] Call Trace:
[   10.669262]  <TASK>
[   10.669278]  dump_stack_lvl+0x73/0xb0
[   10.669303]  print_report+0xd1/0x650
[   10.669323]  ? __virt_addr_valid+0x1db/0x2d0
[   10.669344]  ? kmalloc_large_uaf+0x2f1/0x340
[   10.669362]  ? kasan_addr_to_slab+0x11/0xa0
[   10.669382]  ? kmalloc_large_uaf+0x2f1/0x340
[   10.669401]  kasan_report+0x141/0x180
[   10.669422]  ? kmalloc_large_uaf+0x2f1/0x340
[   10.669445]  __asan_report_load1_noabort+0x18/0x20
[   10.669467]  kmalloc_large_uaf+0x2f1/0x340
[   10.669486]  ? __pfx_kmalloc_large_uaf+0x10/0x10
[   10.669506]  ? __schedule+0x10cc/0x2b60
[   10.669526]  ? __pfx_read_tsc+0x10/0x10
[   10.669546]  ? ktime_get_ts64+0x86/0x230
[   10.669570]  kunit_try_run_case+0x1a5/0x480
[   10.669592]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.669613]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   10.669633]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   10.669654]  ? __kthread_parkme+0x82/0x180
[   10.669673]  ? preempt_count_sub+0x50/0x80
[   10.669697]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.669719]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.669739]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   10.669760]  kthread+0x337/0x6f0
[   10.669778]  ? trace_preempt_on+0x20/0xc0
[   10.669801]  ? __pfx_kthread+0x10/0x10
[   10.669819]  ? _raw_spin_unlock_irq+0x47/0x80
[   10.669838]  ? calculate_sigpending+0x7b/0xa0
[   10.669861]  ? __pfx_kthread+0x10/0x10
[   10.669880]  ret_from_fork+0x116/0x1d0
[   10.669897]  ? __pfx_kthread+0x10/0x10
[   10.669916]  ret_from_fork_asm+0x1a/0x30
[   10.669945]  </TASK>
[   10.669955] 
[   10.680237] The buggy address belongs to the physical page:
[   10.680978] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102c40
[   10.681817] flags: 0x200000000000000(node=0|zone=2)
[   10.682335] raw: 0200000000000000 ffffea00040b1108 ffff888154639fc0 0000000000000000
[   10.683106] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   10.683901] page dumped because: kasan: bad access detected
[   10.684538] 
[   10.684703] Memory state around the buggy address:
[   10.685163]  ffff888102c3ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.685921]  ffff888102c3ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.686606] >ffff888102c40000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   10.687151]                    ^
[   10.687447]  ffff888102c40080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   10.688058]  ffff888102c40100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   10.688548] ==================================================================