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

Environment
qemu-arm64

[  182.231012] ==================================================================
[  182.234107] BUG: KASAN: slab-out-of-bounds in memchr+0x28/0x78
[  182.235810] Read of size 1 at addr ffff0000c6051798 by task kunit_try_catch/200
[  182.237991] 
[  182.238477] CPU: 0 PID: 200 Comm: kunit_try_catch Tainted: G    B            N 6.6.76-rc1 #1
[  182.240852] Hardware name: linux,dummy-virt (DT)
[  182.241992] Call trace:
[  182.242738]  dump_backtrace+0x9c/0x128
[  182.243909]  show_stack+0x20/0x38
[  182.244802]  dump_stack_lvl+0x60/0xb0
[  182.246105]  print_report+0xf8/0x5d8
[  182.247233]  kasan_report+0xc8/0x118
[  182.248197]  __asan_load1+0x60/0x70
[  182.249647]  memchr+0x28/0x78
[  182.251513]  kasan_memchr+0xd4/0x1f0
[  182.252671]  kunit_try_run_case+0xf8/0x260
[  182.254127]  kunit_generic_run_threadfn_adapter+0x38/0x60
[  182.256214]  kthread+0x18c/0x1a8
[  182.257336]  ret_from_fork+0x10/0x20
[  182.258852] 
[  182.259275] Allocated by task 200:
[  182.260349]  kasan_save_stack+0x3c/0x68
[  182.261781]  kasan_set_track+0x2c/0x40
[  182.263191]  kasan_save_alloc_info+0x24/0x38
[  182.264503]  __kasan_kmalloc+0xd4/0xd8
[  182.265976]  kmalloc_trace+0x68/0x130
[  182.266885]  kasan_memchr+0xa0/0x1f0
[  182.268044]  kunit_try_run_case+0xf8/0x260
[  182.269537]  kunit_generic_run_threadfn_adapter+0x38/0x60
[  182.270935]  kthread+0x18c/0x1a8
[  182.271872]  ret_from_fork+0x10/0x20
[  182.273440] 
[  182.274026] The buggy address belongs to the object at ffff0000c6051780
[  182.274026]  which belongs to the cache kmalloc-32 of size 32
[  182.276512] The buggy address is located 0 bytes to the right of
[  182.276512]  allocated 24-byte region [ffff0000c6051780, ffff0000c6051798)
[  182.279783] 
[  182.280270] The buggy address belongs to the physical page:
[  182.282305] page:00000000b85054fb refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106051
[  182.284269] flags: 0xbfffc0000000800(slab|node=0|zone=2|lastcpupid=0xffff)
[  182.286381] page_type: 0xffffffff()
[  182.288166] raw: 0bfffc0000000800 ffff0000c0001500 dead000000000122 0000000000000000
[  182.289979] raw: 0000000000000000 0000000080400040 00000001ffffffff 0000000000000000
[  182.291769] page dumped because: kasan: bad access detected
[  182.293039] 
[  182.293558] Memory state around the buggy address:
[  182.295511]  ffff0000c6051680: fa fb fb fb fc fc fc fc 00 00 07 fc fc fc fc fc
[  182.297767]  ffff0000c6051700: 00 00 07 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[  182.299598] >ffff0000c6051780: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc
[  182.301248]                             ^
[  182.302321]  ffff0000c6051800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[  182.303795]  ffff0000c6051880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[  182.306016] ==================================================================