linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: memory leak in dma_buf_ioctl
       [not found] <000000000000b68e04058e6a3421@google.com>
@ 2019-07-24  9:59 ` Dmitry Vyukov
  2019-07-26  2:34 ` syzbot
  1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Vyukov @ 2019-07-24  9:59 UTC (permalink / raw)
  To: syzbot, Sumit Semwal, linux-media, DRI, linaro-mm-sig
  Cc: LKML, syzkaller-bugs

On Wed, Jul 24, 2019 at 11:48 AM syzbot
<syzbot+b2098bc44728a4efb3e9@syzkaller.appspotmail.com> wrote:
>
> Hello,
>
> syzbot found the following crash on:
>
> HEAD commit:    abdfd52a Merge tag 'armsoc-defconfig' of git://git.kernel...
> git tree:       upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=131441d0600000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=d31de3d88059b7fa
> dashboard link: https://syzkaller.appspot.com/bug?extid=b2098bc44728a4efb3e9
> compiler:       gcc (GCC) 9.0.0 20181231 (experimental)
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=12526e58600000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=161784f0600000

+drivers/dma-buf/dma-buf.c maintainers

> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> Reported-by: syzbot+b2098bc44728a4efb3e9@syzkaller.appspotmail.com
>
> executing program
> executing program
> executing program
> executing program
> executing program
> BUG: memory leak
> unreferenced object 0xffff888114034680 (size 32):
>    comm "syz-executor110", pid 6894, jiffies 4294947136 (age 13.580s)
>    hex dump (first 32 bytes):
>      00 64 6d 61 62 75 66 3a 00 00 00 00 00 00 00 00  .dmabuf:........
>      00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
>    backtrace:
>      [<00000000d259834b>] kmemleak_alloc_recursive
> /./include/linux/kmemleak.h:43 [inline]
>      [<00000000d259834b>] slab_post_alloc_hook /mm/slab.h:522 [inline]
>      [<00000000d259834b>] slab_alloc /mm/slab.c:3319 [inline]
>      [<00000000d259834b>] __do_kmalloc /mm/slab.c:3653 [inline]
>      [<00000000d259834b>] __kmalloc_track_caller+0x165/0x300 /mm/slab.c:3670
>      [<00000000ab207ec1>] memdup_user+0x26/0xa0 /mm/util.c:165
>      [<00000000c0909d36>] strndup_user+0x62/0x80 /mm/util.c:224
>      [<00000000a34a2d25>] dma_buf_set_name /drivers/dma-buf/dma-buf.c:331
> [inline]
>      [<00000000a34a2d25>] dma_buf_ioctl+0x60/0x1b0
> /drivers/dma-buf/dma-buf.c:391
>      [<00000000d7817662>] vfs_ioctl /fs/ioctl.c:46 [inline]
>      [<00000000d7817662>] file_ioctl /fs/ioctl.c:509 [inline]
>      [<00000000d7817662>] do_vfs_ioctl+0x62a/0x810 /fs/ioctl.c:696
>      [<00000000d24a671a>] ksys_ioctl+0x86/0xb0 /fs/ioctl.c:713
>      [<00000000bd810f5d>] __do_sys_ioctl /fs/ioctl.c:720 [inline]
>      [<00000000bd810f5d>] __se_sys_ioctl /fs/ioctl.c:718 [inline]
>      [<00000000bd810f5d>] __x64_sys_ioctl+0x1e/0x30 /fs/ioctl.c:718
>      [<000000005a8e86d5>] do_syscall_64+0x76/0x1a0
> /arch/x86/entry/common.c:296
>      [<000000007d83529f>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
>
> BUG: memory leak
> unreferenced object 0xffff888113b044a0 (size 32):
>    comm "syz-executor110", pid 6895, jiffies 4294947728 (age 7.660s)
>    hex dump (first 32 bytes):
>      00 64 6d 61 62 75 66 3a 00 00 00 00 00 00 00 00  .dmabuf:........
>      00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
>    backtrace:
>      [<00000000d259834b>] kmemleak_alloc_recursive
> /./include/linux/kmemleak.h:43 [inline]
>      [<00000000d259834b>] slab_post_alloc_hook /mm/slab.h:522 [inline]
>      [<00000000d259834b>] slab_alloc /mm/slab.c:3319 [inline]
>      [<00000000d259834b>] __do_kmalloc /mm/slab.c:3653 [inline]
>      [<00000000d259834b>] __kmalloc_track_caller+0x165/0x300 /mm/slab.c:3670
>      [<00000000ab207ec1>] memdup_user+0x26/0xa0 /mm/util.c:165
>      [<00000000c0909d36>] strndup_user+0x62/0x80 /mm/util.c:224
>      [<00000000a34a2d25>] dma_buf_set_name /drivers/dma-buf/dma-buf.c:331
> [inline]
>      [<00000000a34a2d25>] dma_buf_ioctl+0x60/0x1b0
> /drivers/dma-buf/dma-buf.c:391
>      [<00000000d7817662>] vfs_ioctl /fs/ioctl.c:46 [inline]
>      [<00000000d7817662>] file_ioctl /fs/ioctl.c:509 [inline]
>      [<00000000d7817662>] do_vfs_ioctl+0x62a/0x810 /fs/ioctl.c:696
>      [<00000000d24a671a>] ksys_ioctl+0x86/0xb0 /fs/ioctl.c:713
>      [<00000000bd810f5d>] __do_sys_ioctl /fs/ioctl.c:720 [inline]
>      [<00000000bd810f5d>] __se_sys_ioctl /fs/ioctl.c:718 [inline]
>      [<00000000bd810f5d>] __x64_sys_ioctl+0x1e/0x30 /fs/ioctl.c:718
>      [<000000005a8e86d5>] do_syscall_64+0x76/0x1a0
> /arch/x86/entry/common.c:296
>      [<000000007d83529f>] 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
>
> --
> You received this message because you are subscribed to the Google Groups "syzkaller-bugs" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-bugs+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-bugs/000000000000b68e04058e6a3421%40google.com.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: memory leak in dma_buf_ioctl
       [not found] <000000000000b68e04058e6a3421@google.com>
  2019-07-24  9:59 ` memory leak in dma_buf_ioctl Dmitry Vyukov
@ 2019-07-26  2:34 ` syzbot
  2019-07-26  2:46   ` Steven Rostedt
  1 sibling, 1 reply; 3+ messages in thread
From: syzbot @ 2019-07-26  2:34 UTC (permalink / raw)
  To: bsingharora, coreteam, davem, dri-devel, duwe, dvyukov, kaber,
	kadlec, linaro-mm-sig, linux-kernel, linux-media, mingo, mpe,
	netdev, netfilter-devel, pablo, rostedt, sumit.semwal,
	syzkaller-bugs

syzbot has bisected this bug to:

commit 04cf31a759ef575f750a63777cee95500e410994
Author: Michael Ellerman <mpe@ellerman.id.au>
Date:   Thu Mar 24 11:04:01 2016 +0000

     ftrace: Make ftrace_location_range() global

bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=154293f4600000
start commit:   abdfd52a Merge tag 'armsoc-defconfig' of git://git.kernel...
git tree:       upstream
final crash:    https://syzkaller.appspot.com/x/report.txt?x=174293f4600000
console output: https://syzkaller.appspot.com/x/log.txt?x=134293f4600000
kernel config:  https://syzkaller.appspot.com/x/.config?x=d31de3d88059b7fa
dashboard link: https://syzkaller.appspot.com/bug?extid=b2098bc44728a4efb3e9
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=12526e58600000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=161784f0600000

Reported-by: syzbot+b2098bc44728a4efb3e9@syzkaller.appspotmail.com
Fixes: 04cf31a759ef ("ftrace: Make ftrace_location_range() global")

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: memory leak in dma_buf_ioctl
  2019-07-26  2:34 ` syzbot
@ 2019-07-26  2:46   ` Steven Rostedt
  0 siblings, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2019-07-26  2:46 UTC (permalink / raw)
  To: syzbot
  Cc: bsingharora, coreteam, davem, dri-devel, duwe, dvyukov, kaber,
	kadlec, linaro-mm-sig, linux-kernel, linux-media, mingo, mpe,
	netdev, netfilter-devel, pablo, sumit.semwal, syzkaller-bugs

On Thu, 25 Jul 2019 19:34:01 -0700
syzbot <syzbot+b2098bc44728a4efb3e9@syzkaller.appspotmail.com> wrote:

> syzbot has bisected this bug to:
> 
> commit 04cf31a759ef575f750a63777cee95500e410994
> Author: Michael Ellerman <mpe@ellerman.id.au>
> Date:   Thu Mar 24 11:04:01 2016 +0000
> 
>      ftrace: Make ftrace_location_range() global

It's sad that I have yet to find a single syzbot bisect useful. Really?
setting a function from static to global will cause a memory leak in a
completely unrelated area of the kernel?

I'm about to set these to my /dev/null folder.

-- Steve


> 
> bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=154293f4600000
> start commit:   abdfd52a Merge tag 'armsoc-defconfig' of git://git.kernel...
> git tree:       upstream
> final crash:    https://syzkaller.appspot.com/x/report.txt?x=174293f4600000
> console output: https://syzkaller.appspot.com/x/log.txt?x=134293f4600000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=d31de3d88059b7fa
> dashboard link: https://syzkaller.appspot.com/bug?extid=b2098bc44728a4efb3e9
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=12526e58600000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=161784f0600000
> 
> Reported-by: syzbot+b2098bc44728a4efb3e9@syzkaller.appspotmail.com
> Fixes: 04cf31a759ef ("ftrace: Make ftrace_location_range() global")
> 
> For information about bisection process see: https://goo.gl/tpsmEJ#bisection


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-26  2:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <000000000000b68e04058e6a3421@google.com>
2019-07-24  9:59 ` memory leak in dma_buf_ioctl Dmitry Vyukov
2019-07-26  2:34 ` syzbot
2019-07-26  2:46   ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).