From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.4 required=3.0 tests=FROM_LOCAL_HEX, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4493BC54FD0 for ; Mon, 27 Apr 2020 13:48:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2724A206B6 for ; Mon, 27 Apr 2020 13:48:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727902AbgD0NsS (ORCPT ); Mon, 27 Apr 2020 09:48:18 -0400 Received: from mail-io1-f69.google.com ([209.85.166.69]:32845 "EHLO mail-io1-f69.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727012AbgD0NsS (ORCPT ); Mon, 27 Apr 2020 09:48:18 -0400 Received: by mail-io1-f69.google.com with SMTP id w4so20393589iol.0 for ; Mon, 27 Apr 2020 06:48:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=IKLvnmX2O6G5JUPiVLiWpSP3a5qdDUhizIddlOL+gt0=; b=XVkm3U32MS06zbO5r4QiAkcPvYyb9+abV30OljxRK96/+BJ9B2XRkhl9vVtHFcQJb3 T9xeV3GYq16Xtauoiq3BuOKJ7G8JsR+tkIq+gfwwZk+hHTmZF+d9CVxjhdR3F+Q6aFtl kzDy4wC9SY9qZ0Q9u8PopCDx7kOztmLvNR07ub9f+3UNTNpEL0FnwsBurpmGmU0uMqQ3 Vh4FlbuOScfNR3kJN6W9cM03N8zopi2Jia5nb2xvu4/SMA6NlZh0nry7TNN36rIknWew D62iGg4qkKSMH/N2DuMvBiQMGKtN/RIMrRPyXhKUyrgSUdvfSxku0b29Df2DUeiibbiW TyfQ== X-Gm-Message-State: AGi0PuYdmNekmYL9YinxDrA2uX+nieA0LF0ORa3ZxhI9m8CeoI5wy8Ng cUpXSrZWlbM928iN8GXRgblg5qi541nXp2jCKhZTi1Om/ODb X-Google-Smtp-Source: APiQypJMIAfRCG58K421qGBsaWHhvtaekdn2fEP6m3wE4vbwtCLcO2tCumRPcC8TM6DhEFnx4rznkFHTrAySJgtc01uMdr9hjAn5 MIME-Version: 1.0 X-Received: by 2002:a02:5184:: with SMTP id s126mr9960216jaa.81.1587995295346; Mon, 27 Apr 2020 06:48:15 -0700 (PDT) Date: Mon, 27 Apr 2020 06:48:15 -0700 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <0000000000007bf88805a445f729@google.com> Subject: memory leak in inet_create (2) From: syzbot To: andriin@fb.com, ast@kernel.org, bpf@vger.kernel.org, daniel@iogearbox.net, davem@davemloft.net, john.fastabend@gmail.com, kafai@fb.com, kpsingh@chromium.org, kuba@kernel.org, kuznet@ms2.inr.ac.ru, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, songliubraving@fb.com, syzkaller-bugs@googlegroups.com, yhs@fb.com, yoshfuji@linux-ipv6.org Content-Type: text/plain; charset="UTF-8" Sender: bpf-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org Hello, syzbot found the following crash on: HEAD commit: 5ef58e29 Merge tag 'scsi-fixes' of git://git.kernel.org/pu.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=10f0f144100000 kernel config: https://syzkaller.appspot.com/x/.config?x=bb30a3887988ffff dashboard link: https://syzkaller.appspot.com/bug?extid=bb7ba8dd62c3cb6e3c78 compiler: gcc (GCC) 9.0.0 20181231 (experimental) syz repro: https://syzkaller.appspot.com/x/repro.syz?x=110e8fcfe00000 IMPORTANT: if you fix the bug, please add the following tag to the commit: Reported-by: syzbot+bb7ba8dd62c3cb6e3c78@syzkaller.appspotmail.com 2020/04/25 22:35:25 executed programs: 3 2020/04/25 22:35:30 executed programs: 5 2020/04/25 22:35:36 executed programs: 7 BUG: memory leak unreferenced object 0xffff88811094b300 (size 2200): comm "syz-executor.0", pid 6864, jiffies 4294947266 (age 13.790s) hex dump (first 32 bytes): ac 14 14 bb ac 14 14 0a 89 26 f2 70 40 01 00 00 .........&.p@... 02 00 07 40 00 00 00 00 00 00 00 00 00 00 00 00 ...@............ backtrace: [<000000002efa2559>] sk_prot_alloc+0x3c/0x170 net/core/sock.c:1598 [<00000000a5b6b437>] sk_alloc+0x30/0x330 net/core/sock.c:1658 [<00000000494c18b6>] inet_create net/ipv4/af_inet.c:321 [inline] [<00000000494c18b6>] inet_create+0x119/0x450 net/ipv4/af_inet.c:247 [<000000001239bbdb>] __sock_create+0x14a/0x220 net/socket.c:1433 [<00000000c1f7caa8>] sock_create net/socket.c:1484 [inline] [<00000000c1f7caa8>] __sys_socket+0x60/0x110 net/socket.c:1526 [<00000000d35154cc>] __do_sys_socket net/socket.c:1535 [inline] [<00000000d35154cc>] __se_sys_socket net/socket.c:1533 [inline] [<00000000d35154cc>] __x64_sys_socket+0x1a/0x20 net/socket.c:1533 [<00000000283ef9ec>] do_syscall_64+0x6e/0x220 arch/x86/entry/common.c:295 [<000000004290d57b>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 BUG: memory leak unreferenced object 0xffff88811b253f60 (size 32): comm "syz-executor.0", pid 6864, jiffies 4294947266 (age 13.790s) hex dump (first 32 bytes): 02 00 00 00 00 00 00 00 c0 3d 3f 15 81 88 ff ff .........=?..... 01 00 00 00 00 00 00 00 10 00 00 00 00 00 00 00 ................ backtrace: [<000000007d627037>] kmalloc include/linux/slab.h:555 [inline] [<000000007d627037>] kzalloc include/linux/slab.h:669 [inline] [<000000007d627037>] selinux_sk_alloc_security+0x43/0xa0 security/selinux/hooks.c:5126 [<0000000076a22383>] security_sk_alloc+0x42/0x70 security/security.c:2120 [<0000000066acd291>] sk_prot_alloc+0x9c/0x170 net/core/sock.c:1607 [<00000000a5b6b437>] sk_alloc+0x30/0x330 net/core/sock.c:1658 [<00000000494c18b6>] inet_create net/ipv4/af_inet.c:321 [inline] [<00000000494c18b6>] inet_create+0x119/0x450 net/ipv4/af_inet.c:247 [<000000001239bbdb>] __sock_create+0x14a/0x220 net/socket.c:1433 [<00000000c1f7caa8>] sock_create net/socket.c:1484 [inline] [<00000000c1f7caa8>] __sys_socket+0x60/0x110 net/socket.c:1526 [<00000000d35154cc>] __do_sys_socket net/socket.c:1535 [inline] [<00000000d35154cc>] __se_sys_socket net/socket.c:1533 [inline] [<00000000d35154cc>] __x64_sys_socket+0x1a/0x20 net/socket.c:1533 [<00000000283ef9ec>] do_syscall_64+0x6e/0x220 arch/x86/entry/common.c:295 [<000000004290d57b>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 BUG: memory leak unreferenced object 0xffff8881153f3dc0 (size 64): comm "syz-executor.0", pid 6864, jiffies 4294947266 (age 13.790s) hex dump (first 32 bytes): 15 00 00 01 00 00 00 00 20 68 e9 1c 81 88 ff ff ........ h...... 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<00000000dde82831>] kmalloc include/linux/slab.h:555 [inline] [<00000000dde82831>] kzalloc include/linux/slab.h:669 [inline] [<00000000dde82831>] netlbl_secattr_alloc include/net/netlabel.h:382 [inline] [<00000000dde82831>] selinux_netlbl_sock_genattr+0x48/0x180 security/selinux/netlabel.c:76 [<00000000438c6346>] selinux_netlbl_socket_post_create+0x41/0xb0 security/selinux/netlabel.c:398 [<00000000b422abf2>] selinux_socket_post_create+0x182/0x390 security/selinux/hooks.c:4541 [<000000005be0d1ac>] security_socket_post_create+0x54/0x80 security/security.c:2032 [<00000000a0ec3d71>] __sock_create+0x1cc/0x220 net/socket.c:1449 [<00000000c1f7caa8>] sock_create net/socket.c:1484 [inline] [<00000000c1f7caa8>] __sys_socket+0x60/0x110 net/socket.c:1526 [<00000000d35154cc>] __do_sys_socket net/socket.c:1535 [inline] [<00000000d35154cc>] __se_sys_socket net/socket.c:1533 [inline] [<00000000d35154cc>] __x64_sys_socket+0x1a/0x20 net/socket.c:1533 [<00000000283ef9ec>] do_syscall_64+0x6e/0x220 arch/x86/entry/common.c:295 [<000000004290d57b>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 BUG: memory leak unreferenced object 0xffff88811ce96820 (size 32): comm "syz-executor.0", pid 6864, jiffies 4294947266 (age 13.790s) hex dump (first 32 bytes): 6b 65 72 6e 65 6c 5f 74 00 73 79 73 74 65 6d 5f kernel_t.system_ 72 3a 6b 65 72 6e 65 6c 5f 74 3a 73 30 00 00 00 r:kernel_t:s0... backtrace: [<000000007edbec14>] kstrdup+0x36/0x70 mm/util.c:60 [<00000000b343d2c4>] security_netlbl_sid_to_secattr+0x97/0x100 security/selinux/ss/services.c:3739 [<00000000ddb8495a>] selinux_netlbl_sock_genattr+0x67/0x180 security/selinux/netlabel.c:79 [<00000000438c6346>] selinux_netlbl_socket_post_create+0x41/0xb0 security/selinux/netlabel.c:398 [<00000000b422abf2>] selinux_socket_post_create+0x182/0x390 security/selinux/hooks.c:4541 [<000000005be0d1ac>] security_socket_post_create+0x54/0x80 security/security.c:2032 [<00000000a0ec3d71>] __sock_create+0x1cc/0x220 net/socket.c:1449 [<00000000c1f7caa8>] sock_create net/socket.c:1484 [inline] [<00000000c1f7caa8>] __sys_socket+0x60/0x110 net/socket.c:1526 [<00000000d35154cc>] __do_sys_socket net/socket.c:1535 [inline] [<00000000d35154cc>] __se_sys_socket net/socket.c:1533 [inline] [<00000000d35154cc>] __x64_sys_socket+0x1a/0x20 net/socket.c:1533 [<00000000283ef9ec>] do_syscall_64+0x6e/0x220 arch/x86/entry/common.c:295 [<000000004290d57b>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 BUG: memory leak unreferenced object 0xffff8881113aa400 (size 512): comm "syz-executor.0", pid 6864, jiffies 4294947266 (age 13.790s) hex dump (first 32 bytes): 00 b3 94 10 81 88 ff ff 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 ................ backtrace: [<0000000031227790>] kmalloc_node include/linux/slab.h:573 [inline] [<0000000031227790>] kzalloc_node include/linux/slab.h:680 [inline] [<0000000031227790>] sk_psock_init+0x2a/0x180 net/core/skmsg.c:496 [<00000000a405c065>] sock_map_link.isra.0+0x469/0x4f0 net/core/sock_map.c:236 [<000000003b7d5922>] sock_map_update_common+0xa1/0x3c0 net/core/sock_map.c:451 [<00000000f12c515e>] sock_map_update_elem+0x1e9/0x220 net/core/sock_map.c:552 [<000000000fedde3d>] bpf_map_update_value.isra.0+0x141/0x2f0 kernel/bpf/syscall.c:169 [<000000004deb6133>] map_update_elem kernel/bpf/syscall.c:1098 [inline] [<000000004deb6133>] __do_sys_bpf+0x16bf/0x1f00 kernel/bpf/syscall.c:3689 [<00000000283ef9ec>] do_syscall_64+0x6e/0x220 arch/x86/entry/common.c:295 [<000000004290d57b>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 --- This bug is generated by a bot. It may contain errors. See https://goo.gl/tpsmEJ for more information about syzbot. syzbot engineers can be reached at syzkaller@googlegroups.com. syzbot will keep track of this bug report. See: https://goo.gl/tpsmEJ#status for how to communicate with syzbot. syzbot can test patches for this bug, for details see: https://goo.gl/tpsmEJ#testing-patches