linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: syzbot <syzbot+97388eb9d31b997fe1d0@syzkaller.appspotmail.com>
To: johan.hedberg@gmail.com, linux-bluetooth@vger.kernel.org,
	linux-kernel@vger.kernel.org, marcel@holtmann.org,
	syzkaller-bugs@googlegroups.com
Subject: memory leak in h4_recv_buf
Date: Mon, 24 Jun 2019 00:27:08 -0700	[thread overview]
Message-ID: <0000000000006b1779058c0cbdda@google.com> (raw)

Hello,

syzbot found the following crash on:

HEAD commit:    abf02e29 Merge tag 'pm-5.2-rc6' of git://git.kernel.org/pu..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1054e6b2a00000
kernel config:  https://syzkaller.appspot.com/x/.config?x=56f1da14935c3cce
dashboard link: https://syzkaller.appspot.com/bug?extid=97388eb9d31b997fe1d0
compiler:       gcc (GCC) 9.0.0 20181231 (experimental)
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=1073d8aaa00000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=17b36fbea00000

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

program
BUG: memory leak
unreferenced object 0xffff88810991fa00 (size 224):
   comm "syz-executor739", pid 7080, jiffies 4294949854 (age 18.640s)
   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:
     [<00000000da42c09f>] kmemleak_alloc_recursive  
include/linux/kmemleak.h:43 [inline]
     [<00000000da42c09f>] slab_post_alloc_hook mm/slab.h:439 [inline]
     [<00000000da42c09f>] slab_alloc_node mm/slab.c:3269 [inline]
     [<00000000da42c09f>] kmem_cache_alloc_node+0x153/0x2a0 mm/slab.c:3579
     [<00000000f6fbcf84>] __alloc_skb+0x6e/0x210 net/core/skbuff.c:194
     [<00000000ea93fc4c>] alloc_skb include/linux/skbuff.h:1054 [inline]
     [<00000000ea93fc4c>] bt_skb_alloc include/net/bluetooth/bluetooth.h:339  
[inline]
     [<00000000ea93fc4c>] h4_recv_buf+0x26d/0x450  
drivers/bluetooth/hci_h4.c:182
     [<00000000e0312475>] h4_recv+0x51/0xb0 drivers/bluetooth/hci_h4.c:116
     [<00000000ebf11fab>] hci_uart_tty_receive+0xba/0x200  
drivers/bluetooth/hci_ldisc.c:592
     [<0000000095e1216e>] tiocsti drivers/tty/tty_io.c:2195 [inline]
     [<0000000095e1216e>] tty_ioctl+0x81c/0xa30 drivers/tty/tty_io.c:2571
     [<000000009fa523f0>] vfs_ioctl fs/ioctl.c:46 [inline]
     [<000000009fa523f0>] file_ioctl fs/ioctl.c:509 [inline]
     [<000000009fa523f0>] do_vfs_ioctl+0x62a/0x810 fs/ioctl.c:696
     [<000000000cebb5d9>] ksys_ioctl+0x86/0xb0 fs/ioctl.c:713
     [<000000001630008a>] __do_sys_ioctl fs/ioctl.c:720 [inline]
     [<000000001630008a>] __se_sys_ioctl fs/ioctl.c:718 [inline]
     [<000000001630008a>] __x64_sys_ioctl+0x1e/0x30 fs/ioctl.c:718
     [<00000000c62091e3>] do_syscall_64+0x76/0x1a0  
arch/x86/entry/common.c:301
     [<000000005c213625>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

BUG: memory leak
unreferenced object 0xffff8881204f4400 (size 1024):
   comm "syz-executor739", pid 7080, jiffies 4294949854 (age 18.640s)
   hex dump (first 32 bytes):
     6c 69 62 75 64 65 76 00 fe ed ca fe 28 00 00 00  libudev.....(...
     28 00 00 00 a0 00 00 00 52 ca da 77 00 00 00 00  (.......R..w....
   backtrace:
     [<0000000034504843>] kmemleak_alloc_recursive  
include/linux/kmemleak.h:43 [inline]
     [<0000000034504843>] slab_post_alloc_hook mm/slab.h:439 [inline]
     [<0000000034504843>] slab_alloc_node mm/slab.c:3269 [inline]
     [<0000000034504843>] kmem_cache_alloc_node_trace+0x15b/0x2a0  
mm/slab.c:3597
     [<0000000056d30eb5>] __do_kmalloc_node mm/slab.c:3619 [inline]
     [<0000000056d30eb5>] __kmalloc_node_track_caller+0x38/0x50  
mm/slab.c:3634
     [<00000000df40176c>] __kmalloc_reserve.isra.0+0x40/0xb0  
net/core/skbuff.c:138
     [<0000000035340e64>] __alloc_skb+0xa0/0x210 net/core/skbuff.c:206
     [<00000000ea93fc4c>] alloc_skb include/linux/skbuff.h:1054 [inline]
     [<00000000ea93fc4c>] bt_skb_alloc include/net/bluetooth/bluetooth.h:339  
[inline]
     [<00000000ea93fc4c>] h4_recv_buf+0x26d/0x450  
drivers/bluetooth/hci_h4.c:182
     [<00000000e0312475>] h4_recv+0x51/0xb0 drivers/bluetooth/hci_h4.c:116
     [<00000000ebf11fab>] hci_uart_tty_receive+0xba/0x200  
drivers/bluetooth/hci_ldisc.c:592
     [<0000000095e1216e>] tiocsti drivers/tty/tty_io.c:2195 [inline]
     [<0000000095e1216e>] tty_ioctl+0x81c/0xa30 drivers/tty/tty_io.c:2571
     [<000000009fa523f0>] vfs_ioctl fs/ioctl.c:46 [inline]
     [<000000009fa523f0>] file_ioctl fs/ioctl.c:509 [inline]
     [<000000009fa523f0>] do_vfs_ioctl+0x62a/0x810 fs/ioctl.c:696
     [<000000000cebb5d9>] ksys_ioctl+0x86/0xb0 fs/ioctl.c:713
     [<000000001630008a>] __do_sys_ioctl fs/ioctl.c:720 [inline]
     [<000000001630008a>] __se_sys_ioctl fs/ioctl.c:718 [inline]
     [<000000001630008a>] __x64_sys_ioctl+0x1e/0x30 fs/ioctl.c:718
     [<00000000c62091e3>] do_syscall_64+0x76/0x1a0  
arch/x86/entry/common.c:301
     [<000000005c213625>] 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-24  7:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-24  7:27 syzbot [this message]
     [not found] ` <d71a274f-fdeb-4da1-898e-06f6944e04dan@googlegroups.com>
2021-07-27 15:05   ` memory leak in h4_recv_buf Phi Nguyen
2021-07-29 11:44     ` Marcel Holtmann
2021-07-29 12:05       ` Phi Nguyen
2021-07-29 12:07       ` Dan Carpenter
2021-07-29 15:39         ` Marcel Holtmann
2021-07-29 17:42           ` Phi Nguyen
2021-07-29 19:49             ` Marcel Holtmann

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=0000000000006b1779058c0cbdda@google.com \
    --to=syzbot+97388eb9d31b997fe1d0@syzkaller.appspotmail.com \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel@holtmann.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;
as well as URLs for NNTP newsgroup(s).