Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp591181pxa; Tue, 11 Aug 2020 10:07:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyCIHU7Euk6Tdwi+YfK+/agn5eoSIfCo/zLS652UVmFXkpNHh78l5kMaDBWhABtbErsPbrw X-Received: by 2002:a17:906:7f05:: with SMTP id d5mr26839176ejr.122.1597165655333; Tue, 11 Aug 2020 10:07:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597165655; cv=none; d=google.com; s=arc-20160816; b=nAj2Blva3q4ZW/KKgeb4CzhXtFmwTzslqk7X1C+rhC1fAKb2dpbPwPAP0b9Moz+kNO gjfY7ikisfIiMl9gdAbJxMbVgzwkRMAKQ1Y8FWDtip/N/2lAK2qJ7/BYXS+k2T7Lo3Uw dJA/Lyu4E92V0CQOa/I3YV+2yVmtHWwGJrjx1/zxygGclzV/huIhVmgCoHr6+LjcWbeV cqiLygXQGyqvOGptDnSC1M0uzT366MSerDX/FC0ZA+DuSa6qzS3uCdWV7/D2Z/7oPvfR 8OXDx3AGwJf1yYtY4E8K2zvXRoVv1lE/XUyKNytx0tf6dXvPXWYh5W017HJ7IeNrt2OS po1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:from:subject:message-id:date :mime-version; bh=3Vhix2QlrP7+/gWO8RD9Xb0nh1rKeNHswNvEEXVVggk=; b=NFXNqwbe3GQWjeuibCQ24kImJIMD6tLhfJbB4l1vWkvhsCLBTE9QKf5Oul/lSbiOIA p+7jRV+aM3mPIMVec89D8f6dno3TtEknKDEPVYt5+V5RM1HGzVNhOcgRly123V2ivbw0 eOi9HUNVsHs/y8/BvbrN9C3bB5XYdciGgWat32rbKRCuZwVGSSjE1Fjv0H/9fkT257lp kPe/Ej4jKZS03zxc6bl3LWQq6kOZt3cB+QeIwZ0TwOy0JDFLkCl9FVDBlYnfqfyTybg5 EjYKJ+bGbtAQnFS/C3z7cJVjWwj51ry1LMHfpH6pUPm8JLiEDG1B3FJQD498Q3E7zZHB jkSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rl3si13367082ejb.643.2020.08.11.10.07.12; Tue, 11 Aug 2020 10:07:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729206AbgHKRGU (ORCPT + 99 others); Tue, 11 Aug 2020 13:06:20 -0400 Received: from mail-il1-f197.google.com ([209.85.166.197]:51144 "EHLO mail-il1-f197.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729099AbgHKRGS (ORCPT ); Tue, 11 Aug 2020 13:06:18 -0400 Received: by mail-il1-f197.google.com with SMTP id t20so11019013ill.17 for ; Tue, 11 Aug 2020 10:06:17 -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=3Vhix2QlrP7+/gWO8RD9Xb0nh1rKeNHswNvEEXVVggk=; b=XouC0hBMeM13UqedVGkDx1ue5BEK8SBndIbDSwi4XR6b7EtUo0hQA3tpEacWip8xE6 b6A3uGARzlLGYBUIkbRj4IyQJa4KnHLL80V2MFj32lYyKZqtkhpB+fTRpGSnu01zwfoh oU9i2PuSNnO6QOBNXi5yHKKhEFnFHIqm6t/v+QWSFZ1EO964WdY9uBR/HZVYS6hYt7jT iBv+h1jgndoIVqCPmaV713g1hdDKm2OFmhwXBlPeXw639neTj4R90GCYFNz/fpQaQ+QQ ZrychKqqtq3AgZaVcmRN/x5bm7KZk3aqcWVPq5tD+/vyl/4smBgbLmEYeUiT7i8xO9oo oU2Q== X-Gm-Message-State: AOAM531nmhjgJPRNw0848huvOTyHB07AfOu71rj9dOupeJJqqN+Jpso4 VcTdFCo1M1pkzs18nKq1pYjUBF2PuaDmnfPyQG9lQZLMHk1u MIME-Version: 1.0 X-Received: by 2002:a05:6602:2246:: with SMTP id o6mr23227895ioo.35.1597165577561; Tue, 11 Aug 2020 10:06:17 -0700 (PDT) Date: Tue, 11 Aug 2020 10:06:17 -0700 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <000000000000e5ea9e05ac9d16c1@google.com> Subject: memory leak in do_seccomp From: syzbot To: andriin@fb.com, ast@kernel.org, bpf@vger.kernel.org, daniel@iogearbox.net, john.fastabend@gmail.com, kafai@fb.com, keescook@chromium.org, kpsingh@chromium.org, linux-kernel@vger.kernel.org, luto@amacapital.net, netdev@vger.kernel.org, songliubraving@fb.com, syzkaller-bugs@googlegroups.com, wad@chromium.org, yhs@fb.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, syzbot found the following issue on: HEAD commit: 449dc8c9 Merge tag 'for-v5.9' of git://git.kernel.org/pub/.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=15d816c2900000 kernel config: https://syzkaller.appspot.com/x/.config?x=4810fa4a53b3aa2c dashboard link: https://syzkaller.appspot.com/bug?extid=3ad9614a12f80994c32e compiler: gcc (GCC) 10.1.0-syz 20200507 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=153d30e2900000 IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+3ad9614a12f80994c32e@syzkaller.appspotmail.com 2020/08/09 00:29:47 executed programs: 3 BUG: memory leak unreferenced object 0xffff88811310ea80 (size 96): comm "syz-executor.0", pid 6688, jiffies 4294954707 (age 12.810s) hex dump (first 32 bytes): 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 30 e0 00 00 c9 ff ff .........0...... backtrace: [<0000000073bb6e7d>] kmalloc include/linux/slab.h:554 [inline] [<0000000073bb6e7d>] kzalloc include/linux/slab.h:666 [inline] [<0000000073bb6e7d>] seccomp_prepare_filter kernel/seccomp.c:562 [inline] [<0000000073bb6e7d>] seccomp_prepare_user_filter kernel/seccomp.c:604 [inline] [<0000000073bb6e7d>] seccomp_set_mode_filter kernel/seccomp.c:1535 [inline] [<0000000073bb6e7d>] do_seccomp+0x2ec/0xd40 kernel/seccomp.c:1649 [<00000000658618a4>] do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 [<00000000b8258e4d>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 BUG: memory leak unreferenced object 0xffffc90000e03000 (size 4096): comm "syz-executor.0", pid 6688, jiffies 4294954707 (age 12.810s) hex dump (first 32 bytes): 01 00 03 00 00 00 00 00 00 00 00 00 05 00 00 00 ................ 2d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -............... backtrace: [<000000003b6a39af>] __vmalloc_node_range+0x2e1/0x3c0 mm/vmalloc.c:2520 [<00000000eee59e12>] __vmalloc_node mm/vmalloc.c:2552 [inline] [<00000000eee59e12>] __vmalloc+0x49/0x50 mm/vmalloc.c:2566 [<000000006e13ac2a>] bpf_prog_alloc_no_stats+0x32/0x100 kernel/bpf/core.c:85 [<00000000cff3572c>] bpf_prog_alloc+0x1c/0xb0 kernel/bpf/core.c:111 [<000000003222ffa9>] bpf_prog_create_from_user+0x5f/0x2a0 net/core/filter.c:1409 [<00000000baa576ae>] seccomp_prepare_filter kernel/seccomp.c:567 [inline] [<00000000baa576ae>] seccomp_prepare_user_filter kernel/seccomp.c:604 [inline] [<00000000baa576ae>] seccomp_set_mode_filter kernel/seccomp.c:1535 [inline] [<00000000baa576ae>] do_seccomp+0x32e/0xd40 kernel/seccomp.c:1649 [<00000000658618a4>] do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 [<00000000b8258e4d>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 BUG: memory leak unreferenced object 0xffff888113bc1c00 (size 1024): comm "syz-executor.0", pid 6688, jiffies 4294954707 (age 12.810s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<000000000466b245>] kmalloc include/linux/slab.h:554 [inline] [<000000000466b245>] kzalloc include/linux/slab.h:666 [inline] [<000000000466b245>] bpf_prog_alloc_no_stats+0x73/0x100 kernel/bpf/core.c:89 [<00000000cff3572c>] bpf_prog_alloc+0x1c/0xb0 kernel/bpf/core.c:111 [<000000003222ffa9>] bpf_prog_create_from_user+0x5f/0x2a0 net/core/filter.c:1409 [<00000000baa576ae>] seccomp_prepare_filter kernel/seccomp.c:567 [inline] [<00000000baa576ae>] seccomp_prepare_user_filter kernel/seccomp.c:604 [inline] [<00000000baa576ae>] seccomp_set_mode_filter kernel/seccomp.c:1535 [inline] [<00000000baa576ae>] do_seccomp+0x32e/0xd40 kernel/seccomp.c:1649 [<00000000658618a4>] do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 [<00000000b8258e4d>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 BUG: memory leak unreferenced object 0xffff8881154cb860 (size 32): comm "syz-executor.0", pid 6688, jiffies 4294954707 (age 12.810s) hex dump (first 32 bytes): 01 00 73 74 65 6d 64 2d 00 5c d6 19 81 88 ff ff ..stemd-.\...... 65 72 76 69 63 65 00 00 00 00 00 00 00 00 00 00 ervice.......... backtrace: [<00000000561d65d4>] kmalloc include/linux/slab.h:554 [inline] [<00000000561d65d4>] bpf_prog_store_orig_filter+0x33/0xa0 net/core/filter.c:1131 [<000000005d9b7cd2>] bpf_prog_create_from_user+0xda/0x2a0 net/core/filter.c:1422 [<00000000baa576ae>] seccomp_prepare_filter kernel/seccomp.c:567 [inline] [<00000000baa576ae>] seccomp_prepare_user_filter kernel/seccomp.c:604 [inline] [<00000000baa576ae>] seccomp_set_mode_filter kernel/seccomp.c:1535 [inline] [<00000000baa576ae>] do_seccomp+0x32e/0xd40 kernel/seccomp.c:1649 [<00000000658618a4>] do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 [<00000000b8258e4d>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 BUG: memory leak unreferenced object 0xffff888119d65c00 (size 32): comm "syz-executor.0", pid 6688, jiffies 4294954707 (age 12.810s) hex dump (first 32 bytes): 06 00 00 00 fb ff ff 7f 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<00000000ad603142>] kmemdup+0x23/0x50 mm/util.c:127 [<0000000001d3eabf>] kmemdup include/linux/string.h:479 [inline] [<0000000001d3eabf>] bpf_prog_store_orig_filter+0x5e/0xa0 net/core/filter.c:1138 [<000000005d9b7cd2>] bpf_prog_create_from_user+0xda/0x2a0 net/core/filter.c:1422 [<00000000baa576ae>] seccomp_prepare_filter kernel/seccomp.c:567 [inline] [<00000000baa576ae>] seccomp_prepare_user_filter kernel/seccomp.c:604 [inline] [<00000000baa576ae>] seccomp_set_mode_filter kernel/seccomp.c:1535 [inline] [<00000000baa576ae>] do_seccomp+0x32e/0xd40 kernel/seccomp.c:1649 [<00000000658618a4>] do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 [<00000000b8258e4d>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 BUG: memory leak unreferenced object 0xffff8881131ecb00 (size 96): comm "syz-executor.0", pid 6688, jiffies 4294954707 (age 12.810s) hex dump (first 32 bytes): 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 ................ 80 ea 10 13 81 88 ff ff 00 b0 d8 00 00 c9 ff ff ................ backtrace: [<0000000073bb6e7d>] kmalloc include/linux/slab.h:554 [inline] [<0000000073bb6e7d>] kzalloc include/linux/slab.h:666 [inline] [<0000000073bb6e7d>] seccomp_prepare_filter kernel/seccomp.c:562 [inline] [<0000000073bb6e7d>] seccomp_prepare_user_filter kernel/seccomp.c:604 [inline] [<0000000073bb6e7d>] seccomp_set_mode_filter kernel/seccomp.c:1535 [inline] [<0000000073bb6e7d>] do_seccomp+0x2ec/0xd40 kernel/seccomp.c:1649 [<00000000658618a4>] do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 [<00000000b8258e4d>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 BUG: memory leak unreferenced object 0xffff88811310e400 (size 96): comm "syz-executor.0", pid 6702, jiffies 4294955242 (age 7.460s) hex dump (first 32 bytes): 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 50 e1 00 00 c9 ff ff .........P...... backtrace: [<0000000073bb6e7d>] kmalloc include/linux/slab.h:554 [inline] [<0000000073bb6e7d>] kzalloc include/linux/slab.h:666 [inline] [<0000000073bb6e7d>] seccomp_prepare_filter kernel/seccomp.c:562 [inline] [<0000000073bb6e7d>] seccomp_prepare_user_filter kernel/seccomp.c:604 [inline] [<0000000073bb6e7d>] seccomp_set_mode_filter kernel/seccomp.c:1535 [inline] [<0000000073bb6e7d>] do_seccomp+0x2ec/0xd40 kernel/seccomp.c:1649 [<00000000658618a4>] do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 [<00000000b8258e4d>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 --- This report 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 issue. See: https://goo.gl/tpsmEJ#status for how to communicate with syzbot. syzbot can test patches for this issue, for details see: https://goo.gl/tpsmEJ#testing-patches