Hay
Date
July 17, 2025, 11:11 p.m.

Environment
qemu-arm64
qemu-x86_64

[   16.390836] ==================================================================
[   16.390943] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2cc/0x2f8
[   16.391015] Read of size 1 at addr fff00000c7898000 by task kunit_try_catch/148
[   16.391297] 
[   16.391417] CPU: 1 UID: 0 PID: 148 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   16.391506] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.391555] Hardware name: linux,dummy-virt (DT)
[   16.391690] Call trace:
[   16.391718]  show_stack+0x20/0x38 (C)
[   16.392117]  dump_stack_lvl+0x8c/0xd0
[   16.392280]  print_report+0x118/0x5d0
[   16.392359]  kasan_report+0xdc/0x128
[   16.392635]  __asan_report_load1_noabort+0x20/0x30
[   16.392816]  kmalloc_large_uaf+0x2cc/0x2f8
[   16.392994]  kunit_try_run_case+0x170/0x3f0
[   16.393097]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.393309]  kthread+0x328/0x630
[   16.393494]  ret_from_fork+0x10/0x20
[   16.393722] 
[   16.393750] The buggy address belongs to the physical page:
[   16.393784] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107898
[   16.393930] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   16.394077] raw: 0bfffe0000000000 ffffc1ffc31e2708 fff00000da478c40 0000000000000000
[   16.394128] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   16.394355] page dumped because: kasan: bad access detected
[   16.394543] 
[   16.394630] Memory state around the buggy address:
[   16.394726]  fff00000c7897f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.394772]  fff00000c7897f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.394820] >fff00000c7898000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.395088]                    ^
[   16.395240]  fff00000c7898080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.395328]  fff00000c7898100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.395425] ==================================================================

[   11.751957] ==================================================================
[   11.752512] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2f1/0x340
[   11.752896] Read of size 1 at addr ffff888102b2c000 by task kunit_try_catch/165
[   11.753465] 
[   11.753635] CPU: 1 UID: 0 PID: 165 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   11.753683] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.753749] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.753771] Call Trace:
[   11.753784]  <TASK>
[   11.753800]  dump_stack_lvl+0x73/0xb0
[   11.753888]  print_report+0xd1/0x610
[   11.753913]  ? __virt_addr_valid+0x1db/0x2d0
[   11.753949]  ? kmalloc_large_uaf+0x2f1/0x340
[   11.753969]  ? kasan_addr_to_slab+0x11/0xa0
[   11.753988]  ? kmalloc_large_uaf+0x2f1/0x340
[   11.754009]  kasan_report+0x141/0x180
[   11.754030]  ? kmalloc_large_uaf+0x2f1/0x340
[   11.754069]  __asan_report_load1_noabort+0x18/0x20
[   11.754093]  kmalloc_large_uaf+0x2f1/0x340
[   11.754113]  ? __pfx_kmalloc_large_uaf+0x10/0x10
[   11.754134]  ? __schedule+0x10cc/0x2b60
[   11.754157]  ? __pfx_read_tsc+0x10/0x10
[   11.754177]  ? ktime_get_ts64+0x86/0x230
[   11.754201]  kunit_try_run_case+0x1a5/0x480
[   11.754230]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.754252]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.754275]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.754299]  ? __kthread_parkme+0x82/0x180
[   11.754319]  ? preempt_count_sub+0x50/0x80
[   11.754343]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.754366]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.754388]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.754411]  kthread+0x337/0x6f0
[   11.754429]  ? trace_preempt_on+0x20/0xc0
[   11.754452]  ? __pfx_kthread+0x10/0x10
[   11.754472]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.754492]  ? calculate_sigpending+0x7b/0xa0
[   11.754515]  ? __pfx_kthread+0x10/0x10
[   11.754536]  ret_from_fork+0x116/0x1d0
[   11.754553]  ? __pfx_kthread+0x10/0x10
[   11.754573]  ret_from_fork_asm+0x1a/0x30
[   11.754672]  </TASK>
[   11.754681] 
[   11.765161] The buggy address belongs to the physical page:
[   11.765418] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b2c
[   11.766186] flags: 0x200000000000000(node=0|zone=2)
[   11.766381] raw: 0200000000000000 ffffea00040acc08 ffff88815b139f80 0000000000000000
[   11.766641] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   11.767339] page dumped because: kasan: bad access detected
[   11.768069] 
[   11.768388] Memory state around the buggy address:
[   11.768853]  ffff888102b2bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.769494]  ffff888102b2bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.770098] >ffff888102b2c000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.770573]                    ^
[   11.770690]  ffff888102b2c080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.771263]  ffff888102b2c100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.772139] ==================================================================