All of lore.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+e7afd76ad060fa0d2605@syzkaller.appspotmail.com>
To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
	linux-usb@vger.kernel.org, rafael@kernel.org,
	stern@rowland.harvard.edu, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [usb?] memory leak in class_create
Date: Mon, 01 May 2023 12:37:24 -0700	[thread overview]
Message-ID: <000000000000bb868005faa6f31a@google.com> (raw)
In-Reply-To: <ba18f241-72ef-4d10-acaf-5fc34edbd695@rowland.harvard.edu>

Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
memory leak in class_create

BUG: memory leak
unreferenced object 0xffff88810a6af480 (size 96):
  comm "kworker/0:2", pid 1755, jiffies 4294944661 (age 9.520s)
  hex dump (first 32 bytes):
    c7 03 9b 85 ff ff ff ff 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:
    [<ffffffff81544e14>] kmalloc_trace+0x24/0x90 mm/slab_common.c:1057
    [<ffffffff82b65445>] kmalloc include/linux/slab.h:559 [inline]
    [<ffffffff82b65445>] kzalloc include/linux/slab.h:680 [inline]
    [<ffffffff82b65445>] class_create+0x25/0x90 drivers/base/class.c:261
    [<ffffffff831f7a9b>] init_usb_class drivers/usb/core/file.c:91 [inline]
    [<ffffffff831f7a9b>] usb_register_dev+0x2ab/0x3e0 drivers/usb/core/file.c:179
    [<ffffffff832cfff4>] usblp_probe+0x4e4/0x750 drivers/usb/class/usblp.c:1208
    [<ffffffff831f39a9>] usb_probe_interface+0x179/0x3c0 drivers/usb/core/driver.c:396
    [<ffffffff82b62d7d>] call_driver_probe drivers/base/dd.c:579 [inline]
    [<ffffffff82b62d7d>] really_probe+0x12d/0x430 drivers/base/dd.c:658
    [<ffffffff82b63141>] __driver_probe_device+0xc1/0x1a0 drivers/base/dd.c:800
    [<ffffffff82b6324a>] driver_probe_device+0x2a/0x120 drivers/base/dd.c:830
    [<ffffffff82b6343b>] __device_attach_driver+0xfb/0x150 drivers/base/dd.c:958
    [<ffffffff82b60191>] bus_for_each_drv+0xc1/0x110 drivers/base/bus.c:457
    [<ffffffff82b63962>] __device_attach+0x102/0x2a0 drivers/base/dd.c:1030
    [<ffffffff82b618fa>] bus_probe_device+0xca/0xd0 drivers/base/bus.c:532
    [<ffffffff82b5def3>] device_add+0x993/0xc60 drivers/base/core.c:3625
    [<ffffffff831f0a89>] usb_set_configuration+0x9a9/0xc90 drivers/usb/core/message.c:2211
    [<ffffffff832033d1>] usb_generic_driver_probe+0xa1/0x100 drivers/usb/core/generic.c:238
    [<ffffffff831f3080>] usb_probe_device+0x60/0x140 drivers/usb/core/driver.c:293

BUG: memory leak
unreferenced object 0xffff888114088c00 (size 512):
  comm "kworker/0:2", pid 1755, jiffies 4294944661 (age 9.520s)
  hex dump (first 32 bytes):
    00 8c 08 14 81 88 ff ff 00 8c 08 14 81 88 ff ff  ................
    00 00 00 00 00 00 00 00 c7 03 9b 85 ff ff ff ff  ................
  backtrace:
    [<ffffffff81544e14>] kmalloc_trace+0x24/0x90 mm/slab_common.c:1057
    [<ffffffff82b65308>] kmalloc include/linux/slab.h:559 [inline]
    [<ffffffff82b65308>] kzalloc include/linux/slab.h:680 [inline]
    [<ffffffff82b65308>] class_register+0x28/0x140 drivers/base/class.c:186
    [<ffffffff82b65467>] class_create+0x47/0x90 drivers/base/class.c:270
    [<ffffffff831f7a9b>] init_usb_class drivers/usb/core/file.c:91 [inline]
    [<ffffffff831f7a9b>] usb_register_dev+0x2ab/0x3e0 drivers/usb/core/file.c:179
    [<ffffffff832cfff4>] usblp_probe+0x4e4/0x750 drivers/usb/class/usblp.c:1208
    [<ffffffff831f39a9>] usb_probe_interface+0x179/0x3c0 drivers/usb/core/driver.c:396
    [<ffffffff82b62d7d>] call_driver_probe drivers/base/dd.c:579 [inline]
    [<ffffffff82b62d7d>] really_probe+0x12d/0x430 drivers/base/dd.c:658
    [<ffffffff82b63141>] __driver_probe_device+0xc1/0x1a0 drivers/base/dd.c:800
    [<ffffffff82b6324a>] driver_probe_device+0x2a/0x120 drivers/base/dd.c:830
    [<ffffffff82b6343b>] __device_attach_driver+0xfb/0x150 drivers/base/dd.c:958
    [<ffffffff82b60191>] bus_for_each_drv+0xc1/0x110 drivers/base/bus.c:457
    [<ffffffff82b63962>] __device_attach+0x102/0x2a0 drivers/base/dd.c:1030
    [<ffffffff82b618fa>] bus_probe_device+0xca/0xd0 drivers/base/bus.c:532
    [<ffffffff82b5def3>] device_add+0x993/0xc60 drivers/base/core.c:3625
    [<ffffffff831f0a89>] usb_set_configuration+0x9a9/0xc90 drivers/usb/core/message.c:2211
    [<ffffffff832033d1>] usb_generic_driver_probe+0xa1/0x100 drivers/usb/core/generic.c:238



Tested on:

commit:         22b8cc3e Merge tag 'x86_mm_for_6.4' of git://git.kerne..
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
console output: https://syzkaller.appspot.com/x/log.txt?x=14569d94280000
kernel config:  https://syzkaller.appspot.com/x/.config?x=5046ebeca744dd40
dashboard link: https://syzkaller.appspot.com/bug?extid=e7afd76ad060fa0d2605
compiler:       gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
patch:          https://syzkaller.appspot.com/x/patch.diff?x=138259d7c80000


  reply	other threads:[~2023-05-01 19:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-01 16:53 [syzbot] [usb?] memory leak in class_create syzbot
2023-05-01 19:16 ` Alan Stern
2023-05-01 19:37   ` syzbot [this message]
2023-05-16 13:54 ` Greg KH
2023-05-16 14:27   ` 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=000000000000bb868005faa6f31a@google.com \
    --to=syzbot+e7afd76ad060fa0d2605@syzkaller.appspotmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=stern@rowland.harvard.edu \
    --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.