All of lore.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+cb729843d0f42a5c1a50@syzkaller.appspotmail.com>
To: axboe@kernel.dk, linux-block@vger.kernel.org,
	linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: [syzbot] [block?] memory leak in iov_iter_extract_pages
Date: Wed, 16 Aug 2023 18:56:02 -0700	[thread overview]
Message-ID: <000000000000e32603060314b623@google.com> (raw)

Hello,

syzbot found the following issue on:

HEAD commit:    ae545c3283dc Merge tag 'gpio-fixes-for-v6.5-rc6' of git://..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=17d1456fa80000
kernel config:  https://syzkaller.appspot.com/x/.config?x=2bf8962e4f7984f4
dashboard link: https://syzkaller.appspot.com/bug?extid=cb729843d0f42a5c1a50
compiler:       gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=143edef7a80000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=16e93037a80000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/ab6a1e819c1f/disk-ae545c32.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/55f3314970f5/vmlinux-ae545c32.xz
kernel image: https://storage.googleapis.com/syzbot-assets/1a27c3b2a812/bzImage-ae545c32.xz

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

Warning: Permanently added '10.128.1.14' (ED25519) to the list of known hosts.
executing program
executing program
executing program
BUG: memory leak
unreferenced object 0xffff888109d2e400 (size 1024):
  comm "syz-executor121", pid 5006, jiffies 4294943225 (age 17.760s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 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:
    [<ffffffff81554bbb>] __do_kmalloc_node mm/slab_common.c:984 [inline]
    [<ffffffff81554bbb>] __kmalloc_node+0x4b/0x150 mm/slab_common.c:992
    [<ffffffff815440f9>] kmalloc_node include/linux/slab.h:602 [inline]
    [<ffffffff815440f9>] kvmalloc_node+0x99/0x170 mm/util.c:604
    [<ffffffff824c52fe>] kvmalloc include/linux/slab.h:720 [inline]
    [<ffffffff824c52fe>] kvmalloc_array include/linux/slab.h:738 [inline]
    [<ffffffff824c52fe>] want_pages_array lib/iov_iter.c:985 [inline]
    [<ffffffff824c52fe>] iov_iter_extract_user_pages lib/iov_iter.c:1765 [inline]
    [<ffffffff824c52fe>] iov_iter_extract_pages+0x1ee/0xa40 lib/iov_iter.c:1831
    [<ffffffff824125a7>] bio_map_user_iov+0x167/0x5d0 block/blk-map.c:297
    [<ffffffff82412df3>] blk_rq_map_user_iov+0x3e3/0xb30 block/blk-map.c:664
    [<ffffffff82413943>] blk_rq_map_user block/blk-map.c:691 [inline]
    [<ffffffff82413943>] blk_rq_map_user_io+0x143/0x160 block/blk-map.c:724
    [<ffffffff82ca0925>] sg_io+0x285/0x510 drivers/scsi/scsi_ioctl.c:456
    [<ffffffff82ca1025>] scsi_cdrom_send_packet+0x1b5/0x480 drivers/scsi/scsi_ioctl.c:820
    [<ffffffff82ca13ba>] scsi_ioctl+0xca/0xd30 drivers/scsi/scsi_ioctl.c:903
    [<ffffffff82d35964>] sg_ioctl+0x5f4/0x10a0 drivers/scsi/sg.c:1163
    [<ffffffff8168e602>] vfs_ioctl fs/ioctl.c:51 [inline]
    [<ffffffff8168e602>] __do_sys_ioctl fs/ioctl.c:870 [inline]
    [<ffffffff8168e602>] __se_sys_ioctl fs/ioctl.c:856 [inline]
    [<ffffffff8168e602>] __x64_sys_ioctl+0xf2/0x140 fs/ioctl.c:856
    [<ffffffff84ad2bb8>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff84ad2bb8>] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

BUG: memory leak
unreferenced object 0xffff888109d2dc00 (size 1024):
  comm "syz-executor121", pid 5007, jiffies 4294943747 (age 12.540s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 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:
    [<ffffffff81554bbb>] __do_kmalloc_node mm/slab_common.c:984 [inline]
    [<ffffffff81554bbb>] __kmalloc_node+0x4b/0x150 mm/slab_common.c:992
    [<ffffffff815440f9>] kmalloc_node include/linux/slab.h:602 [inline]
    [<ffffffff815440f9>] kvmalloc_node+0x99/0x170 mm/util.c:604
    [<ffffffff824c52fe>] kvmalloc include/linux/slab.h:720 [inline]
    [<ffffffff824c52fe>] kvmalloc_array include/linux/slab.h:738 [inline]
    [<ffffffff824c52fe>] want_pages_array lib/iov_iter.c:985 [inline]
    [<ffffffff824c52fe>] iov_iter_extract_user_pages lib/iov_iter.c:1765 [inline]
    [<ffffffff824c52fe>] iov_iter_extract_pages+0x1ee/0xa40 lib/iov_iter.c:1831
    [<ffffffff824125a7>] bio_map_user_iov+0x167/0x5d0 block/blk-map.c:297
    [<ffffffff82412df3>] blk_rq_map_user_iov+0x3e3/0xb30 block/blk-map.c:664
    [<ffffffff82413943>] blk_rq_map_user block/blk-map.c:691 [inline]
    [<ffffffff82413943>] blk_rq_map_user_io+0x143/0x160 block/blk-map.c:724
    [<ffffffff82ca0925>] sg_io+0x285/0x510 drivers/scsi/scsi_ioctl.c:456
    [<ffffffff82ca1025>] scsi_cdrom_send_packet+0x1b5/0x480 drivers/scsi/scsi_ioctl.c:820
    [<ffffffff82ca13ba>] scsi_ioctl+0xca/0xd30 drivers/scsi/scsi_ioctl.c:903
    [<ffffffff82d35964>] sg_ioctl+0x5f4/0x10a0 drivers/scsi/sg.c:1163
    [<ffffffff8168e602>] vfs_ioctl fs/ioctl.c:51 [inline]
    [<ffffffff8168e602>] __do_sys_ioctl fs/ioctl.c:870 [inline]
    [<ffffffff8168e602>] __se_sys_ioctl fs/ioctl.c:856 [inline]
    [<ffffffff8168e602>] __x64_sys_ioctl+0xf2/0x140 fs/ioctl.c:856
    [<ffffffff84ad2bb8>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff84ad2bb8>] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

BUG: memory leak
unreferenced object 0xffff888109d2d800 (size 1024):
  comm "syz-executor121", pid 5010, jiffies 4294944269 (age 7.320s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 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:
    [<ffffffff81554bbb>] __do_kmalloc_node mm/slab_common.c:984 [inline]
    [<ffffffff81554bbb>] __kmalloc_node+0x4b/0x150 mm/slab_common.c:992
    [<ffffffff815440f9>] kmalloc_node include/linux/slab.h:602 [inline]
    [<ffffffff815440f9>] kvmalloc_node+0x99/0x170 mm/util.c:604
    [<ffffffff824c52fe>] kvmalloc include/linux/slab.h:720 [inline]
    [<ffffffff824c52fe>] kvmalloc_array include/linux/slab.h:738 [inline]
    [<ffffffff824c52fe>] want_pages_array lib/iov_iter.c:985 [inline]
    [<ffffffff824c52fe>] iov_iter_extract_user_pages lib/iov_iter.c:1765 [inline]
    [<ffffffff824c52fe>] iov_iter_extract_pages+0x1ee/0xa40 lib/iov_iter.c:1831
    [<ffffffff824125a7>] bio_map_user_iov+0x167/0x5d0 block/blk-map.c:297
    [<ffffffff82412df3>] blk_rq_map_user_iov+0x3e3/0xb30 block/blk-map.c:664
    [<ffffffff82413943>] blk_rq_map_user block/blk-map.c:691 [inline]
    [<ffffffff82413943>] blk_rq_map_user_io+0x143/0x160 block/blk-map.c:724
    [<ffffffff82ca0925>] sg_io+0x285/0x510 drivers/scsi/scsi_ioctl.c:456
    [<ffffffff82ca1025>] scsi_cdrom_send_packet+0x1b5/0x480 drivers/scsi/scsi_ioctl.c:820
    [<ffffffff82ca13ba>] scsi_ioctl+0xca/0xd30 drivers/scsi/scsi_ioctl.c:903
    [<ffffffff82d35964>] sg_ioctl+0x5f4/0x10a0 drivers/scsi/sg.c:1163
    [<ffffffff8168e602>] vfs_ioctl fs/ioctl.c:51 [inline]
    [<ffffffff8168e602>] __do_sys_ioctl fs/ioctl.c:870 [inline]
    [<ffffffff8168e602>] __se_sys_ioctl fs/ioctl.c:856 [inline]
    [<ffffffff8168e602>] __x64_sys_ioctl+0xf2/0x140 fs/ioctl.c:856
    [<ffffffff84ad2bb8>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff84ad2bb8>] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0xcd



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

If the bug is already fixed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the bug is a duplicate of another bug, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

             reply	other threads:[~2023-08-17  1:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-17  1:56 syzbot [this message]
2023-11-11  7:14 ` [syzbot] syz-test syzbot
     [not found] <c124498e96926ac872888f6aba09f9b9@foxhound.fi>
2023-11-11  7:41 ` [syzbot] [block?] memory leak in iov_iter_extract_pages syzbot

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=000000000000e32603060314b623@google.com \
    --to=syzbot+cb729843d0f42a5c1a50@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 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.