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

Environment
qemu-arm64
qemu-x86_64

[   17.814496] ==================================================================
[   17.814571] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2cc/0x2f8
[   17.815047] Read of size 1 at addr fff00000c64bc000 by task kunit_try_catch/148
[   17.815245] 
[   17.815345] CPU: 0 UID: 0 PID: 148 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   17.815522] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.815670] Hardware name: linux,dummy-virt (DT)
[   17.815731] Call trace:
[   17.815855]  show_stack+0x20/0x38 (C)
[   17.815983]  dump_stack_lvl+0x8c/0xd0
[   17.816052]  print_report+0x118/0x608
[   17.816174]  kasan_report+0xdc/0x128
[   17.816225]  __asan_report_load1_noabort+0x20/0x30
[   17.816502]  kmalloc_large_uaf+0x2cc/0x2f8
[   17.816740]  kunit_try_run_case+0x170/0x3f0
[   17.816848]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.816937]  kthread+0x328/0x630
[   17.817129]  ret_from_fork+0x10/0x20
[   17.817179] 
[   17.817230] The buggy address belongs to the physical page:
[   17.817262] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1064bc
[   17.817314] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.817389] raw: 0bfffe0000000000 ffffc1ffc31db008 fff00000da456c40 0000000000000000
[   17.817438] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   17.817476] page dumped because: kasan: bad access detected
[   17.817514] 
[   17.817532] Memory state around the buggy address:
[   17.817581]  fff00000c64bbf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.817622]  fff00000c64bbf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.817662] >fff00000c64bc000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.817697]                    ^
[   17.817732]  fff00000c64bc080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.817780]  fff00000c64bc100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   17.817829] ==================================================================

[   11.364618] ==================================================================
[   11.365193] BUG: KASAN: use-after-free in kmalloc_large_uaf+0x2f1/0x340
[   11.365898] Read of size 1 at addr ffff888102a44000 by task kunit_try_catch/165
[   11.367205] 
[   11.367544] CPU: 0 UID: 0 PID: 165 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   11.367601] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.367615] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.367639] Call Trace:
[   11.367656]  <TASK>
[   11.367676]  dump_stack_lvl+0x73/0xb0
[   11.367714]  print_report+0xd1/0x650
[   11.367738]  ? __virt_addr_valid+0x1db/0x2d0
[   11.367760]  ? kmalloc_large_uaf+0x2f1/0x340
[   11.367780]  ? kasan_addr_to_slab+0x11/0xa0
[   11.367799]  ? kmalloc_large_uaf+0x2f1/0x340
[   11.367819]  kasan_report+0x141/0x180
[   11.367839]  ? kmalloc_large_uaf+0x2f1/0x340
[   11.367863]  __asan_report_load1_noabort+0x18/0x20
[   11.367886]  kmalloc_large_uaf+0x2f1/0x340
[   11.367906]  ? __pfx_kmalloc_large_uaf+0x10/0x10
[   11.367926]  ? __schedule+0x10cc/0x2b60
[   11.367947]  ? __pfx_read_tsc+0x10/0x10
[   11.367968]  ? ktime_get_ts64+0x86/0x230
[   11.367992]  kunit_try_run_case+0x1a5/0x480
[   11.368017]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.368038]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.368060]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.368081]  ? __kthread_parkme+0x82/0x180
[   11.368100]  ? preempt_count_sub+0x50/0x80
[   11.368122]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.368144]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.368165]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.368186]  kthread+0x337/0x6f0
[   11.368204]  ? trace_preempt_on+0x20/0xc0
[   11.368236]  ? __pfx_kthread+0x10/0x10
[   11.368256]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.368275]  ? calculate_sigpending+0x7b/0xa0
[   11.368298]  ? __pfx_kthread+0x10/0x10
[   11.368351]  ret_from_fork+0x116/0x1d0
[   11.368369]  ? __pfx_kthread+0x10/0x10
[   11.368388]  ret_from_fork_asm+0x1a/0x30
[   11.368429]  </TASK>
[   11.368441] 
[   11.379597] The buggy address belongs to the physical page:
[   11.379957] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a44
[   11.380330] flags: 0x200000000000000(node=0|zone=2)
[   11.380672] raw: 0200000000000000 ffffea00040a9208 ffff88815b039f80 0000000000000000
[   11.381033] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   11.381441] page dumped because: kasan: bad access detected
[   11.381798] 
[   11.381899] Memory state around the buggy address:
[   11.382294]  ffff888102a43f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.382666]  ffff888102a43f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.383020] >ffff888102a44000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.383363]                    ^
[   11.383515]  ffff888102a44080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.383829]  ffff888102a44100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   11.384131] ==================================================================