Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4876722ybi; Tue, 30 Jul 2019 09:39:55 -0700 (PDT) X-Received: by 2002:a17:902:8205:: with SMTP id x5mr117805436pln.279.1564504765419; Tue, 30 Jul 2019 09:39:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqxmgI1DDiqPhwubI6/OquN+m72ADgYKc4Wp5gDqnvlmBMwZKVqDFa80ztNNjrtgoKbgZorl X-Received: by 2002:a17:902:8205:: with SMTP id x5mr117805383pln.279.1564504764721; Tue, 30 Jul 2019 09:39:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564504764; cv=none; d=google.com; s=arc-20160816; b=hy+G9g8nvVi7hMTV1I7C7OSIyATGBFrZEjgSmPwjEoTXIeE5mrxHE2GsfRL1N0Y+pY K7sG5J7kK0nJoQpUt36avsO4JAw52as7KwVXOyABpeWPA5yNUvA60qJgjvDayqaG1XnP 5PtuRviqdsM5fZQj9oLdptZDJw3nYmMUVQwJ0qNOSa62CFmywAs1Af+IStmZY39Ox4y7 F57ZUan/2mAiVwgOkzLf/+ZyHeFrwPr9fKc6Zop2NOWlNAmsw+szA4eAJR4lZM/rHVjc +yL+XtN5EPDPwarA4lSPUZhTGPFMbHE040I5laUOUGFDM7HntZmfvZUV392XCrv2k4tB Bccw== 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=iiV4JMEMqBTVZHkxXccUjnbePzc1Lr7GZ4Ely3PF0kQ=; b=W3T4SfZC7iCVLVSM9vzeWGXccfyk4JJ61Krpjr438TGIhtk3BImz+gArrB988U5f4O faVzyh7XmN4qAXEmY1L/KxEjnY1BzIeAy2N/P51rFUouOgWP8fpj/X/mH/cPSHKEJn0B ctQd3x6c80H/XIbKJKwtp4VKyJdnUiMcf3zHTUXnDVxwLgid8m1hW1DEOsO/vIvuirJd U3NWrGuOehwnmE/vd0u3q4BLOb9jeiNLCEN7XxjDbmwYjuMaA2s23qbQqH+B+d7t3Frw 20r6OIRO73xhdjnHZMPliqge0WchxdpOHHLvamIBhBOsCOKqbv7G9DAMvhtLeNgN6Xfu YQXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id b6si11710878pfd.29.2019.07.30.09.39.09; Tue, 30 Jul 2019 09:39:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1731740AbfG3PIH (ORCPT + 99 others); Tue, 30 Jul 2019 11:08:07 -0400 Received: from mail-io1-f71.google.com ([209.85.166.71]:50425 "EHLO mail-io1-f71.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726602AbfG3PIG (ORCPT ); Tue, 30 Jul 2019 11:08:06 -0400 Received: by mail-io1-f71.google.com with SMTP id m26so71773913ioh.17 for ; Tue, 30 Jul 2019 08:08:06 -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=iiV4JMEMqBTVZHkxXccUjnbePzc1Lr7GZ4Ely3PF0kQ=; b=IY8TkeR9xcIayYqmww2SSCOTEdXP6/mBxvNuHgFk5C8CeTMv5tGf6Itfy5Rnny8kq+ Z9Pe8DvEKkkc3Beo4O5yEaudYLkh6mSyLzep01U3CpimgndMgS7s3+XYyJtMhaRiHeDu V/bHNsBRZ4bWbEEpvPQ7JR8VCHdhXhOXCv2jwaXGDEeMfKFYC2lgk3bQTgWzSgwMWtTm WIq9Z7iOZb5bQPcqjSG4Sc1eufVpUp2kjXQ3LnGQmUgGv2zA/A4PEGqvcO0p6/8tUJdl WfMGHnFwlxnyFvoOib3Di1CVu81DG9b4GTFG5Ob9jhYZLBvm9uz4GVMobnmRzRGYG8a/ fDFw== X-Gm-Message-State: APjAAAVf0aw7tQohS6hHFbVVd1pL+vQQtn4AuvUNRE/WOJfcpyj/3brL sQF2B9RdGfwB2YEsXTqz7KM/KNIu0squR0hyOuuNVzLB8H4B MIME-Version: 1.0 X-Received: by 2002:a6b:b206:: with SMTP id b6mr115926380iof.286.1564499285689; Tue, 30 Jul 2019 08:08:05 -0700 (PDT) Date: Tue, 30 Jul 2019 08:08:05 -0700 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <0000000000002cd2b1058ee760fe@google.com> Subject: memory leak in pty_common_install From: syzbot To: gregkh@linuxfoundation.org, jslaby@suse.com, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8"; format=flowed; delsp=yes Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, syzbot found the following crash on: HEAD commit: 6789f873 Merge tag 'pm-5.3-rc2' of git://git.kernel.org/pu.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1696897c600000 kernel config: https://syzkaller.appspot.com/x/.config?x=339b6a6b3640d115 dashboard link: https://syzkaller.appspot.com/bug?extid=bdebcbf44250d75bdd82 compiler: gcc (GCC) 9.0.0 20181231 (experimental) syz repro: https://syzkaller.appspot.com/x/repro.syz?x=153d7544600000 IMPORTANT: if you fix the bug, please add the following tag to the commit: Reported-by: syzbot+bdebcbf44250d75bdd82@syzkaller.appspotmail.com BUG: memory leak unreferenced object 0xffff88810d84d400 (size 512): comm "syz-executor.5", pid 7522, jiffies 4294954305 (age 14.260s) hex dump (first 32 bytes): 50 d4 84 0d 81 88 ff ff e0 ff ff ff 0f 00 00 00 P............... 10 d4 84 0d 81 88 ff ff 10 d4 84 0d 81 88 ff ff ................ backtrace: [<000000003d61da44>] kmemleak_alloc_recursive include/linux/kmemleak.h:43 [inline] [<000000003d61da44>] slab_post_alloc_hook mm/slab.h:522 [inline] [<000000003d61da44>] slab_alloc mm/slab.c:3319 [inline] [<000000003d61da44>] kmem_cache_alloc_trace+0x145/0x2c0 mm/slab.c:3548 [<00000000a6239e0a>] kmalloc include/linux/slab.h:552 [inline] [<00000000a6239e0a>] pty_common_install+0x4e/0x2b0 drivers/tty/pty.c:391 [<00000000bd8cb19d>] pty_unix98_install+0x20/0x30 drivers/tty/pty.c:740 [<000000001b46b5e1>] tty_driver_install_tty drivers/tty/tty_io.c:1227 [inline] [<000000001b46b5e1>] tty_init_dev drivers/tty/tty_io.c:1340 [inline] [<000000001b46b5e1>] tty_init_dev+0x86/0x210 drivers/tty/tty_io.c:1317 [<00000000845ae712>] ptmx_open drivers/tty/pty.c:845 [inline] [<00000000845ae712>] ptmx_open+0xba/0x1c0 drivers/tty/pty.c:811 [<000000007e87d771>] chrdev_open+0xe3/0x290 fs/char_dev.c:414 [<00000000bd556826>] do_dentry_open+0x199/0x4f0 fs/open.c:797 [<000000001ba9145b>] vfs_open+0x35/0x40 fs/open.c:906 [<00000000c0275eb4>] do_last fs/namei.c:3416 [inline] [<00000000c0275eb4>] path_openat+0x854/0x1cd0 fs/namei.c:3533 [<00000000156ad8b1>] do_filp_open+0xaa/0x130 fs/namei.c:3563 [<00000000074d96c0>] do_sys_open+0x253/0x330 fs/open.c:1089 [<000000009f7fc64a>] __do_sys_openat fs/open.c:1116 [inline] [<000000009f7fc64a>] __se_sys_openat fs/open.c:1110 [inline] [<000000009f7fc64a>] __x64_sys_openat+0x24/0x30 fs/open.c:1110 [<000000005ca4479f>] do_syscall_64+0x76/0x1a0 arch/x86/entry/common.c:296 [<00000000e1f64b0f>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 BUG: memory leak unreferenced object 0xffff88810e639800 (size 1024): comm "syz-executor.5", pid 7522, jiffies 4294954305 (age 14.260s) hex dump (first 32 bytes): 01 54 00 00 01 00 00 00 00 00 00 00 00 00 00 00 .T.............. 00 83 fa 19 82 88 ff ff a0 7f 9b 83 ff ff ff ff ................ backtrace: [<000000003d61da44>] kmemleak_alloc_recursive include/linux/kmemleak.h:43 [inline] [<000000003d61da44>] slab_post_alloc_hook mm/slab.h:522 [inline] [<000000003d61da44>] slab_alloc mm/slab.c:3319 [inline] [<000000003d61da44>] kmem_cache_alloc_trace+0x145/0x2c0 mm/slab.c:3548 [<000000001cfffc30>] kmalloc include/linux/slab.h:552 [inline] [<000000001cfffc30>] kzalloc include/linux/slab.h:748 [inline] [<000000001cfffc30>] alloc_tty_struct+0x3f/0x290 drivers/tty/tty_io.c:2981 [<000000001946a70c>] pty_common_install+0xac/0x2b0 drivers/tty/pty.c:399 [<00000000bd8cb19d>] pty_unix98_install+0x20/0x30 drivers/tty/pty.c:740 [<000000001b46b5e1>] tty_driver_install_tty drivers/tty/tty_io.c:1227 [inline] [<000000001b46b5e1>] tty_init_dev drivers/tty/tty_io.c:1340 [inline] [<000000001b46b5e1>] tty_init_dev+0x86/0x210 drivers/tty/tty_io.c:1317 [<00000000845ae712>] ptmx_open drivers/tty/pty.c:845 [inline] [<00000000845ae712>] ptmx_open+0xba/0x1c0 drivers/tty/pty.c:811 [<000000007e87d771>] chrdev_open+0xe3/0x290 fs/char_dev.c:414 [<00000000bd556826>] do_dentry_open+0x199/0x4f0 fs/open.c:797 [<000000001ba9145b>] vfs_open+0x35/0x40 fs/open.c:906 [<00000000c0275eb4>] do_last fs/namei.c:3416 [inline] [<00000000c0275eb4>] path_openat+0x854/0x1cd0 fs/namei.c:3533 [<00000000156ad8b1>] do_filp_open+0xaa/0x130 fs/namei.c:3563 [<00000000074d96c0>] do_sys_open+0x253/0x330 fs/open.c:1089 [<000000009f7fc64a>] __do_sys_openat fs/open.c:1116 [inline] [<000000009f7fc64a>] __se_sys_openat fs/open.c:1110 [inline] [<000000009f7fc64a>] __x64_sys_openat+0x24/0x30 fs/open.c:1110 [<000000005ca4479f>] do_syscall_64+0x76/0x1a0 arch/x86/entry/common.c:296 [<00000000e1f64b0f>] 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