Hay
Date
Feb. 5, 2025, 2:09 p.m.

Environment
qemu-arm64

[  179.365899] ==================================================================
[  179.368237] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0xd8/0x1f0
[  179.370186] Write of size 2 at addr ffff0000c6001677 by task kunit_try_catch/150
[  179.373402] 
[  179.374108] CPU: 1 PID: 150 Comm: kunit_try_catch Tainted: G    B            N 6.6.76-rc1 #1
[  179.376344] Hardware name: linux,dummy-virt (DT)
[  179.377531] Call trace:
[  179.378594]  dump_backtrace+0x9c/0x128
[  179.379700]  show_stack+0x20/0x38
[  179.380702]  dump_stack_lvl+0x60/0xb0
[  179.382167]  print_report+0xf8/0x5d8
[  179.383305]  kasan_report+0xc8/0x118
[  179.384433]  kasan_check_range+0xe8/0x190
[  179.385840]  __asan_memset+0x34/0x78
[  179.386873]  kmalloc_oob_memset_2+0xd8/0x1f0
[  179.388063]  kunit_try_run_case+0xf8/0x260
[  179.389630]  kunit_generic_run_threadfn_adapter+0x38/0x60
[  179.392201]  kthread+0x18c/0x1a8
[  179.393779]  ret_from_fork+0x10/0x20
[  179.394957] 
[  179.395484] Allocated by task 150:
[  179.396375]  kasan_save_stack+0x3c/0x68
[  179.397894]  kasan_set_track+0x2c/0x40
[  179.399144]  kasan_save_alloc_info+0x24/0x38
[  179.400427]  __kasan_kmalloc+0xd4/0xd8
[  179.401617]  kmalloc_trace+0x68/0x130
[  179.403004]  kmalloc_oob_memset_2+0xa0/0x1f0
[  179.404298]  kunit_try_run_case+0xf8/0x260
[  179.405797]  kunit_generic_run_threadfn_adapter+0x38/0x60
[  179.407253]  kthread+0x18c/0x1a8
[  179.408220]  ret_from_fork+0x10/0x20
[  179.409641] 
[  179.410114] The buggy address belongs to the object at ffff0000c6001600
[  179.410114]  which belongs to the cache kmalloc-128 of size 128
[  179.413881] The buggy address is located 119 bytes inside of
[  179.413881]  allocated 120-byte region [ffff0000c6001600, ffff0000c6001678)
[  179.416273] 
[  179.416915] The buggy address belongs to the physical page:
[  179.418311] page:00000000bb72779c refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106001
[  179.420190] flags: 0xbfffc0000000800(slab|node=0|zone=2|lastcpupid=0xffff)
[  179.421758] page_type: 0xffffffff()
[  179.423118] raw: 0bfffc0000000800 ffff0000c00018c0 dead000000000122 0000000000000000
[  179.424764] raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000
[  179.426652] page dumped because: kasan: bad access detected
[  179.427915] 
[  179.428418] Memory state around the buggy address:
[  179.430283]  ffff0000c6001500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[  179.431543]  ffff0000c6001580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[  179.433677] >ffff0000c6001600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[  179.434938]                                                                 ^
[  179.436550]  ffff0000c6001680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[  179.438433]  ffff0000c6001700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[  179.439951] ==================================================================