public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+03e5c8ebd22cc6c3a8cb@syzkaller.appspotmail.com>
To: axboe@kernel.dk, linux-block@vger.kernel.org,
	linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: memory leak in bio_copy_user_iov
Date: Tue, 18 Jun 2019 15:37:08 -0700	[thread overview]
Message-ID: <000000000000c75fb7058ba0c0e4@google.com> (raw)

Hello,

syzbot found the following crash on:

HEAD commit:    0011572c Merge branch 'for-5.2-fixes' of git://git.kernel...
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=15193256a00000
kernel config:  https://syzkaller.appspot.com/x/.config?x=cb38d33cd06d8d48
dashboard link: https://syzkaller.appspot.com/bug?extid=03e5c8ebd22cc6c3a8cb
compiler:       gcc (GCC) 9.0.0 20181231 (experimental)
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=13244221a00000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=117b2432a00000

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

ram
executing program
BUG: memory leak
unreferenced object 0xffff8881204d7800 (size 2048):
   comm "syz-executor855", pid 6936, jiffies 4294941958 (age 26.780s)
   hex dump (first 32 bytes):
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
     20 00 00 00 02 01 00 00 00 00 00 00 08 00 00 00   ...............
   backtrace:
     [<00000000c5e27070>] kmemleak_alloc_recursive  
include/linux/kmemleak.h:43 [inline]
     [<00000000c5e27070>] slab_post_alloc_hook mm/slab.h:439 [inline]
     [<00000000c5e27070>] slab_alloc mm/slab.c:3326 [inline]
     [<00000000c5e27070>] __do_kmalloc mm/slab.c:3658 [inline]
     [<00000000c5e27070>] __kmalloc+0x161/0x2c0 mm/slab.c:3669
     [<000000004415e750>] kmalloc include/linux/slab.h:552 [inline]
     [<000000004415e750>] bio_alloc_bioset+0x1b8/0x2c0 block/bio.c:439
     [<000000002da58d1d>] bio_kmalloc include/linux/bio.h:391 [inline]
     [<000000002da58d1d>] bio_copy_user_iov+0x113/0x4a0 block/bio.c:1275
     [<00000000b4b23d95>] __blk_rq_map_user_iov block/blk-map.c:67 [inline]
     [<00000000b4b23d95>] blk_rq_map_user_iov+0xc6/0x2b0 block/blk-map.c:136
     [<00000000edad5f7e>] blk_rq_map_user+0x71/0xb0 block/blk-map.c:166
     [<00000000c94723b5>] sg_start_req drivers/scsi/sg.c:1813 [inline]
     [<00000000c94723b5>] sg_common_write.isra.0+0x619/0xa10  
drivers/scsi/sg.c:809
     [<00000000b11f3605>] sg_write.part.0+0x325/0x570 drivers/scsi/sg.c:709
     [<00000000aba41953>] sg_write+0x44/0x64 drivers/scsi/sg.c:617
     [<00000000afecd177>] __vfs_write+0x43/0xa0 fs/read_write.c:494
     [<00000000de690898>] vfs_write fs/read_write.c:558 [inline]
     [<00000000de690898>] vfs_write+0xee/0x210 fs/read_write.c:542
     [<00000000705a35b0>] ksys_write+0x7c/0x130 fs/read_write.c:611
     [<000000009efb9e6c>] __do_sys_write fs/read_write.c:623 [inline]
     [<000000009efb9e6c>] __se_sys_write fs/read_write.c:620 [inline]
     [<000000009efb9e6c>] __x64_sys_write+0x1e/0x30 fs/read_write.c:620
     [<00000000f9e48771>] do_syscall_64+0x76/0x1a0  
arch/x86/entry/common.c:301
     [<00000000d5cff9fc>] 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:[~2019-06-18 22:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-18 22:37 syzbot [this message]
2019-07-29  0:38 ` memory leak in bio_copy_user_iov syzbot
2019-07-29  1:03   ` Bob Liu

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=000000000000c75fb7058ba0c0e4@google.com \
    --to=syzbot+03e5c8ebd22cc6c3a8cb@syzkaller.appspotmail.com \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox