bisecting fixing commit since 397a88b2cc869c823bf40bc403d36a62afec1edd building syzkaller on 9d751681c8ca1ef150e96f3c1e18bdcaab99c9b9 testing commit 397a88b2cc869c823bf40bc403d36a62afec1edd with gcc (GCC) 8.4.1 20210217 kernel signature: 70a9fdf74f75777d5d63927d0815a8c216f1ef66591980281e83c7f3bec9c09f all runs: crashed: KASAN: slab-out-of-bounds Read in pdu_read testing current HEAD 7d7d1c0ab3eb7c8d8f63a126535018007823b207 testing commit 7d7d1c0ab3eb7c8d8f63a126535018007823b207 with gcc (GCC) 8.4.1 20210217 kernel signature: 219e96b5301b2f2b09db806062ee8866701d10cb4afaca566ddaee5d6131fb85 all runs: crashed: KASAN: slab-out-of-bounds Read in pdu_read revisions tested: 2, total time: 30m46.371435371s (build: 23m23.107762075s, test: 6m18.281130243s) the crash still happens on HEAD commit msg: Linux 4.14.232 crash: KASAN: slab-out-of-bounds Read in pdu_read IPv6: ADDRCONF(NETDEV_UP): batadv_slave_1: link is not ready batman_adv: batadv0: Interface activated: batadv_slave_1 IPv6: ADDRCONF(NETDEV_CHANGE): batadv_slave_1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_batadv: link becomes ready ================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:376 [inline] BUG: KASAN: slab-out-of-bounds in pdu_read+0x95/0x100 net/9p/protocol.c:64 Read of size 25834 at addr ffff8880aa449d2d by task syz-executor.4/9790 CPU: 0 PID: 9790 Comm: syz-executor.4 Not tainted 4.14.232-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x14b/0x1e7 lib/dump_stack.c:58 print_address_description.cold.6+0x9/0x1ca mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold.7+0x11a/0x2d3 mm/kasan/report.c:393 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x13c/0x1b0 mm/kasan/kasan.c:267 memcpy+0x23/0x50 mm/kasan/kasan.c:302 memcpy include/linux/string.h:376 [inline] pdu_read+0x95/0x100 net/9p/protocol.c:64 p9pdu_vreadf net/9p/protocol.c:167 [inline] p9pdu_readf+0x32a/0x1640 net/9p/protocol.c:540 p9_client_version net/9p/client.c:990 [inline] p9_client_create+0x7b8/0xf50 net/9p/client.c:1088 v9fs_session_init+0x1e1/0x1390 fs/9p/v9fs.c:422 v9fs_mount+0x73/0x770 fs/9p/vfs_super.c:135 mount_fs+0x7f/0x270 fs/super.c:1237 vfs_kern_mount.part.9+0x58/0x3c0 fs/namespace.c:1046 vfs_kern_mount fs/namespace.c:1036 [inline] do_new_mount fs/namespace.c:2549 [inline] do_mount+0x352/0x2af0 fs/namespace.c:2879 SYSC_mount fs/namespace.c:3095 [inline] SyS_mount+0xb1/0xd0 fs/namespace.c:3072 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x465f69 RSP: 002b:00007fe9727d1188 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000465f69 RDX: 0000000020000040 RSI: 0000000020000000 RDI: 0000000000000000 RBP: 00000000004bfa67 R08: 00000000200001c0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60 R13: 00007ffe68ee44df R14: 00007fe9727d1300 R15: 0000000000022000 Allocated by task 9790: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc.part.1+0x62/0xf0 mm/kasan/kasan.c:551 kasan_kmalloc+0xaf/0xc0 mm/kasan/kasan.c:536 __do_kmalloc mm/slab.c:3720 [inline] __kmalloc+0x15d/0x410 mm/slab.c:3729 kmalloc include/linux/slab.h:493 [inline] p9_fcall_alloc+0x1a/0x90 net/9p/client.c:242 p9_tag_alloc net/9p/client.c:312 [inline] p9_client_prepare_req.part.4+0x743/0x9e0 net/9p/client.c:728 p9_client_prepare_req net/9p/client.c:763 [inline] p9_client_rpc+0x163/0xea0 net/9p/client.c:763 p9_client_version net/9p/client.c:980 [inline] p9_client_create+0x737/0xf50 net/9p/client.c:1088 v9fs_session_init+0x1e1/0x1390 fs/9p/v9fs.c:422 v9fs_mount+0x73/0x770 fs/9p/vfs_super.c:135 mount_fs+0x7f/0x270 fs/super.c:1237 vfs_kern_mount.part.9+0x58/0x3c0 fs/namespace.c:1046 vfs_kern_mount fs/namespace.c:1036 [inline] do_new_mount fs/namespace.c:2549 [inline] do_mount+0x352/0x2af0 fs/namespace.c:2879 SYSC_mount fs/namespace.c:3095 [inline] SyS_mount+0xb1/0xd0 fs/namespace.c:3072 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff8880aa449d00 which belongs to the cache kmalloc-16384 of size 16384 The buggy address is located 45 bytes inside of 16384-byte region [ffff8880aa449d00, ffff8880aa44dd00) The buggy address belongs to the page: page:ffffea0002a91200 count:1 mapcount:0 mapping:ffff8880aa449d00 index:0x0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffff8880aa449d00 0000000000000000 0000000100000001 raw: ffffea00024ca620 ffffea00024a6220 ffff88813fe62200 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880aa44bc00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880aa44bc80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880aa44bd00: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880aa44bd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880aa44be00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================