mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: syzbot <syzbot+934037347002901b8d2a@syzkaller.appspotmail.com>
To: axboe@kernel.dk, josef@toxicpanda.com,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	nbd@other.debian.org, syzkaller-bugs@googlegroups.com
Subject: memory leak in nbd_add_socket
Date: Tue, 31 Mar 2020 10:11:15 -0700	[thread overview]
Message-ID: <000000000000c7a80905a229a785@google.com> (raw)

Hello,

syzbot found the following crash on:

HEAD commit:    673b41e0 staging/octeon: fix up merge error
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=15badadbe00000
kernel config:  https://syzkaller.appspot.com/x/.config?x=d97026d04c648459
dashboard link: https://syzkaller.appspot.com/bug?extid=934037347002901b8d2a
compiler:       gcc (GCC) 9.0.0 20181231 (experimental)
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=12dbb747e00000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=14421b9de00000

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

BUG: memory leak
unreferenced object 0xffff88810fd584a0 (size 32):
  comm "syz-executor586", pid 8424, jiffies 4294961663 (age 40.060s)
  hex dump (first 32 bytes):
    2f 64 65 76 2f 6e 62 64 30 00 00 00 00 00 00 00  /dev/nbd0.......
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<0000000090cb73c8>] __do_krealloc mm/slab_common.c:1671 [inline]
    [<0000000090cb73c8>] krealloc+0x7c/0xa0 mm/slab_common.c:1700
    [<00000000cf9e6ba7>] nbd_add_socket+0x7d/0x1e0 drivers/block/nbd.c:1040
    [<0000000040a0a881>] __nbd_ioctl drivers/block/nbd.c:1373 [inline]
    [<0000000040a0a881>] nbd_ioctl+0x175/0x430 drivers/block/nbd.c:1437
    [<000000004972a55a>] __blkdev_driver_ioctl block/ioctl.c:322 [inline]
    [<000000004972a55a>] blkdev_ioctl+0x147/0x300 block/ioctl.c:718
    [<000000008903d911>] block_ioctl+0x50/0x70 fs/block_dev.c:1995
    [<00000000c37950d9>] vfs_ioctl fs/ioctl.c:47 [inline]
    [<00000000c37950d9>] ksys_ioctl+0xa6/0xd0 fs/ioctl.c:763
    [<00000000ffe4bbdc>] __do_sys_ioctl fs/ioctl.c:772 [inline]
    [<00000000ffe4bbdc>] __se_sys_ioctl fs/ioctl.c:770 [inline]
    [<00000000ffe4bbdc>] __x64_sys_ioctl+0x1a/0x20 fs/ioctl.c:770
    [<00000000ede38b98>] do_syscall_64+0x6e/0x220 arch/x86/entry/common.c:294
    [<00000000553f73d5>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

BUG: memory leak
unreferenced object 0xffff88810fd584a0 (size 32):
  comm "syz-executor586", pid 8424, jiffies 4294961663 (age 40.170s)
  hex dump (first 32 bytes):
    2f 64 65 76 2f 6e 62 64 30 00 00 00 00 00 00 00  /dev/nbd0.......
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<0000000090cb73c8>] __do_krealloc mm/slab_common.c:1671 [inline]
    [<0000000090cb73c8>] krealloc+0x7c/0xa0 mm/slab_common.c:1700
    [<00000000cf9e6ba7>] nbd_add_socket+0x7d/0x1e0 drivers/block/nbd.c:1040
    [<0000000040a0a881>] __nbd_ioctl drivers/block/nbd.c:1373 [inline]
    [<0000000040a0a881>] nbd_ioctl+0x175/0x430 drivers/block/nbd.c:1437
    [<000000004972a55a>] __blkdev_driver_ioctl block/ioctl.c:322 [inline]
    [<000000004972a55a>] blkdev_ioctl+0x147/0x300 block/ioctl.c:718
    [<000000008903d911>] block_ioctl+0x50/0x70 fs/block_dev.c:1995
    [<00000000c37950d9>] vfs_ioctl fs/ioctl.c:47 [inline]
    [<00000000c37950d9>] ksys_ioctl+0xa6/0xd0 fs/ioctl.c:763
    [<00000000ffe4bbdc>] __do_sys_ioctl fs/ioctl.c:772 [inline]
    [<00000000ffe4bbdc>] __se_sys_ioctl fs/ioctl.c:770 [inline]
    [<00000000ffe4bbdc>] __x64_sys_ioctl+0x1a/0x20 fs/ioctl.c:770
    [<00000000ede38b98>] do_syscall_64+0x6e/0x220 arch/x86/entry/common.c:294
    [<00000000553f73d5>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

BUG: memory leak
unreferenced object 0xffff88810fd584a0 (size 32):
  comm "syz-executor586", pid 8424, jiffies 4294961663 (age 40.270s)
  hex dump (first 32 bytes):
    2f 64 65 76 2f 6e 62 64 30 00 00 00 00 00 00 00  /dev/nbd0.......
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<0000000090cb73c8>] __do_krealloc mm/slab_common.c:1671 [inline]
    [<0000000090cb73c8>] krealloc+0x7c/0xa0 mm/slab_common.c:1700
    [<00000000cf9e6ba7>] nbd_add_socket+0x7d/0x1e0 drivers/block/nbd.c:1040
    [<0000000040a0a881>] __nbd_ioctl drivers/block/nbd.c:1373 [inline]
    [<0000000040a0a881>] nbd_ioctl+0x175/0x430 drivers/block/nbd.c:1437
    [<000000004972a55a>] __blkdev_driver_ioctl block/ioctl.c:322 [inline]
    [<000000004972a55a>] blkdev_ioctl+0x147/0x300 block/ioctl.c:718
    [<000000008903d911>] block_ioctl+0x50/0x70 fs/block_dev.c:1995
    [<00000000c37950d9>] vfs_ioctl fs/ioctl.c:47 [inline]
    [<00000000c37950d9>] ksys_ioctl+0xa6/0xd0 fs/ioctl.c:763
    [<00000000ffe4bbdc>] __do_sys_ioctl fs/ioctl.c:772 [inline]
    [<00000000ffe4bbdc>] __se_sys_ioctl fs/ioctl.c:770 [inline]
    [<00000000ffe4bbdc>] __x64_sys_ioctl+0x1a/0x20 fs/ioctl.c:770
    [<00000000ede38b98>] do_syscall_64+0x6e/0x220 arch/x86/entry/common.c:294
    [<00000000553f73d5>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

BUG: memory leak
unreferenced object 0xffff88810fd584a0 (size 32):
  comm "syz-executor586", pid 8424, jiffies 4294961663 (age 40.380s)
  hex dump (first 32 bytes):
    2f 64 65 76 2f 6e 62 64 30 00 00 00 00 00 00 00  /dev/nbd0.......
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<0000000090cb73c8>] __do_krealloc mm/slab_common.c:1671 [inline]
    [<0000000090cb73c8>] krealloc+0x7c/0xa0 mm/slab_common.c:1700
    [<00000000cf9e6ba7>] nbd_add_socket+0x7d/0x1e0 drivers/block/nbd.c:1040
    [<0000000040a0a881>] __nbd_ioctl drivers/block/nbd.c:1373 [inline]
    [<0000000040a0a881>] nbd_ioctl+0x175/0x430 drivers/block/nbd.c:1437
    [<000000004972a55a>] __blkdev_driver_ioctl block/ioctl.c:322 [inline]
    [<000000004972a55a>] blkdev_ioctl+0x147/0x300 block/ioctl.c:718
    [<000000008903d911>] block_ioctl+0x50/0x70 fs/block_dev.c:1995
    [<00000000c37950d9>] vfs_ioctl fs/ioctl.c:47 [inline]
    [<00000000c37950d9>] ksys_ioctl+0xa6/0xd0 fs/ioctl.c:763
    [<00000000ffe4bbdc>] __do_sys_ioctl fs/ioctl.c:772 [inline]
    [<00000000ffe4bbdc>] __se_sys_ioctl fs/ioctl.c:770 [inline]
    [<00000000ffe4bbdc>] __x64_sys_ioctl+0x1a/0x20 fs/ioctl.c:770
    [<00000000ede38b98>] do_syscall_64+0x6e/0x220 arch/x86/entry/common.c:294
    [<00000000553f73d5>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

BUG: memory leak
unreferenced object 0xffff88810fd584a0 (size 32):
  comm "syz-executor586", pid 8424, jiffies 4294961663 (age 40.480s)
  hex dump (first 32 bytes):
    2f 64 65 76 2f 6e 62 64 30 00 00 00 00 00 00 00  /dev/nbd0.......
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<0000000090cb73c8>] __do_krealloc mm/slab_common.c:1671 [inline]
    [<0000000090cb73c8>] krealloc+0x7c/0xa0 mm/slab_common.c:1700
    [<00000000cf9e6ba7>] nbd_add_socket+0x7d/0x1e0 drivers/block/nbd.c:1040
    [<0000000040a0a881>] __nbd_ioctl drivers/block/nbd.c:1373 [inline]
    [<0000000040a0a881>] nbd_ioctl+0x175/0x430 drivers/block/nbd.c:1437
    [<000000004972a55a>] __blkdev_driver_ioctl block/ioctl.c:322 [inline]
    [<000000004972a55a>] blkdev_ioctl+0x147/0x300 block/ioctl.c:718
    [<000000008903d911>] block_ioctl+0x50/0x70 fs/block_dev.c:1995
    [<00000000c37950d9>] vfs_ioctl fs/ioctl.c:47 [inline]
    [<00000000c37950d9>] ksys_ioctl+0xa6/0xd0 fs/ioctl.c:763
    [<00000000ffe4bbdc>] __do_sys_ioctl fs/ioctl.c:772 [inline]
    [<00000000ffe4bbdc>] __se_sys_ioctl fs/ioctl.c:770 [inline]
    [<00000000ffe4bbdc>] __x64_sys_ioctl+0x1a/0x20 fs/ioctl.c:770
    [<00000000ede38b98>] do_syscall_64+0x6e/0x220 arch/x86/entry/common.c:294
    [<00000000553f73d5>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

BUG: memory leak
unreferenced object 0xffff88810fd584a0 (size 32):
  comm "syz-executor586", pid 8424, jiffies 4294961663 (age 40.590s)
  hex dump (first 32 bytes):
    2f 64 65 76 2f 6e 62 64 30 00 00 00 00 00 00 00  /dev/nbd0.......
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<0000000090cb73c8>] __do_krealloc mm/slab_common.c:1671 [inline]
    [<0000000090cb73c8>] krealloc+0x7c/0xa0 mm/slab_common.c:1700
    [<00000000cf9e6ba7>] nbd_add_socket+0x7d/0x1e0 drivers/block/nbd.c:1040
    [<0000000040a0a881>] __nbd_ioctl drivers/block/nbd.c:1373 [inline]
    [<0000000040a0a881>] nbd_ioctl+0x175/0x430 drivers/block/nbd.c:1437
    [<000000004972a55a>] __blkdev_driver_ioctl block/ioctl.c:322 [inline]
    [<000000004972a55a>] blkdev_ioctl+0x147/0x300 block/ioctl.c:718
    [<000000008903d911>] block_ioctl+0x50/0x70 fs/block_dev.c:1995
    [<00000000c37950d9>] vfs_ioctl fs/ioctl.c:47 [inline]
    [<00000000c37950d9>] ksys_ioctl+0xa6/0xd0 fs/ioctl.c:763
    [<00000000ffe4bbdc>] __do_sys_ioctl fs/ioctl.c:772 [inline]
    [<00000000ffe4bbdc>] __se_sys_ioctl fs/ioctl.c:770 [inline]
    [<00000000ffe4bbdc>] __x64_sys_ioctl+0x1a/0x20 fs/ioctl.c:770
    [<00000000ede38b98>] do_syscall_64+0x6e/0x220 arch/x86/entry/common.c:294
    [<00000000553f73d5>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

BUG: memory leak
unreferenced object 0xffff88810fd584a0 (size 32):
  comm "syz-executor586", pid 8424, jiffies 4294961663 (age 40.690s)
  hex dump (first 32 bytes):
    2f 64 65 76 2f 6e 62 64 30 00 00 00 00 00 00 00  /dev/nbd0.......
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<0000000090cb73c8>] __do_krealloc mm/slab_common.c:1671 [inline]
    [<0000000090cb73c8>] krealloc+0x7c/0xa0 mm/slab_common.c:1700
    [<00000000cf9e6ba7>] nbd_add_socket+0x7d/0x1e0 drivers/block/nbd.c:1040
    [<0000000040a0a881>] __nbd_ioctl drivers/block/nbd.c:1373 [inline]
    [<0000000040a0a881>] nbd_ioctl+0x175/0x430 drivers/block/nbd.c:1437
    [<000000004972a55a>] __blkdev_driver_ioctl block/ioctl.c:322 [inline]
    [<000000004972a55a>] blkdev_ioctl+0x147/0x300 block/ioctl.c:718
    [<000000008903d911>] block_ioctl+0x50/0x70 fs/block_dev.c:1995
    [<00000000c37950d9>] vfs_ioctl fs/ioctl.c:47 [inline]
    [<00000000c37950d9>] ksys_ioctl+0xa6/0xd0 fs/ioctl.c:763
    [<00000000ffe4bbdc>] __do_sys_ioctl fs/ioctl.c:772 [inline]
    [<00000000ffe4bbdc>] __se_sys_ioctl fs/ioctl.c:770 [inline]
    [<00000000ffe4bbdc>] __x64_sys_ioctl+0x1a/0x20 fs/ioctl.c:770
    [<00000000ede38b98>] do_syscall_64+0x6e/0x220 arch/x86/entry/common.c:294
    [<00000000553f73d5>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

BUG: memory leak
unreferenced object 0xffff88810fd584a0 (size 32):
  comm "syz-executor586", pid 8424, jiffies 4294961663 (age 40.800s)
  hex dump (first 32 bytes):
    2f 64 65 76 2f 6e 62 64 30 00 00 00 00 00 00 00  /dev/nbd0.......
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<0000000090cb73c8>] __do_krealloc mm/slab_common.c:1671 [inline]
    [<0000000090cb73c8>] krealloc+0x7c/0xa0 mm/slab_common.c:1700
    [<00000000cf9e6ba7>] nbd_add_socket+0x7d/0x1e0 drivers/block/nbd.c:1040
    [<0000000040a0a881>] __nbd_ioctl drivers/block/nbd.c:1373 [inline]
    [<0000000040a0a881>] nbd_ioctl+0x175/0x430 drivers/block/nbd.c:1437
    [<000000004972a55a>] __blkdev_driver_ioctl block/ioctl.c:322 [inline]
    [<000000004972a55a>] blkdev_ioctl+0x147/0x300 block/ioctl.c:718
    [<000000008903d911>] block_ioctl+0x50/0x70 fs/block_dev.c:1995
    [<00000000c37950d9>] vfs_ioctl fs/ioctl.c:47 [inline]
    [<00000000c37950d9>] ksys_ioctl+0xa6/0xd0 fs/ioctl.c:763
    [<00000000ffe4bbdc>] __do_sys_ioctl fs/ioctl.c:772 [inline]
    [<00000000ffe4bbdc>] __se_sys_ioctl fs/ioctl.c:770 [inline]
    [<00000000ffe4bbdc>] __x64_sys_ioctl+0x1a/0x20 fs/ioctl.c:770
    [<00000000ede38b98>] do_syscall_64+0x6e/0x220 arch/x86/entry/common.c:294
    [<00000000553f73d5>] 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

                 reply	other threads:[~2020-03-31 17:11 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=000000000000c7a80905a229a785@google.com \
    --to=syzbot+934037347002901b8d2a@syzkaller.appspotmail.com \
    --cc=axboe@kernel.dk \
    --cc=josef@toxicpanda.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nbd@other.debian.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®