Hay
Date
July 22, 2025, 2:40 p.m.

Environment
qemu-arm64
qemu-x86_64

[   16.927023] ==================================================================
[   16.927459] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2cc/0x2f8
[   16.927615] Read of size 1 at addr fff00000c7888000 by task kunit_try_catch/150
[   16.927730] 
[   16.927807] CPU: 0 UID: 0 PID: 150 Comm: kunit_try_catch Tainted: G    B            N  6.15.8-rc1 #1 PREEMPT 
[   16.927949] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.927978] Hardware name: linux,dummy-virt (DT)
[   16.928008] Call trace:
[   16.928031]  show_stack+0x20/0x38 (C)
[   16.928098]  dump_stack_lvl+0x8c/0xd0
[   16.928146]  print_report+0x118/0x5d0
[   16.928191]  kasan_report+0xdc/0x128
[   16.928242]  __asan_report_load1_noabort+0x20/0x30
[   16.928315]  kmalloc_large_uaf+0x2cc/0x2f8
[   16.928362]  kunit_try_run_case+0x170/0x3f0
[   16.928409]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.928456]  kthread+0x328/0x630
[   16.928515]  ret_from_fork+0x10/0x20
[   16.928566] 
[   16.928587] The buggy address belongs to the physical page:
[   16.928617] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107888
[   16.928666] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   16.928734] raw: 0bfffe0000000000 ffffc1ffc31e2308 fff00000da47fe00 0000000000000000
[   16.928795] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   16.928834] page dumped because: kasan: bad access detected
[   16.928863] 
[   16.928881] Memory state around the buggy address:
[   16.928920]  fff00000c7887f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.928972]  fff00000c7887f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.929022] >fff00000c7888000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.929065]                    ^
[   16.929101]  fff00000c7888080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.929142]  fff00000c7888100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   16.929178] ==================================================================

[   10.571479] ==================================================================
[   10.572341] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2f1/0x340
[   10.573493] Read of size 1 at addr ffff888103c80000 by task kunit_try_catch/168
[   10.574026] 
[   10.574122] CPU: 1 UID: 0 PID: 168 Comm: kunit_try_catch Tainted: G    B            N  6.15.8-rc1 #1 PREEMPT(voluntary) 
[   10.574168] Tainted: [B]=BAD_PAGE, [N]=TEST
[   10.574178] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   10.574199] Call Trace:
[   10.574211]  <TASK>
[   10.574236]  dump_stack_lvl+0x73/0xb0
[   10.574263]  print_report+0xd1/0x610
[   10.574285]  ? __virt_addr_valid+0x1db/0x2d0
[   10.574306]  ? kmalloc_large_uaf+0x2f1/0x340
[   10.574326]  ? kasan_addr_to_slab+0x11/0xa0
[   10.574369]  ? kmalloc_large_uaf+0x2f1/0x340
[   10.574391]  kasan_report+0x141/0x180
[   10.574412]  ? kmalloc_large_uaf+0x2f1/0x340
[   10.574438]  __asan_report_load1_noabort+0x18/0x20
[   10.574458]  kmalloc_large_uaf+0x2f1/0x340
[   10.574478]  ? __pfx_kmalloc_large_uaf+0x10/0x10
[   10.574500]  ? __schedule+0x10c6/0x2b60
[   10.574523]  ? __pfx_read_tsc+0x10/0x10
[   10.574541]  ? ktime_get_ts64+0x86/0x230
[   10.574567]  kunit_try_run_case+0x1a5/0x480
[   10.574587]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.574604]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   10.574624]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   10.574664]  ? __kthread_parkme+0x82/0x180
[   10.574685]  ? preempt_count_sub+0x50/0x80
[   10.574719]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.574739]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.574761]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   10.574783]  kthread+0x337/0x6f0
[   10.574799]  ? trace_preempt_on+0x20/0xc0
[   10.574821]  ? __pfx_kthread+0x10/0x10
[   10.574838]  ? _raw_spin_unlock_irq+0x47/0x80
[   10.574860]  ? calculate_sigpending+0x7b/0xa0
[   10.574881]  ? __pfx_kthread+0x10/0x10
[   10.574898]  ret_from_fork+0x41/0x80
[   10.574917]  ? __pfx_kthread+0x10/0x10
[   10.574934]  ret_from_fork_asm+0x1a/0x30
[   10.574965]  </TASK>
[   10.574976] 
[   10.588264] The buggy address belongs to the physical page:
[   10.588463] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103c80
[   10.588705] flags: 0x200000000000000(node=0|zone=2)
[   10.588880] raw: 0200000000000000 ffffea00040f2108 ffff88815b139a80 0000000000000000
[   10.589116] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   10.589358] page dumped because: kasan: bad access detected
[   10.589598] 
[   10.589665] Memory state around the buggy address:
[   10.589820]  ffff888103c7ff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   10.590119]  ffff888103c7ff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   10.590532] >ffff888103c80000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   10.591199]                    ^
[   10.591573]  ffff888103c80080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   10.592165]  ffff888103c80100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   10.592905] ==================================================================