All of lore.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+f317896aae32eb281a58@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
	 miquel.raynal@bootlin.com, richard@nod.at,
	syzkaller-bugs@googlegroups.com,  vigneshr@ti.com
Subject: Re: memory leak in erase_aeb
Date: Sat, 11 Jan 2020 09:19:09 -0800	[thread overview]
Message-ID: <000000000000b4acb6059be070c0@google.com> (raw)
In-Reply-To: <0000000000006d0a820599366088@google.com>

syzbot has found a reproducer for the following crash on:

HEAD commit:    bef1d882 Merge tag 'pstore-v5.5-rc6' of git://git.kernel.o..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=158a51b9e00000
kernel config:  https://syzkaller.appspot.com/x/.config?x=e479cb92d5ce3196
dashboard link: https://syzkaller.appspot.com/bug?extid=f317896aae32eb281a58
compiler:       gcc (GCC) 9.0.0 20181231 (experimental)
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=132269e1e00000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1247d58ee00000

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

BUG: memory leak
unreferenced object 0xffff888127cecb00 (size 32):
   comm "syz-executor527", pid 7144, jiffies 4294957528 (age 23.750s)
   hex dump (first 32 bytes):
     00 01 00 00 00 00 ad de 22 01 00 00 00 00 ad de  ........".......
     00 00 00 00 00 00 00 00 01 00 00 00 02 00 00 00  ................
   backtrace:
     [<0000000029f9ef6c>] kmemleak_alloc_recursive  
include/linux/kmemleak.h:43 [inline]
     [<0000000029f9ef6c>] slab_post_alloc_hook mm/slab.h:586 [inline]
     [<0000000029f9ef6c>] slab_alloc mm/slab.c:3320 [inline]
     [<0000000029f9ef6c>] kmem_cache_alloc+0x13f/0x2c0 mm/slab.c:3484
     [<000000003092c936>] erase_aeb+0x2a/0x100 drivers/mtd/ubi/wl.c:1691
     [<00000000d507b66e>] ubi_wl_init+0x1ae/0x600 drivers/mtd/ubi/wl.c:1758
     [<0000000072e7d762>] ubi_attach+0x665/0x18e7  
drivers/mtd/ubi/attach.c:1605
     [<0000000024d645cb>] ubi_attach_mtd_dev+0x5b3/0xd40  
drivers/mtd/ubi/build.c:946
     [<00000000e6600cef>] ctrl_cdev_ioctl+0x149/0x1c0  
drivers/mtd/ubi/cdev.c:1043
     [<000000001253992f>] vfs_ioctl fs/ioctl.c:47 [inline]
     [<000000001253992f>] file_ioctl fs/ioctl.c:545 [inline]
     [<000000001253992f>] do_vfs_ioctl+0x551/0x890 fs/ioctl.c:732
     [<00000000c49e8c94>] ksys_ioctl+0x86/0xb0 fs/ioctl.c:749
     [<00000000261db07c>] __do_sys_ioctl fs/ioctl.c:756 [inline]
     [<00000000261db07c>] __se_sys_ioctl fs/ioctl.c:754 [inline]
     [<00000000261db07c>] __x64_sys_ioctl+0x1e/0x30 fs/ioctl.c:754
     [<000000004f01dc3e>] do_syscall_64+0x73/0x220  
arch/x86/entry/common.c:294
     [<000000002de81d29>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

BUG: memory leak
unreferenced object 0xffff888127cecb00 (size 32):
   comm "syz-executor527", pid 7144, jiffies 4294957528 (age 26.350s)
   hex dump (first 32 bytes):
     00 01 00 00 00 00 ad de 22 01 00 00 00 00 ad de  ........".......
     00 00 00 00 00 00 00 00 01 00 00 00 02 00 00 00  ................
   backtrace:
     [<0000000029f9ef6c>] kmemleak_alloc_recursive  
include/linux/kmemleak.h:43 [inline]
     [<0000000029f9ef6c>] slab_post_alloc_hook mm/slab.h:586 [inline]
     [<0000000029f9ef6c>] slab_alloc mm/slab.c:3320 [inline]
     [<0000000029f9ef6c>] kmem_cache_alloc+0x13f/0x2c0 mm/slab.c:3484
     [<000000003092c936>] erase_aeb+0x2a/0x100 drivers/mtd/ubi/wl.c:1691
     [<00000000d507b66e>] ubi_wl_init+0x1ae/0x600 drivers/mtd/ubi/wl.c:1758
     [<0000000072e7d762>] ubi_attach+0x665/0x18e7  
drivers/mtd/ubi/attach.c:1605
     [<0000000024d645cb>] ubi_attach_mtd_dev+0x5b3/0xd40  
drivers/mtd/ubi/build.c:946
     [<00000000e6600cef>] ctrl_cdev_ioctl+0x149/0x1c0  
drivers/mtd/ubi/cdev.c:1043
     [<000000001253992f>] vfs_ioctl fs/ioctl.c:47 [inline]
     [<000000001253992f>] file_ioctl fs/ioctl.c:545 [inline]
     [<000000001253992f>] do_vfs_ioctl+0x551/0x890 fs/ioctl.c:732
     [<00000000c49e8c94>] ksys_ioctl+0x86/0xb0 fs/ioctl.c:749
     [<00000000261db07c>] __do_sys_ioctl fs/ioctl.c:756 [inline]
     [<00000000261db07c>] __se_sys_ioctl fs/ioctl.c:754 [inline]
     [<00000000261db07c>] __x64_sys_ioctl+0x1e/0x30 fs/ioctl.c:754
     [<000000004f01dc3e>] do_syscall_64+0x73/0x220  
arch/x86/entry/common.c:294
     [<000000002de81d29>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

BUG: memory leak
unreferenced object 0xffff888127cecb00 (size 32):
   comm "syz-executor527", pid 7144, jiffies 4294957528 (age 32.820s)
   hex dump (first 32 bytes):
     00 01 00 00 00 00 ad de 22 01 00 00 00 00 ad de  ........".......
     00 00 00 00 00 00 00 00 01 00 00 00 02 00 00 00  ................
   backtrace:
     [<0000000029f9ef6c>] kmemleak_alloc_recursive  
include/linux/kmemleak.h:43 [inline]
     [<0000000029f9ef6c>] slab_post_alloc_hook mm/slab.h:586 [inline]
     [<0000000029f9ef6c>] slab_alloc mm/slab.c:3320 [inline]
     [<0000000029f9ef6c>] kmem_cache_alloc+0x13f/0x2c0 mm/slab.c:3484
     [<000000003092c936>] erase_aeb+0x2a/0x100 drivers/mtd/ubi/wl.c:1691
     [<00000000d507b66e>] ubi_wl_init+0x1ae/0x600 drivers/mtd/ubi/wl.c:1758
     [<0000000072e7d762>] ubi_attach+0x665/0x18e7  
drivers/mtd/ubi/attach.c:1605
     [<0000000024d645cb>] ubi_attach_mtd_dev+0x5b3/0xd40  
drivers/mtd/ubi/build.c:946
     [<00000000e6600cef>] ctrl_cdev_ioctl+0x149/0x1c0  
drivers/mtd/ubi/cdev.c:1043
     [<000000001253992f>] vfs_ioctl fs/ioctl.c:47 [inline]
     [<000000001253992f>] file_ioctl fs/ioctl.c:545 [inline]
     [<000000001253992f>] do_vfs_ioctl+0x551/0x890 fs/ioctl.c:732
     [<00000000c49e8c94>] ksys_ioctl+0x86/0xb0 fs/ioctl.c:749
     [<00000000261db07c>] __do_sys_ioctl fs/ioctl.c:756 [inline]
     [<00000000261db07c>] __se_sys_ioctl fs/ioctl.c:754 [inline]
     [<00000000261db07c>] __x64_sys_ioctl+0x1e/0x30 fs/ioctl.c:754
     [<000000004f01dc3e>] do_syscall_64+0x73/0x220  
arch/x86/entry/common.c:294
     [<000000002de81d29>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

executing program
executing program
executing program
executing program
executing program


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

WARNING: multiple messages have this Message-ID (diff)
From: syzbot <syzbot+f317896aae32eb281a58@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
	miquel.raynal@bootlin.com, richard@nod.at,
	syzkaller-bugs@googlegroups.com, vigneshr@ti.com
Subject: Re: memory leak in erase_aeb
Date: Sat, 11 Jan 2020 09:19:09 -0800	[thread overview]
Message-ID: <000000000000b4acb6059be070c0@google.com> (raw)
In-Reply-To: <0000000000006d0a820599366088@google.com>

syzbot has found a reproducer for the following crash on:

HEAD commit:    bef1d882 Merge tag 'pstore-v5.5-rc6' of git://git.kernel.o..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=158a51b9e00000
kernel config:  https://syzkaller.appspot.com/x/.config?x=e479cb92d5ce3196
dashboard link: https://syzkaller.appspot.com/bug?extid=f317896aae32eb281a58
compiler:       gcc (GCC) 9.0.0 20181231 (experimental)
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=132269e1e00000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1247d58ee00000

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

BUG: memory leak
unreferenced object 0xffff888127cecb00 (size 32):
   comm "syz-executor527", pid 7144, jiffies 4294957528 (age 23.750s)
   hex dump (first 32 bytes):
     00 01 00 00 00 00 ad de 22 01 00 00 00 00 ad de  ........".......
     00 00 00 00 00 00 00 00 01 00 00 00 02 00 00 00  ................
   backtrace:
     [<0000000029f9ef6c>] kmemleak_alloc_recursive  
include/linux/kmemleak.h:43 [inline]
     [<0000000029f9ef6c>] slab_post_alloc_hook mm/slab.h:586 [inline]
     [<0000000029f9ef6c>] slab_alloc mm/slab.c:3320 [inline]
     [<0000000029f9ef6c>] kmem_cache_alloc+0x13f/0x2c0 mm/slab.c:3484
     [<000000003092c936>] erase_aeb+0x2a/0x100 drivers/mtd/ubi/wl.c:1691
     [<00000000d507b66e>] ubi_wl_init+0x1ae/0x600 drivers/mtd/ubi/wl.c:1758
     [<0000000072e7d762>] ubi_attach+0x665/0x18e7  
drivers/mtd/ubi/attach.c:1605
     [<0000000024d645cb>] ubi_attach_mtd_dev+0x5b3/0xd40  
drivers/mtd/ubi/build.c:946
     [<00000000e6600cef>] ctrl_cdev_ioctl+0x149/0x1c0  
drivers/mtd/ubi/cdev.c:1043
     [<000000001253992f>] vfs_ioctl fs/ioctl.c:47 [inline]
     [<000000001253992f>] file_ioctl fs/ioctl.c:545 [inline]
     [<000000001253992f>] do_vfs_ioctl+0x551/0x890 fs/ioctl.c:732
     [<00000000c49e8c94>] ksys_ioctl+0x86/0xb0 fs/ioctl.c:749
     [<00000000261db07c>] __do_sys_ioctl fs/ioctl.c:756 [inline]
     [<00000000261db07c>] __se_sys_ioctl fs/ioctl.c:754 [inline]
     [<00000000261db07c>] __x64_sys_ioctl+0x1e/0x30 fs/ioctl.c:754
     [<000000004f01dc3e>] do_syscall_64+0x73/0x220  
arch/x86/entry/common.c:294
     [<000000002de81d29>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

BUG: memory leak
unreferenced object 0xffff888127cecb00 (size 32):
   comm "syz-executor527", pid 7144, jiffies 4294957528 (age 26.350s)
   hex dump (first 32 bytes):
     00 01 00 00 00 00 ad de 22 01 00 00 00 00 ad de  ........".......
     00 00 00 00 00 00 00 00 01 00 00 00 02 00 00 00  ................
   backtrace:
     [<0000000029f9ef6c>] kmemleak_alloc_recursive  
include/linux/kmemleak.h:43 [inline]
     [<0000000029f9ef6c>] slab_post_alloc_hook mm/slab.h:586 [inline]
     [<0000000029f9ef6c>] slab_alloc mm/slab.c:3320 [inline]
     [<0000000029f9ef6c>] kmem_cache_alloc+0x13f/0x2c0 mm/slab.c:3484
     [<000000003092c936>] erase_aeb+0x2a/0x100 drivers/mtd/ubi/wl.c:1691
     [<00000000d507b66e>] ubi_wl_init+0x1ae/0x600 drivers/mtd/ubi/wl.c:1758
     [<0000000072e7d762>] ubi_attach+0x665/0x18e7  
drivers/mtd/ubi/attach.c:1605
     [<0000000024d645cb>] ubi_attach_mtd_dev+0x5b3/0xd40  
drivers/mtd/ubi/build.c:946
     [<00000000e6600cef>] ctrl_cdev_ioctl+0x149/0x1c0  
drivers/mtd/ubi/cdev.c:1043
     [<000000001253992f>] vfs_ioctl fs/ioctl.c:47 [inline]
     [<000000001253992f>] file_ioctl fs/ioctl.c:545 [inline]
     [<000000001253992f>] do_vfs_ioctl+0x551/0x890 fs/ioctl.c:732
     [<00000000c49e8c94>] ksys_ioctl+0x86/0xb0 fs/ioctl.c:749
     [<00000000261db07c>] __do_sys_ioctl fs/ioctl.c:756 [inline]
     [<00000000261db07c>] __se_sys_ioctl fs/ioctl.c:754 [inline]
     [<00000000261db07c>] __x64_sys_ioctl+0x1e/0x30 fs/ioctl.c:754
     [<000000004f01dc3e>] do_syscall_64+0x73/0x220  
arch/x86/entry/common.c:294
     [<000000002de81d29>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

BUG: memory leak
unreferenced object 0xffff888127cecb00 (size 32):
   comm "syz-executor527", pid 7144, jiffies 4294957528 (age 32.820s)
   hex dump (first 32 bytes):
     00 01 00 00 00 00 ad de 22 01 00 00 00 00 ad de  ........".......
     00 00 00 00 00 00 00 00 01 00 00 00 02 00 00 00  ................
   backtrace:
     [<0000000029f9ef6c>] kmemleak_alloc_recursive  
include/linux/kmemleak.h:43 [inline]
     [<0000000029f9ef6c>] slab_post_alloc_hook mm/slab.h:586 [inline]
     [<0000000029f9ef6c>] slab_alloc mm/slab.c:3320 [inline]
     [<0000000029f9ef6c>] kmem_cache_alloc+0x13f/0x2c0 mm/slab.c:3484
     [<000000003092c936>] erase_aeb+0x2a/0x100 drivers/mtd/ubi/wl.c:1691
     [<00000000d507b66e>] ubi_wl_init+0x1ae/0x600 drivers/mtd/ubi/wl.c:1758
     [<0000000072e7d762>] ubi_attach+0x665/0x18e7  
drivers/mtd/ubi/attach.c:1605
     [<0000000024d645cb>] ubi_attach_mtd_dev+0x5b3/0xd40  
drivers/mtd/ubi/build.c:946
     [<00000000e6600cef>] ctrl_cdev_ioctl+0x149/0x1c0  
drivers/mtd/ubi/cdev.c:1043
     [<000000001253992f>] vfs_ioctl fs/ioctl.c:47 [inline]
     [<000000001253992f>] file_ioctl fs/ioctl.c:545 [inline]
     [<000000001253992f>] do_vfs_ioctl+0x551/0x890 fs/ioctl.c:732
     [<00000000c49e8c94>] ksys_ioctl+0x86/0xb0 fs/ioctl.c:749
     [<00000000261db07c>] __do_sys_ioctl fs/ioctl.c:756 [inline]
     [<00000000261db07c>] __se_sys_ioctl fs/ioctl.c:754 [inline]
     [<00000000261db07c>] __x64_sys_ioctl+0x1e/0x30 fs/ioctl.c:754
     [<000000004f01dc3e>] do_syscall_64+0x73/0x220  
arch/x86/entry/common.c:294
     [<000000002de81d29>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

executing program
executing program
executing program
executing program
executing program


  parent reply	other threads:[~2020-01-11 17:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-08 19:35 memory leak in erase_aeb syzbot
2019-12-08 19:35 ` syzbot
2019-12-20  2:14 ` [PATCH] UBI: Fastmap: free unused fastmap anchor peb during detach Hou Tao
2020-01-06  9:02   ` Sascha Hauer
2020-01-12 22:51     ` Richard Weinberger
2020-01-11 17:19 ` syzbot [this message]
2020-01-11 17:19   ` memory leak in erase_aeb 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=000000000000b4acb6059be070c0@google.com \
    --to=syzbot+f317896aae32eb281a58@syzkaller.appspotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=vigneshr@ti.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.