All of lore.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+bdebcbf44250d75bdd82@syzkaller.appspotmail.com>
To: anant.thazhemadam@gmail.com, gregkh@linuxfoundation.org,
	hdanton@sina.com, jirislaby@kernel.org, jslaby@suse.com,
	jslaby@suse.cz, linux-kernel@vger.kernel.org,
	phind.uet@gmail.com, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] memory leak in pty_common_install
Date: Wed, 29 Jun 2022 23:09:22 -0700	[thread overview]
Message-ID: <0000000000005f821205e2a41c4e@google.com> (raw)
In-Reply-To: <0000000000002cd2b1058ee760fe@google.com>

syzbot has found a reproducer for the following issue on:

HEAD commit:    d9b2ba67917c Merge tag 'platform-drivers-x86-v5.19-3' of g..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1795f0f0080000
kernel config:  https://syzkaller.appspot.com/x/.config?x=b6c1840347c4c391
dashboard link: https://syzkaller.appspot.com/bug?extid=bdebcbf44250d75bdd82
compiler:       gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=13d01f90080000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=126f34f0080000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+bdebcbf44250d75bdd82@syzkaller.appspotmail.com

Warning: Permanently added '10.128.1.122' (ECDSA) to the list of known hosts.
executing program
executing program
executing program
BUG: memory leak
unreferenced object 0xffff88810222e600 (size 512):
  comm "syz-executor149", pid 3615, jiffies 4294954919 (age 12.620s)
  hex dump (first 32 bytes):
    50 e6 22 02 81 88 ff ff e0 ff ff ff 0f 00 00 00  P.".............
    10 e6 22 02 81 88 ff ff 10 e6 22 02 81 88 ff ff  ..".......".....
  backtrace:
    [<ffffffff8262ce09>] kmalloc include/linux/slab.h:600 [inline]
    [<ffffffff8262ce09>] pty_common_install+0x59/0x3d0 drivers/tty/pty.c:381
    [<ffffffff8261decb>] tty_driver_install_tty drivers/tty/tty_io.c:1307 [inline]
    [<ffffffff8261decb>] tty_init_dev.part.0+0x5b/0x2f0 drivers/tty/tty_io.c:1419
    [<ffffffff8261e1a0>] tty_init_dev+0x40/0x60 drivers/tty/tty_io.c:1409
    [<ffffffff8262cc29>] ptmx_open drivers/tty/pty.c:834 [inline]
    [<ffffffff8262cc29>] ptmx_open+0xd9/0x210 drivers/tty/pty.c:800
    [<ffffffff815dd68d>] chrdev_open+0x10d/0x340 fs/char_dev.c:414
    [<ffffffff815cbf96>] do_dentry_open+0x1e6/0x660 fs/open.c:848
    [<ffffffff815f26c1>] do_open fs/namei.c:3520 [inline]
    [<ffffffff815f26c1>] path_openat+0x18a1/0x1e70 fs/namei.c:3653
    [<ffffffff815f5391>] do_filp_open+0xc1/0x1b0 fs/namei.c:3680
    [<ffffffff815cf88d>] do_sys_openat2+0xed/0x260 fs/open.c:1278
    [<ffffffff815d02df>] do_sys_open fs/open.c:1294 [inline]
    [<ffffffff815d02df>] __do_sys_openat fs/open.c:1310 [inline]
    [<ffffffff815d02df>] __se_sys_openat fs/open.c:1305 [inline]
    [<ffffffff815d02df>] __x64_sys_openat+0x7f/0xe0 fs/open.c:1305
    [<ffffffff845ac915>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff845ac915>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff8460006a>] entry_SYSCALL_64_after_hwframe+0x46/0xb0

BUG: memory leak
unreferenced object 0xffff88810213d400 (size 1024):
  comm "syz-executor149", pid 3615, jiffies 4294954919 (age 12.620s)
  hex dump (first 32 bytes):
    01 54 00 00 01 00 00 00 00 00 00 00 00 00 00 00  .T..............
    40 be ca 41 81 88 ff ff 60 65 c5 84 ff ff ff ff  @..A....`e......
  backtrace:
    [<ffffffff8261dbbc>] kmalloc include/linux/slab.h:600 [inline]
    [<ffffffff8261dbbc>] kzalloc include/linux/slab.h:733 [inline]
    [<ffffffff8261dbbc>] alloc_tty_struct+0x3c/0x2f0 drivers/tty/tty_io.c:3091
    [<ffffffff8262ce72>] pty_common_install+0xc2/0x3d0 drivers/tty/pty.c:389
    [<ffffffff8261decb>] tty_driver_install_tty drivers/tty/tty_io.c:1307 [inline]
    [<ffffffff8261decb>] tty_init_dev.part.0+0x5b/0x2f0 drivers/tty/tty_io.c:1419
    [<ffffffff8261e1a0>] tty_init_dev+0x40/0x60 drivers/tty/tty_io.c:1409
    [<ffffffff8262cc29>] ptmx_open drivers/tty/pty.c:834 [inline]
    [<ffffffff8262cc29>] ptmx_open+0xd9/0x210 drivers/tty/pty.c:800
    [<ffffffff815dd68d>] chrdev_open+0x10d/0x340 fs/char_dev.c:414
    [<ffffffff815cbf96>] do_dentry_open+0x1e6/0x660 fs/open.c:848
    [<ffffffff815f26c1>] do_open fs/namei.c:3520 [inline]
    [<ffffffff815f26c1>] path_openat+0x18a1/0x1e70 fs/namei.c:3653
    [<ffffffff815f5391>] do_filp_open+0xc1/0x1b0 fs/namei.c:3680
    [<ffffffff815cf88d>] do_sys_openat2+0xed/0x260 fs/open.c:1278
    [<ffffffff815d02df>] do_sys_open fs/open.c:1294 [inline]
    [<ffffffff815d02df>] __do_sys_openat fs/open.c:1310 [inline]
    [<ffffffff815d02df>] __se_sys_openat fs/open.c:1305 [inline]
    [<ffffffff815d02df>] __x64_sys_openat+0x7f/0xe0 fs/open.c:1305
    [<ffffffff845ac915>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff845ac915>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff8460006a>] entry_SYSCALL_64_after_hwframe+0x46/0xb0



      parent reply	other threads:[~2022-06-30  6:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30 15:08 memory leak in pty_common_install syzbot
2019-08-02  6:23 ` Jiri Slaby
2019-08-03 14:22   ` Jiri Slaby
2022-06-30  6:09 ` syzbot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0000000000005f821205e2a41c4e@google.com \
    --to=syzbot+bdebcbf44250d75bdd82@syzkaller.appspotmail.com \
    --cc=anant.thazhemadam@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdanton@sina.com \
    --cc=jirislaby@kernel.org \
    --cc=jslaby@suse.com \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phind.uet@gmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.