bisecting fixing commit since ddec8ed2d4905d0967ce2ec432e440e582aa52c6 building syzkaller on 2ca0d3855c36da0994766801f4b5067a74824437 testing commit ddec8ed2d4905d0967ce2ec432e440e582aa52c6 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 7ae99a8c6ebefca0e874e223db1e63f4f5d22ff2b18be00283b0a88a308b2536 all runs: crashed: KASAN: slab-out-of-bounds Read in decrypt_internal testing current HEAD dfd42facf1e4ada021b939b4e19c935dcdd55566 testing commit dfd42facf1e4ada021b939b4e19c935dcdd55566 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 6578b666532a17521cbc22777e5b208ad7b1c0ce5a4b22d0a03a45fbe7ca683f run #0: basic kernel testing failed: BUG: program execution failed: executor NUM: EOF run #1: crashed: KASAN: slab-out-of-bounds Read in decrypt_internal run #2: crashed: KASAN: slab-out-of-bounds Read in decrypt_internal run #3: crashed: KASAN: slab-out-of-bounds Read in decrypt_internal run #4: crashed: KASAN: slab-out-of-bounds Read in decrypt_internal run #5: crashed: KASAN: slab-out-of-bounds Read in decrypt_internal run #6: crashed: KASAN: slab-out-of-bounds Read in decrypt_internal run #7: crashed: KASAN: slab-out-of-bounds Read in decrypt_internal run #8: crashed: KASAN: slab-out-of-bounds Read in decrypt_internal run #9: crashed: KASAN: slab-out-of-bounds Read in decrypt_internal revisions tested: 2, total time: 19m50.467730155s (build: 13m7.464100631s, test: 6m14.85453581s) the crash still happens on HEAD commit msg: Linux 5.17-rc3 crash: KASAN: slab-out-of-bounds Read in decrypt_internal ================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/fortify-string.h:225 [inline] BUG: KASAN: slab-out-of-bounds in decrypt_internal+0x77b/0x1b70 net/tls/tls_sw.c:1497 Read of size 16 at addr ffff88801c9b7840 by task syz-executor285/4058 CPU: 0 PID: 4058 Comm: syz-executor285 Not tainted 5.17.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x57/0x7d lib/dump_stack.c:106 print_address_description.constprop.0.cold+0x8d/0x336 mm/kasan/report.c:255 __kasan_report mm/kasan/report.c:442 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:459 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0x13d/0x180 mm/kasan/generic.c:189 memcpy+0x20/0x60 mm/kasan/shadow.c:65 memcpy include/linux/fortify-string.h:225 [inline] decrypt_internal+0x77b/0x1b70 net/tls/tls_sw.c:1497 decrypt_skb_update+0xf9/0xa90 net/tls/tls_sw.c:1577 tls_sw_recvmsg+0x496/0x1270 net/tls/tls_sw.c:1848 inet6_recvmsg+0xf2/0x490 net/ipv6/af_inet6.c:659 sock_recvmsg_nosec net/socket.c:948 [inline] sock_recvmsg net/socket.c:966 [inline] sock_recvmsg net/socket.c:962 [inline] ____sys_recvmsg+0x25e/0x620 net/socket.c:2632 ___sys_recvmsg+0xe2/0x1a0 net/socket.c:2674 do_recvmmsg+0x1c8/0x550 net/socket.c:2768 __sys_recvmmsg net/socket.c:2847 [inline] __do_sys_recvmmsg net/socket.c:2870 [inline] __se_sys_recvmmsg net/socket.c:2863 [inline] __x64_sys_recvmmsg+0x19a/0x200 net/socket.c:2863 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7fb60f8eff29 Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 00 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 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffc362332e8 EFLAGS: 00000246 ORIG_RAX: 000000000000012b RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fb60f8eff29 RDX: 0000000000000001 RSI: 0000000020002900 RDI: 0000000000000003 RBP: 00007fb60f8b40d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fb60f8b4160 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 4058: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:436 [inline] ____kasan_kmalloc mm/kasan/common.c:515 [inline] ____kasan_kmalloc mm/kasan/common.c:474 [inline] __kasan_kmalloc+0xa9/0xd0 mm/kasan/common.c:524 kmalloc include/linux/slab.h:586 [inline] tls_set_sw_offload+0x78f/0x13e0 net/tls/tls_sw.c:2525 do_tls_setsockopt_conf net/tls/tls_main.c:656 [inline] do_tls_setsockopt net/tls/tls_main.c:692 [inline] tls_setsockopt+0x921/0xda0 net/tls/tls_main.c:712 __sys_setsockopt+0x1fd/0x4e0 net/socket.c:2180 __do_sys_setsockopt net/socket.c:2191 [inline] __se_sys_setsockopt net/socket.c:2188 [inline] __x64_sys_setsockopt+0xb5/0x150 net/socket.c:2188 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff88801c9b7840 which belongs to the cache kmalloc-16 of size 16 The buggy address is located 0 bytes inside of 16-byte region [ffff88801c9b7840, ffff88801c9b7850) The buggy address belongs to the page: page:ffffea0000726dc0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88801c9b7ea0 pfn:0x1c9b7 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea00006beb00 dead000000000002 ffff88800fc413c0 raw: ffff88801c9b7ea0 000000008080006f 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 7, ts 6128593379, free_ts 6072223341 prep_new_page mm/page_alloc.c:2434 [inline] get_page_from_freelist+0xa6f/0x2f10 mm/page_alloc.c:4165 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5389 alloc_slab_page mm/slub.c:1799 [inline] allocate_slab mm/slub.c:1944 [inline] new_slab+0x28a/0x3b0 mm/slub.c:2004 ___slab_alloc+0x87e/0xe80 mm/slub.c:3018 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3105 slab_alloc_node mm/slub.c:3196 [inline] slab_alloc mm/slub.c:3238 [inline] __kmalloc+0x2fb/0x340 mm/slub.c:4420 kmalloc include/linux/slab.h:586 [inline] kzalloc include/linux/slab.h:715 [inline] rh_call_control drivers/usb/core/hcd.c:514 [inline] rh_urb_enqueue drivers/usb/core/hcd.c:848 [inline] usb_hcd_submit_urb+0x5d8/0x1f90 drivers/usb/core/hcd.c:1551 usb_start_wait_urb+0xf9/0x450 drivers/usb/core/message.c:58 usb_internal_control_msg drivers/usb/core/message.c:102 [inline] usb_control_msg+0x306/0x460 drivers/usb/core/message.c:153 get_port_status drivers/usb/core/hub.c:580 [inline] hub_ext_port_status+0xf8/0x3c0 drivers/usb/core/hub.c:597 hub_port_status drivers/usb/core/hub.c:619 [inline] hub_activate+0x645/0x15d0 drivers/usb/core/hub.c:1129 process_one_work+0x879/0x1410 kernel/workqueue.c:2307 worker_thread+0x5a0/0xf60 kernel/workqueue.c:2454 kthread+0x299/0x340 kernel/kthread.c:377 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1352 [inline] free_pcp_prepare+0x374/0x870 mm/page_alloc.c:1404 free_unref_page_prepare mm/page_alloc.c:3325 [inline] free_unref_page_list+0x1a9/0xfa0 mm/page_alloc.c:3441 release_pages+0x223/0xee0 mm/swap.c:980 tlb_batch_pages_flush mm/mmu_gather.c:50 [inline] tlb_flush_mmu_free mm/mmu_gather.c:243 [inline] tlb_flush_mmu mm/mmu_gather.c:250 [inline] tlb_finish_mmu+0x127/0x790 mm/mmu_gather.c:341 exit_mmap+0x1d1/0x580 mm/mmap.c:3180 __mmput+0xed/0x430 kernel/fork.c:1114 free_bprm+0x5b/0x290 fs/exec.c:1485 kernel_execve+0x2cc/0x3e0 fs/exec.c:1982 call_usermodehelper_exec_async+0x2c1/0x500 kernel/umh.c:112 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Memory state around the buggy address: ffff88801c9b7700: fb fb fc fc fb fb fc fc fb fb fc fc fb fb fc fc ffff88801c9b7780: fb fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc >ffff88801c9b7800: fa fb fc fc fa fb fc fc 00 04 fc fc 00 00 fc fc ^ ffff88801c9b7880: 00 00 fc fc 00 00 fc fc 00 03 fc fc 00 07 fc fc ffff88801c9b7900: fb fb fc fc fb fb fc fc fb fb fc fc 00 00 fc fc ==================================================================