Hay
Date
May 29, 2025, 7:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   21.056468] ==================================================================
[   21.056663] BUG: KASAN: slab-out-of-bounds in kmalloc_large_oob_right+0x278/0x2b8
[   21.056812] Write of size 1 at addr fff00000c789600a by task kunit_try_catch/146
[   21.056934] 
[   21.057021] CPU: 0 UID: 0 PID: 146 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250529 #1 PREEMPT 
[   21.057246] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.057313] Hardware name: linux,dummy-virt (DT)
[   21.057381] Call trace:
[   21.057442]  show_stack+0x20/0x38 (C)
[   21.057587]  dump_stack_lvl+0x8c/0xd0
[   21.057687]  print_report+0x118/0x608
[   21.057790]  kasan_report+0xdc/0x128
[   21.057917]  __asan_report_store1_noabort+0x20/0x30
[   21.058029]  kmalloc_large_oob_right+0x278/0x2b8
[   21.058138]  kunit_try_run_case+0x170/0x3f0
[   21.058259]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.058384]  kthread+0x328/0x630
[   21.058546]  ret_from_fork+0x10/0x20
[   21.058661] 
[   21.058760] The buggy address belongs to the physical page:
[   21.058877] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107894
[   21.059000] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   21.059110] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   21.059245] page_type: f8(unknown)
[   21.059351] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   21.059481] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   21.059649] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   21.059814] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   21.060017] head: 0bfffe0000000002 ffffc1ffc31e2501 00000000ffffffff 00000000ffffffff
[   21.060153] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   21.060327] page dumped because: kasan: bad access detected
[   21.060463] 
[   21.060543] Memory state around the buggy address:
[   21.060636]  fff00000c7895f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   21.060741]  fff00000c7895f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   21.060846] >fff00000c7896000: 00 02 fe fe fe fe fe fe fe fe fe fe fe fe fe fe
[   21.060952]                       ^
[   21.061070]  fff00000c7896080: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
[   21.061179]  fff00000c7896100: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
[   21.061274] ==================================================================


[   10.395796] ==================================================================
[   10.396712] BUG: KASAN: slab-out-of-bounds in kmalloc_large_oob_right+0x2e9/0x330
[   10.396975] Write of size 1 at addr ffff8881024c200a by task kunit_try_catch/163
[   10.397209] 
[   10.397300] CPU: 0 UID: 0 PID: 163 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250529 #1 PREEMPT(voluntary) 
[   10.397345] Tainted: [B]=BAD_PAGE, [N]=TEST
[   10.397357] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   10.397377] Call Trace:
[   10.397389]  <TASK>
[   10.397405]  dump_stack_lvl+0x73/0xb0
[   10.397429]  print_report+0xd1/0x650
[   10.397451]  ? __virt_addr_valid+0x1db/0x2d0
[   10.397474]  ? kmalloc_large_oob_right+0x2e9/0x330
[   10.397496]  ? kasan_addr_to_slab+0x11/0xa0
[   10.397516]  ? kmalloc_large_oob_right+0x2e9/0x330
[   10.397538]  kasan_report+0x141/0x180
[   10.397560]  ? kmalloc_large_oob_right+0x2e9/0x330
[   10.397587]  __asan_report_store1_noabort+0x1b/0x30
[   10.397618]  kmalloc_large_oob_right+0x2e9/0x330
[   10.397640]  ? __pfx_kmalloc_large_oob_right+0x10/0x10
[   10.397664]  ? __schedule+0x10cc/0x2b60
[   10.397686]  ? __pfx_read_tsc+0x10/0x10
[   10.397707]  ? ktime_get_ts64+0x86/0x230
[   10.397730]  kunit_try_run_case+0x1a5/0x480
[   10.397752]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.397771]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   10.397795]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   10.397819]  ? __kthread_parkme+0x82/0x180
[   10.397839]  ? preempt_count_sub+0x50/0x80
[   10.397862]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.397882]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.397905]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   10.397929]  kthread+0x337/0x6f0
[   10.397948]  ? trace_preempt_on+0x20/0xc0
[   10.397970]  ? __pfx_kthread+0x10/0x10
[   10.397991]  ? _raw_spin_unlock_irq+0x47/0x80
[   10.398013]  ? calculate_sigpending+0x7b/0xa0
[   10.398036]  ? __pfx_kthread+0x10/0x10
[   10.398057]  ret_from_fork+0x116/0x1d0
[   10.398075]  ? __pfx_kthread+0x10/0x10
[   10.398095]  ret_from_fork_asm+0x1a/0x30
[   10.398125]  </TASK>
[   10.398134] 
[   10.411918] The buggy address belongs to the physical page:
[   10.412390] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1024c0
[   10.412785] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   10.413127] flags: 0x200000000000040(head|node=0|zone=2)
[   10.413401] page_type: f8(unknown)
[   10.413582] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   10.413941] raw: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   10.414271] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   10.414824] head: 0000000000000000 0000000000000000 00000001f8000000 0000000000000000
[   10.415098] head: 0200000000000002 ffffea0004093001 00000000ffffffff 00000000ffffffff
[   10.415445] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
[   10.415998] page dumped because: kasan: bad access detected
[   10.416253] 
[   10.416371] Memory state around the buggy address:
[   10.416597]  ffff8881024c1f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   10.417036]  ffff8881024c1f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   10.417372] >ffff8881024c2000: 00 02 fe fe fe fe fe fe fe fe fe fe fe fe fe fe
[   10.417722]                       ^
[   10.417947]  ffff8881024c2080: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
[   10.418269]  ffff8881024c2100: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
[   10.418595] ==================================================================