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 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 run #10: crashed: KASAN: slab-out-of-bounds Read in decrypt_internal run #11: crashed: KASAN: slab-out-of-bounds Read in decrypt_internal run #12: crashed: KASAN: slab-out-of-bounds Read in decrypt_internal run #13: crashed: KASAN: slab-out-of-bounds Read in decrypt_internal run #14: crashed: KASAN: slab-out-of-bounds Read in decrypt_internal run #15: crashed: KASAN: slab-out-of-bounds Read in decrypt_internal run #16: crashed: KASAN: slab-out-of-bounds Read in decrypt_internal run #17: crashed: KASAN: slab-out-of-bounds Read in decrypt_internal run #18: crashed: KASAN: slab-out-of-bounds Read in decrypt_internal run #19: crashed: KASAN: slab-out-of-bounds Read in decrypt_internal testing current HEAD 330f4c53d3c2d8b11d86ec03a964b86dc81452f5 testing commit 330f4c53d3c2d8b11d86ec03a964b86dc81452f5 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 7edb1fec9a45849562b01ada3f2aa4c6c1e008e8b24678ea00056710b095a987 all runs: crashed: KASAN: slab-out-of-bounds Read in decrypt_internal revisions tested: 2, total time: 20m25.012918352s (build: 13m40.979320636s, test: 6m8.962326646s) the crash still happens on HEAD commit msg: ARM: fix build error when BPF_SYSCALL is disabled 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 ffff8880170cdf60 by task syz-executor215/4061 CPU: 1 PID: 4061 Comm: syz-executor215 Not tainted 5.17.0-rc7-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:0x7fe9ff7c4f29 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:00007fff39bb44f8 EFLAGS: 00000246 ORIG_RAX: 000000000000012b RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fe9ff7c4f29 RDX: 0000000000000001 RSI: 0000000020002900 RDI: 0000000000000003 RBP: 00007fe9ff7890d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fe9ff789160 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 4061: 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 ffff8880170cdf60 which belongs to the cache kmalloc-16 of size 16 The buggy address is located 0 bytes inside of 16-byte region [ffff8880170cdf60, ffff8880170cdf70) The buggy address belongs to the page: page:ffffea00005c3340 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x170cd flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea00005ec880 dead000000000002 ffff88800fc413c0 raw: 0000000000000000 0000000080800080 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 1, ts 6411691894, free_ts 6054758270 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_page_interleave+0xf/0x1c0 mm/mempolicy.c:2116 alloc_slab_page mm/slub.c:1799 [inline] allocate_slab+0x27f/0x3c0 mm/slub.c:1944 new_slab mm/slub.c:2004 [inline] ___slab_alloc+0xbe3/0x12a0 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+0x372/0x450 mm/slub.c:4420 kmalloc include/linux/slab.h:586 [inline] kzalloc include/linux/slab.h:714 [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 usb_control_msg_send+0xac/0x100 drivers/usb/core/message.c:213 usb_set_configuration+0x8c5/0x18b0 drivers/usb/core/message.c:2111 usb_generic_driver_probe+0x74/0xa0 drivers/usb/core/generic.c:238 usb_probe_device+0x95/0x240 drivers/usb/core/driver.c:293 call_driver_probe drivers/base/dd.c:517 [inline] really_probe+0x1c2/0xb60 drivers/base/dd.c:596 __driver_probe_device+0x2a6/0x460 drivers/base/dd.c:755 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+0x19/0x690 mm/page_alloc.c:3404 __vunmap+0x5af/0x9e0 mm/vmalloc.c:2635 free_work+0x4b/0x70 mm/vmalloc.c:97 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 Memory state around the buggy address: ffff8880170cde00: 00 03 fc fc 00 00 fc fc fa fb fc fc fa fb fc fc ffff8880170cde80: fa fb fc fc 00 00 fc fc 00 00 fc fc 00 00 fc fc >ffff8880170cdf00: 00 00 fc fc 00 00 fc fc 00 07 fc fc 00 04 fc fc ^ ffff8880170cdf80: fa fb fc fc fb fb fc fc 00 00 fc fc 00 00 fc fc ffff8880170ce000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================