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

Environment
qemu-arm64

[  179.462060] ==================================================================
[  179.464012] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0xd8/0x1e8
[  179.466055] Write of size 4 at addr ffff0000c6017b75 by task kunit_try_catch/152
[  179.467796] 
[  179.468359] CPU: 0 PID: 152 Comm: kunit_try_catch Tainted: G    B            N 6.6.76-rc1 #1
[  179.470201] Hardware name: linux,dummy-virt (DT)
[  179.471303] Call trace:
[  179.472441]  dump_backtrace+0x9c/0x128
[  179.473545]  show_stack+0x20/0x38
[  179.474603]  dump_stack_lvl+0x60/0xb0
[  179.476147]  print_report+0xf8/0x5d8
[  179.477433]  kasan_report+0xc8/0x118
[  179.478562]  kasan_check_range+0xe8/0x190
[  179.479838]  __asan_memset+0x34/0x78
[  179.481351]  kmalloc_oob_memset_4+0xd8/0x1e8
[  179.482416]  kunit_try_run_case+0xf8/0x260
[  179.483704]  kunit_generic_run_threadfn_adapter+0x38/0x60
[  179.485436]  kthread+0x18c/0x1a8
[  179.486514]  ret_from_fork+0x10/0x20
[  179.487510] 
[  179.488034] Allocated by task 152:
[  179.489102]  kasan_save_stack+0x3c/0x68
[  179.490418]  kasan_set_track+0x2c/0x40
[  179.491641]  kasan_save_alloc_info+0x24/0x38
[  179.493252]  __kasan_kmalloc+0xd4/0xd8
[  179.494468]  kmalloc_trace+0x68/0x130
[  179.495429]  kmalloc_oob_memset_4+0xa0/0x1e8
[  179.496681]  kunit_try_run_case+0xf8/0x260
[  179.498014]  kunit_generic_run_threadfn_adapter+0x38/0x60
[  179.499319]  kthread+0x18c/0x1a8
[  179.500284]  ret_from_fork+0x10/0x20
[  179.501706] 
[  179.502244] The buggy address belongs to the object at ffff0000c6017b00
[  179.502244]  which belongs to the cache kmalloc-128 of size 128
[  179.504547] The buggy address is located 117 bytes inside of
[  179.504547]  allocated 120-byte region [ffff0000c6017b00, ffff0000c6017b78)
[  179.507229] 
[  179.507922] The buggy address belongs to the physical page:
[  179.509464] page:00000000d97f6f57 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106017
[  179.511514] flags: 0xbfffc0000000800(slab|node=0|zone=2|lastcpupid=0xffff)
[  179.513173] page_type: 0xffffffff()
[  179.514249] raw: 0bfffc0000000800 ffff0000c00018c0 dead000000000122 0000000000000000
[  179.516501] raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000
[  179.518236] page dumped because: kasan: bad access detected
[  179.519447] 
[  179.520081] Memory state around the buggy address:
[  179.521302]  ffff0000c6017a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[  179.523082]  ffff0000c6017a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[  179.525122] >ffff0000c6017b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[  179.526817]                                                                 ^
[  179.528895]  ffff0000c6017b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[  179.531008]  ffff0000c6017c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[  179.532561] ==================================================================