bisecting fixing commit since 9f31eb60d7a23536bf3902d4dc602f10c822b79e building syzkaller on 34bf9440bd06034f86b5d9ac8afbf078129cbdae testing commit 9f31eb60d7a23536bf3902d4dc602f10c822b79e with gcc (GCC) 8.1.0 kernel signature: 878ad8df6d6dc56a2e92d51ad9f711a3c5540fc851f42250f3ac846d92c19eb7 run #0: crashed: general protection fault in scatterwalk_copychunks run #1: crashed: general protection fault in scatterwalk_copychunks run #2: crashed: general protection fault in scatterwalk_copychunks run #3: crashed: KASAN: slab-out-of-bounds Read in scatterwalk_copychunks run #4: crashed: KASAN: slab-out-of-bounds Read in scatterwalk_copychunks run #5: crashed: KASAN: slab-out-of-bounds Read in scatterwalk_copychunks run #6: crashed: general protection fault in scatterwalk_copychunks run #7: crashed: KASAN: slab-out-of-bounds Read in scatterwalk_copychunks run #8: crashed: KASAN: slab-out-of-bounds Read in scatterwalk_copychunks run #9: crashed: general protection fault in scatterwalk_copychunks testing current HEAD 2d16cf4817bc6944a2adb5bf4db607c8258e87da testing commit 2d16cf4817bc6944a2adb5bf4db607c8258e87da with gcc (GCC) 8.1.0 kernel signature: 8eaef4ada1f6794d5196ae2644d4bd66cfed6c1e85761b46189f9b852ef4359c run #0: crashed: KASAN: slab-out-of-bounds Read in scatterwalk_copychunks run #1: crashed: KASAN: slab-out-of-bounds Read in scatterwalk_copychunks run #2: crashed: KASAN: slab-out-of-bounds Read in scatterwalk_copychunks run #3: crashed: KASAN: slab-out-of-bounds Read in scatterwalk_copychunks run #4: crashed: KASAN: slab-out-of-bounds Read in scatterwalk_copychunks run #5: crashed: general protection fault in scatterwalk_copychunks run #6: crashed: general protection fault in scatterwalk_copychunks run #7: crashed: KASAN: slab-out-of-bounds Read in scatterwalk_copychunks run #8: crashed: KASAN: slab-out-of-bounds Read in scatterwalk_copychunks run #9: crashed: KASAN: slab-out-of-bounds Read in scatterwalk_copychunks revisions tested: 2, total time: 23m26.518241218s (build: 16m30.313129704s, test: 6m19.851043003s) the crash still happens on HEAD commit msg: Linux 4.19.125 crash: KASAN: slab-out-of-bounds Read in scatterwalk_copychunks RDX: 0000000000000004 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000100000300 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f09c60ac6d4 R13: 00000000004c87fb R14: 00000000004de630 R15: 0000000000000005 ================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:348 [inline] BUG: KASAN: slab-out-of-bounds in memcpy_dir crypto/scatterwalk.c:28 [inline] BUG: KASAN: slab-out-of-bounds in scatterwalk_copychunks+0x1e1/0x610 crypto/scatterwalk.c:43 Read of size 4094 at addr ffff888094744000 by task syz-executor.1/7413 CPU: 1 PID: 7413 Comm: syz-executor.1 Not tainted 4.19.125-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x123/0x177 lib/dump_stack.c:118 print_address_description.cold.8+0x9/0x1ff mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.9+0x242/0x309 mm/kasan/report.c:412 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x13e/0x1b0 mm/kasan/kasan.c:267 memcpy+0x23/0x50 mm/kasan/kasan.c:302 memcpy include/linux/string.h:348 [inline] memcpy_dir crypto/scatterwalk.c:28 [inline] scatterwalk_copychunks+0x1e1/0x610 crypto/scatterwalk.c:43 scatterwalk_map_and_copy+0x128/0x190 crypto/scatterwalk.c:72 gcmaes_encrypt.constprop.15+0x6d6/0xda0 arch/x86/crypto/aesni-intel_glue.c:956 generic_gcmaes_encrypt+0xfd/0x150 arch/x86/crypto/aesni-intel_glue.c:1297 crypto_aead_encrypt include/crypto/aead.h:335 [inline] gcmaes_wrapper_encrypt+0x109/0x180 arch/x86/crypto/aesni-intel_glue.c:1130 crypto_aead_encrypt include/crypto/aead.h:335 [inline] tls_do_encryption net/tls/tls_sw.c:193 [inline] tls_push_record+0x966/0x1720 net/tls/tls_sw.c:228 tls_sw_sendpage+0x458/0xc00 net/tls/tls_sw.c:585 inet_sendpage+0x122/0x600 net/ipv4/af_inet.c:815 kernel_sendpage+0x60/0xd0 net/socket.c:3378 sock_sendpage+0x6d/0xd0 net/socket.c:847 pipe_to_sendpage+0x212/0x430 fs/splice.c:452 splice_from_pipe_feed fs/splice.c:503 [inline] __splice_from_pipe+0x2cb/0x720 fs/splice.c:627 splice_from_pipe+0xbb/0x120 fs/splice.c:662 generic_splice_sendpage+0x10/0x20 fs/splice.c:833 do_splice_from fs/splice.c:852 [inline] do_splice+0x4fd/0x12d0 fs/splice.c:1154 __do_sys_splice fs/splice.c:1428 [inline] __se_sys_splice fs/splice.c:1408 [inline] __x64_sys_splice+0x248/0x300 fs/splice.c:1408 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4592c9 Code: fd b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ff9bb2b7c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000113 RAX: ffffffffffffffda RBX: 00007ff9bb2b7c90 RCX: 00000000004592c9 RDX: 0000000000000004 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000100000300 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ff9bb2b86d4 R13: 00000000004c87fb R14: 00000000004de630 R15: 0000000000000005 Allocated by task 4485: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:553 __do_kmalloc mm/slab.c:3727 [inline] __kmalloc+0x15b/0x770 mm/slab.c:3736 kmalloc include/linux/slab.h:520 [inline] simple_xattr_alloc+0x26/0x80 fs/xattr.c:819 shmem_initxattrs+0xea/0x1e0 mm/shmem.c:3153 security_inode_init_security+0x17f/0x2d0 security/security.c:498 shmem_mknod+0x98/0x1a0 mm/shmem.c:2838 shmem_create+0x13/0x20 mm/shmem.c:2893 lookup_open+0x102b/0x1d30 fs/namei.c:3235 do_last fs/namei.c:3327 [inline] path_openat+0xf40/0x3c60 fs/namei.c:3537 do_filp_open+0x177/0x250 fs/namei.c:3567 do_sys_open+0x1dd/0x350 fs/open.c:1085 __do_sys_open fs/open.c:1103 [inline] __se_sys_open fs/open.c:1098 [inline] __x64_sys_open+0x79/0xb0 fs/open.c:1098 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 4508: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3503 [inline] kfree+0xcf/0x220 mm/slab.c:3822 kernfs_put_open_node.isra.7+0x1be/0x280 fs/kernfs/file.c:614 kernfs_fop_release+0xcb/0x170 fs/kernfs/file.c:780 __fput+0x249/0x7f0 fs/file_table.c:278 ____fput+0x9/0x10 fs/file_table.c:309 task_work_run+0x108/0x180 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x1a9/0x200 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x413/0x4e0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff888094744000 which belongs to the cache kmalloc-96 of size 96 The buggy address is located 0 bytes inside of 96-byte region [ffff888094744000, ffff888094744060) The buggy address belongs to the page: page:ffffea000251d100 count:1 mapcount:0 mapping:ffff88812c31e4c0 index:0x0 flags: 0x1fffc0000000100(slab) raw: 01fffc0000000100 ffffea000253c308 ffffea000251b448 ffff88812c31e4c0 raw: 0000000000000000 ffff888094744000 0000000100000020 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888094743f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888094743f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888094744000: 00 00 00 00 00 00 00 00 04 fc fc fc fc fc fc fc ^ ffff888094744080: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ffff888094744100: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ==================================================================