bisecting fixing commit since 555161ee1b7a74e77ca70fd14ed8a5137c8108ac building syzkaller on 2e29b534005e52c57d726201644ea28ba33a9a3d testing commit 555161ee1b7a74e77ca70fd14ed8a5137c8108ac with gcc (GCC) 8.1.0 kernel signature: 2615d28930292dce6126b5d086854d4ced5a642d56838c59ad6cb112086dcdc4 run #0: crashed: general protection fault 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: general protection fault in scatterwalk_copychunks run #5: crashed: KASAN: slab-out-of-bounds Read in scatterwalk_copychunks run #6: crashed: KASAN: slab-out-of-bounds Read in scatterwalk_copychunks run #7: crashed: KASAN: slab-out-of-bounds Read in scatterwalk_copychunks run #8: crashed: KASAN: use-after-free Read in scatterwalk_copychunks run #9: crashed: KASAN: slab-out-of-bounds Read in scatterwalk_copychunks testing current HEAD 399849e4654ea496a6217ba4e5ee3d304c995ab4 testing commit 399849e4654ea496a6217ba4e5ee3d304c995ab4 with gcc (GCC) 8.1.0 kernel signature: ca6bc553bcc0a3f5239d19df4fd35c55398982c44c4076d14b0fea01e7eaeb2c 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: general protection fault in scatterwalk_copychunks run #6: crashed: general protection fault in corrupted run #7: crashed: KASAN: slab-out-of-bounds Read in scatterwalk_copychunks run #8: crashed: KASAN: use-after-free Read in scatterwalk_copychunks run #9: crashed: KASAN: slab-out-of-bounds Read in scatterwalk_copychunks revisions tested: 2, total time: 24m48.404331699s (build: 17m12.424534291s, test: 6m12.380786853s) the crash still happens on HEAD commit msg: Linux 4.19.131 crash: KASAN: slab-out-of-bounds Read in scatterwalk_copychunks 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 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold.4+0x5/0x13 lib/fault-inject.c:149 BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:373 [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 4096 at addr ffff88809f32b000 by task syz-executor.2/7391 should_fail_alloc_page mm/page_alloc.c:3082 [inline] prepare_alloc_pages mm/page_alloc.c:4340 [inline] __alloc_pages_nodemask+0x1d5/0x710 mm/page_alloc.c:4387 __alloc_pages include/linux/gfp.h:496 [inline] __alloc_pages_node include/linux/gfp.h:509 [inline] kmem_getpages mm/slab.c:1412 [inline] cache_grow_begin+0x91/0x8d0 mm/slab.c:2682 cache_alloc_refill mm/slab.c:3049 [inline] ____cache_alloc mm/slab.c:3132 [inline] slab_alloc_node mm/slab.c:3327 [inline] kmem_cache_alloc_node+0x664/0x730 mm/slab.c:3647 __alloc_skb+0xa7/0x580 net/core/skbuff.c:193 alloc_skb_fclone include/linux/skbuff.h:1037 [inline] sk_stream_alloc_skb+0x9e/0x810 net/ipv4/tcp.c:882 do_tcp_sendpages+0x772/0x1e10 net/ipv4/tcp.c:1001 tcp_sendpage_locked+0x63/0xa0 net/ipv4/tcp.c:1104 tcp_sendpage+0x37/0x50 net/ipv4/tcp.c:1114 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:0x459aa9 Code: 7d 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 4b b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fac84e17c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000113 RAX: ffffffffffffffda RBX: 00007fac84e17c90 RCX: 0000000000459aa9 RDX: 0000000000000004 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 000000000075bfc8 R08: 000000011d100000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fac84e186d4 R13: 00000000004c94f8 R14: 00000000004dfe58 R15: 0000000000000005 CPU: 0 PID: 7391 Comm: syz-executor.2 Not tainted 4.19.131-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:373 [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+0x9ae/0x1600 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:0x459aa9 Code: 7d 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 4b b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f4f10033c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000113 RAX: ffffffffffffffda RBX: 00007f4f10033c90 RCX: 0000000000459aa9 RDX: 0000000000000004 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 000000011d100000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f4f100346d4 R13: 00000000004c94f8 R14: 00000000004dfe58 R15: 0000000000000005 Allocated by task 6375: 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 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:490 kmem_cache_alloc+0x12e/0x730 mm/slab.c:3559 kmem_cache_zalloc include/linux/slab.h:699 [inline] __kernfs_new_node+0xe7/0x6f0 fs/kernfs/dir.c:633 kernfs_new_node+0x62/0x110 fs/kernfs/dir.c:693 kernfs_create_dir_ns+0x27/0x120 fs/kernfs/dir.c:1019 internal_create_group+0x17e/0xaf0 fs/sysfs/group.c:135 sysfs_create_group+0xe/0x10 fs/sysfs/group.c:173 netdev_queue_add_kobject net/core/net-sysfs.c:1487 [inline] netdev_queue_update_kobjects+0x123/0x330 net/core/net-sysfs.c:1509 register_queue_kobjects net/core/net-sysfs.c:1551 [inline] netdev_register_kobject+0x261/0x360 net/core/net-sysfs.c:1769 register_netdevice+0x6f4/0xfb0 net/core/dev.c:8716 __ip_tunnel_create+0x337/0x500 net/ipv4/ip_tunnel.c:280 ip_tunnel_init_net+0x29e/0x7f0 net/ipv4/ip_tunnel.c:1025 erspan_init_net+0x1d/0x20 net/ipv4/ip_gre.c:1742 ops_init+0x95/0x370 net/core/net_namespace.c:129 setup_net+0x2c1/0x660 net/core/net_namespace.c:315 copy_net_ns+0x199/0x29a net/core/net_namespace.c:438 create_new_namespaces+0x487/0x760 kernel/nsproxy.c:107 unshare_nsproxy_namespaces+0x87/0x1a0 kernel/nsproxy.c:206 ksys_unshare+0x31b/0x710 kernel/fork.c:2530 __do_sys_unshare kernel/fork.c:2598 [inline] __se_sys_unshare kernel/fork.c:2596 [inline] __x64_sys_unshare+0x2c/0x40 kernel/fork.c:2596 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff88809f32b000 which belongs to the cache kernfs_node_cache of size 160 The buggy address is located 0 bytes inside of 160-byte region [ffff88809f32b000, ffff88809f32b0a0) The buggy address belongs to the page: page:ffffea00027ccac0 count:1 mapcount:0 mapping:ffff88821bc47c80 index:0xffff88809f32bfee flags: 0x1fffc0000000100(slab) raw: 01fffc0000000100 ffffea000299a708 ffffea0002a1d588 ffff88821bc47c80 raw: ffff88809f32bfee ffff88809f32b000 0000000100000012 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809f32af80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88809f32b000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88809f32b080: 00 00 00 00 fc fc fc fc fc fc fc fc 00 00 00 00 ^ ffff88809f32b100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88809f32b180: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ==================================================================