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

Environment
qemu-arm64
qemu-x86_64

[   15.134788] ==================================================================
[   15.134849] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2cc/0x2f8
[   15.134898] Read of size 1 at addr fff00000c7750000 by task kunit_try_catch/148
[   15.134947] 
[   15.134979] CPU: 1 UID: 0 PID: 148 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   15.135060] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.135086] Hardware name: linux,dummy-virt (DT)
[   15.135115] Call trace:
[   15.135137]  show_stack+0x20/0x38 (C)
[   15.135185]  dump_stack_lvl+0x8c/0xd0
[   15.135230]  print_report+0x118/0x5d0
[   15.135276]  kasan_report+0xdc/0x128
[   15.135321]  __asan_report_load1_noabort+0x20/0x30
[   15.135388]  kmalloc_large_uaf+0x2cc/0x2f8
[   15.135432]  kunit_try_run_case+0x170/0x3f0
[   15.135479]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.135530]  kthread+0x328/0x630
[   15.135574]  ret_from_fork+0x10/0x20
[   15.135621] 
[   15.135640] The buggy address belongs to the physical page:
[   15.135671] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107750
[   15.135721] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   15.135781] raw: 0bfffe0000000000 ffffc1ffc31dd508 fff00000da478c40 0000000000000000
[   15.135829] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   15.135867] page dumped because: kasan: bad access detected
[   15.135897] 
[   15.135915] Memory state around the buggy address:
[   15.135946]  fff00000c774ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.135987]  fff00000c774ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.136028] >fff00000c7750000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   15.136064]                    ^
[   15.136091]  fff00000c7750080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   15.136131]  fff00000c7750100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   15.136168] ==================================================================

[   11.604714] ==================================================================
[   11.605723] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2f1/0x340
[   11.606074] Read of size 1 at addr ffff8881028a4000 by task kunit_try_catch/167
[   11.606334] 
[   11.606783] CPU: 0 UID: 0 PID: 167 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   11.606830] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.606841] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.606861] Call Trace:
[   11.606872]  <TASK>
[   11.606887]  dump_stack_lvl+0x73/0xb0
[   11.606915]  print_report+0xd1/0x610
[   11.607028]  ? __virt_addr_valid+0x1db/0x2d0
[   11.607051]  ? kmalloc_large_uaf+0x2f1/0x340
[   11.607071]  ? kasan_addr_to_slab+0x11/0xa0
[   11.607205]  ? kmalloc_large_uaf+0x2f1/0x340
[   11.607230]  kasan_report+0x141/0x180
[   11.607252]  ? kmalloc_large_uaf+0x2f1/0x340
[   11.607289]  __asan_report_load1_noabort+0x18/0x20
[   11.607313]  kmalloc_large_uaf+0x2f1/0x340
[   11.607334]  ? __pfx_kmalloc_large_uaf+0x10/0x10
[   11.607355]  ? __schedule+0x10cc/0x2b60
[   11.607377]  ? __pfx_read_tsc+0x10/0x10
[   11.607398]  ? ktime_get_ts64+0x86/0x230
[   11.607420]  kunit_try_run_case+0x1a5/0x480
[   11.607443]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.607465]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.607488]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.607511]  ? __kthread_parkme+0x82/0x180
[   11.607530]  ? preempt_count_sub+0x50/0x80
[   11.607553]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.607576]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.607599]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.607622]  kthread+0x337/0x6f0
[   11.607641]  ? trace_preempt_on+0x20/0xc0
[   11.607663]  ? __pfx_kthread+0x10/0x10
[   11.607682]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.607703]  ? calculate_sigpending+0x7b/0xa0
[   11.607726]  ? __pfx_kthread+0x10/0x10
[   11.607746]  ret_from_fork+0x116/0x1d0
[   11.607764]  ? __pfx_kthread+0x10/0x10
[   11.607783]  ret_from_fork_asm+0x1a/0x30
[   11.607813]  </TASK>
[   11.607822] 
[   11.622923] The buggy address belongs to the physical page:
[   11.623180] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1028a4
[   11.624514] flags: 0x200000000000000(node=0|zone=2)
[   11.625350] raw: 0200000000000000 ffffea00040a2a08 ffff88815b039f80 0000000000000000
[   11.626280] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   11.626778] page dumped because: kasan: bad access detected
[   11.627441] 
[   11.627518] Memory state around the buggy address:
[   11.627677]  ffff8881028a3f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.627895]  ffff8881028a3f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.628707] >ffff8881028a4000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.629686]                    ^
[   11.629994]  ffff8881028a4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.631102]  ffff8881028a4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.631868] ==================================================================