All of lore.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+6e3e8f30f269f5028e5d@syzkaller.appspotmail.com>
To: gregkh@linuxfoundation.org, jirislaby@kernel.org,
	linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: [syzbot] memory leak in gsmld_ioctl
Date: Mon, 31 Oct 2022 22:39:38 -0700	[thread overview]
Message-ID: <0000000000006686e905ec622691@google.com> (raw)

Hello,

syzbot found the following issue on:

HEAD commit:    b229b6ca5abb Merge tag 'perf-tools-fixes-for-v6.1-2022-10-..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=14f684ee880000
kernel config:  https://syzkaller.appspot.com/x/.config?x=8e0c1dbca40c1f1d
dashboard link: https://syzkaller.appspot.com/bug?extid=6e3e8f30f269f5028e5d
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=12c41d22880000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1357247a880000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/cf67b1049a03/disk-b229b6ca.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/3f2fbf5dbb8c/vmlinux-b229b6ca.xz
kernel image: https://storage.googleapis.com/syzbot-assets/7ff8681ade50/bzImage-b229b6ca.xz

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

BUG: memory leak
unreferenced object 0xffff88810ec09400 (size 1024):
  comm "syz-executor252", pid 3630, jiffies 4294960211 (age 24.300s)
  hex dump (first 32 bytes):
    00 bc c0 0e 81 88 ff ff 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:
    [<ffffffff814cfe70>] kmalloc_trace+0x20/0x90 mm/slab_common.c:1046
    [<ffffffff826196b7>] kmalloc include/linux/slab.h:576 [inline]
    [<ffffffff826196b7>] kzalloc include/linux/slab.h:712 [inline]
    [<ffffffff826196b7>] gsm_dlci_alloc+0x27/0x180 drivers/tty/n_gsm.c:2060
    [<ffffffff8261ea0b>] gsm_activate_mux drivers/tty/n_gsm.c:2534 [inline]
    [<ffffffff8261ea0b>] gsm_config drivers/tty/n_gsm.c:2776 [inline]
    [<ffffffff8261ea0b>] gsmld_ioctl+0x45b/0x750 drivers/tty/n_gsm.c:3113
    [<ffffffff826063f3>] tty_ioctl+0x733/0xbe0 drivers/tty/tty_io.c:2780
    [<ffffffff81602b2c>] vfs_ioctl fs/ioctl.c:51 [inline]
    [<ffffffff81602b2c>] __do_sys_ioctl fs/ioctl.c:870 [inline]
    [<ffffffff81602b2c>] __se_sys_ioctl fs/ioctl.c:856 [inline]
    [<ffffffff81602b2c>] __x64_sys_ioctl+0xfc/0x140 fs/ioctl.c:856
    [<ffffffff84608025>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff84608025>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84800087>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

BUG: memory leak
unreferenced object 0xffff88810ec09400 (size 1024):
  comm "syz-executor252", pid 3630, jiffies 4294960211 (age 25.470s)
  hex dump (first 32 bytes):
    00 bc c0 0e 81 88 ff ff 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:
    [<ffffffff814cfe70>] kmalloc_trace+0x20/0x90 mm/slab_common.c:1046
    [<ffffffff826196b7>] kmalloc include/linux/slab.h:576 [inline]
    [<ffffffff826196b7>] kzalloc include/linux/slab.h:712 [inline]
    [<ffffffff826196b7>] gsm_dlci_alloc+0x27/0x180 drivers/tty/n_gsm.c:2060
    [<ffffffff8261ea0b>] gsm_activate_mux drivers/tty/n_gsm.c:2534 [inline]
    [<ffffffff8261ea0b>] gsm_config drivers/tty/n_gsm.c:2776 [inline]
    [<ffffffff8261ea0b>] gsmld_ioctl+0x45b/0x750 drivers/tty/n_gsm.c:3113
    [<ffffffff826063f3>] tty_ioctl+0x733/0xbe0 drivers/tty/tty_io.c:2780
    [<ffffffff81602b2c>] vfs_ioctl fs/ioctl.c:51 [inline]
    [<ffffffff81602b2c>] __do_sys_ioctl fs/ioctl.c:870 [inline]
    [<ffffffff81602b2c>] __se_sys_ioctl fs/ioctl.c:856 [inline]
    [<ffffffff81602b2c>] __x64_sys_ioctl+0xfc/0x140 fs/ioctl.c:856
    [<ffffffff84608025>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff84608025>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84800087>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

BUG: memory leak
unreferenced object 0xffff88810ec09400 (size 1024):
  comm "syz-executor252", pid 3630, jiffies 4294960211 (age 28.890s)
  hex dump (first 32 bytes):
    00 bc c0 0e 81 88 ff ff 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:
    [<ffffffff814cfe70>] kmalloc_trace+0x20/0x90 mm/slab_common.c:1046
    [<ffffffff826196b7>] kmalloc include/linux/slab.h:576 [inline]
    [<ffffffff826196b7>] kzalloc include/linux/slab.h:712 [inline]
    [<ffffffff826196b7>] gsm_dlci_alloc+0x27/0x180 drivers/tty/n_gsm.c:2060
    [<ffffffff8261ea0b>] gsm_activate_mux drivers/tty/n_gsm.c:2534 [inline]
    [<ffffffff8261ea0b>] gsm_config drivers/tty/n_gsm.c:2776 [inline]
    [<ffffffff8261ea0b>] gsmld_ioctl+0x45b/0x750 drivers/tty/n_gsm.c:3113
    [<ffffffff826063f3>] tty_ioctl+0x733/0xbe0 drivers/tty/tty_io.c:2780
    [<ffffffff81602b2c>] vfs_ioctl fs/ioctl.c:51 [inline]
    [<ffffffff81602b2c>] __do_sys_ioctl fs/ioctl.c:870 [inline]
    [<ffffffff81602b2c>] __se_sys_ioctl fs/ioctl.c:856 [inline]
    [<ffffffff81602b2c>] __x64_sys_ioctl+0xfc/0x140 fs/ioctl.c:856
    [<ffffffff84608025>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff84608025>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84800087>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

BUG: memory leak
unreferenced object 0xffff88810ec09400 (size 1024):
  comm "syz-executor252", pid 3630, jiffies 4294960211 (age 28.920s)
  hex dump (first 32 bytes):
    00 bc c0 0e 81 88 ff ff 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:
    [<ffffffff814cfe70>] kmalloc_trace+0x20/0x90 mm/slab_common.c:1046
    [<ffffffff826196b7>] kmalloc include/linux/slab.h:576 [inline]
    [<ffffffff826196b7>] kzalloc include/linux/slab.h:712 [inline]
    [<ffffffff826196b7>] gsm_dlci_alloc+0x27/0x180 drivers/tty/n_gsm.c:2060
    [<ffffffff8261ea0b>] gsm_activate_mux drivers/tty/n_gsm.c:2534 [inline]
    [<ffffffff8261ea0b>] gsm_config drivers/tty/n_gsm.c:2776 [inline]
    [<ffffffff8261ea0b>] gsmld_ioctl+0x45b/0x750 drivers/tty/n_gsm.c:3113
    [<ffffffff826063f3>] tty_ioctl+0x733/0xbe0 drivers/tty/tty_io.c:2780
    [<ffffffff81602b2c>] vfs_ioctl fs/ioctl.c:51 [inline]
    [<ffffffff81602b2c>] __do_sys_ioctl fs/ioctl.c:870 [inline]
    [<ffffffff81602b2c>] __se_sys_ioctl fs/ioctl.c:856 [inline]
    [<ffffffff81602b2c>] __x64_sys_ioctl+0xfc/0x140 fs/ioctl.c:856
    [<ffffffff84608025>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff84608025>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84800087>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

BUG: memory leak
unreferenced object 0xffff88810ec09400 (size 1024):
  comm "syz-executor252", pid 3630, jiffies 4294960211 (age 28.960s)
  hex dump (first 32 bytes):
    00 bc c0 0e 81 88 ff ff 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:
    [<ffffffff814cfe70>] kmalloc_trace+0x20/0x90 mm/slab_common.c:1046
    [<ffffffff826196b7>] kmalloc include/linux/slab.h:576 [inline]
    [<ffffffff826196b7>] kzalloc include/linux/slab.h:712 [inline]
    [<ffffffff826196b7>] gsm_dlci_alloc+0x27/0x180 drivers/tty/n_gsm.c:2060
    [<ffffffff8261ea0b>] gsm_activate_mux drivers/tty/n_gsm.c:2534 [inline]
    [<ffffffff8261ea0b>] gsm_config drivers/tty/n_gsm.c:2776 [inline]
    [<ffffffff8261ea0b>] gsmld_ioctl+0x45b/0x750 drivers/tty/n_gsm.c:3113
    [<ffffffff826063f3>] tty_ioctl+0x733/0xbe0 drivers/tty/tty_io.c:2780
    [<ffffffff81602b2c>] vfs_ioctl fs/ioctl.c:51 [inline]
    [<ffffffff81602b2c>] __do_sys_ioctl fs/ioctl.c:870 [inline]
    [<ffffffff81602b2c>] __se_sys_ioctl fs/ioctl.c:856 [inline]
    [<ffffffff81602b2c>] __x64_sys_ioctl+0xfc/0x140 fs/ioctl.c:856
    [<ffffffff84608025>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff84608025>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84800087>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

executing program
executing program
executing program


---
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

                 reply	other threads:[~2022-11-01  5:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=0000000000006686e905ec622691@google.com \
    --to=syzbot+6e3e8f30f269f5028e5d@syzkaller.appspotmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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.