Hay
Date
Nov. 27, 2024, 3:37 a.m.

Environment
qemu-arm64
qemu-x86_64

[   46.818408] ==================================================================
[   46.819645] BUG: KASAN: slab-out-of-bounds in kmalloc_large_oob_right+0x278/0x2b8
[   46.820440] Write of size 1 at addr fff00000c65fa00a by task kunit_try_catch/135
[   46.821214] 
[   46.821768] CPU: 1 UID: 0 PID: 135 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241127 #1
[   46.823116] Tainted: [B]=BAD_PAGE, [N]=TEST
[   46.823728] Hardware name: linux,dummy-virt (DT)
[   46.824419] Call trace:
[   46.824864]  show_stack+0x20/0x38 (C)
[   46.825574]  dump_stack_lvl+0x8c/0xd0
[   46.826140]  print_report+0x118/0x5e0
[   46.826731]  kasan_report+0xc8/0x118
[   46.827261]  __asan_report_store1_noabort+0x20/0x30
[   46.828007]  kmalloc_large_oob_right+0x278/0x2b8
[   46.828717]  kunit_try_run_case+0x14c/0x3d0
[   46.829445]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   46.830221]  kthread+0x24c/0x2d0
[   46.830852]  ret_from_fork+0x10/0x20
[   46.831465] 
[   46.831844] The buggy address belongs to the physical page:
[   46.832675] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1065f8
[   46.833692] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   46.834634] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   46.835574] raw: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   46.836586] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   46.837549] head: 0bfffe0000000040 0000000000000000 dead000000000122 0000000000000000
[   46.838526] head: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   46.839562] head: 0bfffe0000000002 ffffc1ffc3197e01 ffffffffffffffff 0000000000000000
[   46.840533] head: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000
[   46.841454] page dumped because: kasan: bad access detected
[   46.842183] 
[   46.842531] Memory state around the buggy address:
[   46.843312]  fff00000c65f9f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   46.844203]  fff00000c65f9f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   46.845081] >fff00000c65fa000: 00 02 fe fe fe fe fe fe fe fe fe fe fe fe fe fe
[   46.845970]                       ^
[   46.846573]  fff00000c65fa080: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
[   46.847541]  fff00000c65fa100: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
[   46.848406] ==================================================================

[   23.897098] ==================================================================
[   23.898294] BUG: KASAN: slab-out-of-bounds in kmalloc_large_oob_right+0x2eb/0x340
[   23.899643] Write of size 1 at addr ffff888102cc200a by task kunit_try_catch/154
[   23.901467] 
[   23.901837] CPU: 0 UID: 0 PID: 154 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241127 #1
[   23.902900] Tainted: [B]=BAD_PAGE, [N]=TEST
[   23.903442] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   23.904373] Call Trace:
[   23.904708]  <TASK>
[   23.905400]  dump_stack_lvl+0x73/0xb0
[   23.905799]  print_report+0xd1/0x640
[   23.906506]  ? __virt_addr_valid+0x1db/0x2d0
[   23.907042]  ? kasan_addr_to_slab+0x11/0xa0
[   23.907465]  kasan_report+0x102/0x140
[   23.907841]  ? kmalloc_large_oob_right+0x2eb/0x340
[   23.908428]  ? kmalloc_large_oob_right+0x2eb/0x340
[   23.908770]  __asan_report_store1_noabort+0x1b/0x30
[   23.909647]  kmalloc_large_oob_right+0x2eb/0x340
[   23.910377]  ? __pfx_kmalloc_large_oob_right+0x10/0x10
[   23.910883]  ? __schedule+0xc3e/0x2790
[   23.911441]  ? __pfx_read_tsc+0x10/0x10
[   23.911725]  ? ktime_get_ts64+0x84/0x230
[   23.912499]  kunit_try_run_case+0x1b3/0x490
[   23.913376]  ? __pfx_kunit_try_run_case+0x10/0x10
[   23.914143]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   23.914630]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   23.915344]  ? __kthread_parkme+0x82/0x160
[   23.915728]  ? preempt_count_sub+0x50/0x80
[   23.916522]  ? __pfx_kunit_try_run_case+0x10/0x10
[   23.917308]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   23.917851]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   23.918524]  kthread+0x257/0x310
[   23.918853]  ? __pfx_kthread+0x10/0x10
[   23.919471]  ret_from_fork+0x41/0x80
[   23.919852]  ? __pfx_kthread+0x10/0x10
[   23.920567]  ret_from_fork_asm+0x1a/0x30
[   23.921409]  </TASK>
[   23.921772] 
[   23.922321] The buggy address belongs to the physical page:
[   23.922848] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102cc0
[   23.923954] head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   23.924888] flags: 0x200000000000040(head|node=0|zone=2)
[   23.925615] raw: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   23.926750] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   23.927671] head: 0200000000000040 0000000000000000 dead000000000122 0000000000000000
[   23.928677] head: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   23.929810] head: 0200000000000002 ffffea00040b3001 ffffffffffffffff 0000000000000000
[   23.930654] head: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000
[   23.931530] page dumped because: kasan: bad access detected
[   23.932642] 
[   23.932848] Memory state around the buggy address:
[   23.933841]  ffff888102cc1f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   23.934826]  ffff888102cc1f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   23.935911] >ffff888102cc2000: 00 02 fe fe fe fe fe fe fe fe fe fe fe fe fe fe
[   23.936632]                       ^
[   23.937063]  ffff888102cc2080: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
[   23.938209]  ffff888102cc2100: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
[   23.938934] ==================================================================