* [syzbot] [staging?] [usb?] memory leak in _r8712_init_xmit_priv (2)
@ 2023-11-20 0:09 syzbot
2023-11-23 19:08 ` [syzbot] printk debug syzbot
2024-01-19 13:22 ` [syzbot] [syzbot] [staging?] [usb?] memory leak in _r8712_init_xmit_priv (2) syzbot
0 siblings, 2 replies; 4+ messages in thread
From: syzbot @ 2023-11-20 0:09 UTC (permalink / raw)
To: Larry.Finger, florian.c.schilhabel, gregkh, linux-kernel,
linux-media, linux-staging, linux-usb, syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: c42d9eeef8e5 Merge tag 'hardening-v6.7-rc2' of git://git.k..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=13bff22f680000
kernel config: https://syzkaller.appspot.com/x/.config?x=e71d284dd6560ca8
dashboard link: https://syzkaller.appspot.com/bug?extid=83763e624cfec6b462cb
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=1564223f680000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17a7c024e80000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/026cc0fc446f/disk-c42d9eee.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/c4b4d6d092c1/vmlinux-c42d9eee.xz
kernel image: https://storage.googleapis.com/syzbot-assets/1865f885e9d6/bzImage-c42d9eee.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+83763e624cfec6b462cb@syzkaller.appspotmail.com
executing program
BUG: memory leak
unreferenced object 0xffff888107a5c000 (size 4096):
comm "kworker/1:0", pid 22, jiffies 4294943134 (age 18.720s)
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:
[<ffffffff816337cd>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
[<ffffffff816337cd>] slab_post_alloc_hook mm/slab.h:766 [inline]
[<ffffffff816337cd>] slab_alloc_node mm/slub.c:3478 [inline]
[<ffffffff816337cd>] __kmem_cache_alloc_node+0x2dd/0x3f0 mm/slub.c:3517
[<ffffffff8157e625>] kmalloc_trace+0x25/0x90 mm/slab_common.c:1098
[<ffffffff83cee442>] kmalloc include/linux/slab.h:600 [inline]
[<ffffffff83cee442>] _r8712_init_xmit_priv+0x2b2/0x6e0 drivers/staging/rtl8712/rtl871x_xmit.c:130
[<ffffffff83ce9033>] r8712_init_drv_sw+0xc3/0x290 drivers/staging/rtl8712/os_intfs.c:311
[<ffffffff83ce7ce6>] r871xu_drv_init+0x1c6/0x920 drivers/staging/rtl8712/usb_intf.c:386
[<ffffffff832d0f0b>] usb_probe_interface+0x16b/0x3a0 drivers/usb/core/driver.c:396
[<ffffffff82c3bb06>] call_driver_probe drivers/base/dd.c:579 [inline]
[<ffffffff82c3bb06>] really_probe+0x126/0x440 drivers/base/dd.c:658
[<ffffffff82c3bee3>] __driver_probe_device+0xc3/0x190 drivers/base/dd.c:800
[<ffffffff82c3bfda>] driver_probe_device+0x2a/0x120 drivers/base/dd.c:830
[<ffffffff82c3c1d4>] __device_attach_driver+0x104/0x160 drivers/base/dd.c:958
[<ffffffff82c38f5d>] bus_for_each_drv+0xcd/0x120 drivers/base/bus.c:457
[<ffffffff82c3c6fa>] __device_attach+0xfa/0x290 drivers/base/dd.c:1030
[<ffffffff82c3a6ca>] bus_probe_device+0xca/0xd0 drivers/base/bus.c:532
[<ffffffff82c36b7e>] device_add+0x9be/0xc90 drivers/base/core.c:3625
[<ffffffff832cdfd7>] usb_set_configuration+0x967/0xc70 drivers/usb/core/message.c:2207
[<ffffffff832e0cac>] usb_generic_driver_probe+0x9c/0xf0 drivers/usb/core/generic.c:238
BUG: memory leak
unreferenced object 0xffff888107a59000 (size 4096):
comm "kworker/1:0", pid 22, jiffies 4294943134 (age 18.720s)
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:
[<ffffffff816337cd>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
[<ffffffff816337cd>] slab_post_alloc_hook mm/slab.h:766 [inline]
[<ffffffff816337cd>] slab_alloc_node mm/slub.c:3478 [inline]
[<ffffffff816337cd>] __kmem_cache_alloc_node+0x2dd/0x3f0 mm/slub.c:3517
[<ffffffff8157e625>] kmalloc_trace+0x25/0x90 mm/slab_common.c:1098
[<ffffffff83cee442>] kmalloc include/linux/slab.h:600 [inline]
[<ffffffff83cee442>] _r8712_init_xmit_priv+0x2b2/0x6e0 drivers/staging/rtl8712/rtl871x_xmit.c:130
[<ffffffff83ce9033>] r8712_init_drv_sw+0xc3/0x290 drivers/staging/rtl8712/os_intfs.c:311
[<ffffffff83ce7ce6>] r871xu_drv_init+0x1c6/0x920 drivers/staging/rtl8712/usb_intf.c:386
[<ffffffff832d0f0b>] usb_probe_interface+0x16b/0x3a0 drivers/usb/core/driver.c:396
[<ffffffff82c3bb06>] call_driver_probe drivers/base/dd.c:579 [inline]
[<ffffffff82c3bb06>] really_probe+0x126/0x440 drivers/base/dd.c:658
[<ffffffff82c3bee3>] __driver_probe_device+0xc3/0x190 drivers/base/dd.c:800
[<ffffffff82c3bfda>] driver_probe_device+0x2a/0x120 drivers/base/dd.c:830
[<ffffffff82c3c1d4>] __device_attach_driver+0x104/0x160 drivers/base/dd.c:958
[<ffffffff82c38f5d>] bus_for_each_drv+0xcd/0x120 drivers/base/bus.c:457
[<ffffffff82c3c6fa>] __device_attach+0xfa/0x290 drivers/base/dd.c:1030
[<ffffffff82c3a6ca>] bus_probe_device+0xca/0xd0 drivers/base/bus.c:532
[<ffffffff82c36b7e>] device_add+0x9be/0xc90 drivers/base/core.c:3625
[<ffffffff832cdfd7>] usb_set_configuration+0x967/0xc70 drivers/usb/core/message.c:2207
[<ffffffff832e0cac>] usb_generic_driver_probe+0x9c/0xf0 drivers/usb/core/generic.c:238
BUG: memory leak
unreferenced object 0xffff888108475000 (size 4096):
comm "kworker/1:0", pid 22, jiffies 4294943134 (age 18.720s)
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:
[<ffffffff816337cd>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
[<ffffffff816337cd>] slab_post_alloc_hook mm/slab.h:766 [inline]
[<ffffffff816337cd>] slab_alloc_node mm/slub.c:3478 [inline]
[<ffffffff816337cd>] __kmem_cache_alloc_node+0x2dd/0x3f0 mm/slub.c:3517
[<ffffffff8157e625>] kmalloc_trace+0x25/0x90 mm/slab_common.c:1098
[<ffffffff83cee442>] kmalloc include/linux/slab.h:600 [inline]
[<ffffffff83cee442>] _r8712_init_xmit_priv+0x2b2/0x6e0 drivers/staging/rtl8712/rtl871x_xmit.c:130
[<ffffffff83ce9033>] r8712_init_drv_sw+0xc3/0x290 drivers/staging/rtl8712/os_intfs.c:311
[<ffffffff83ce7ce6>] r871xu_drv_init+0x1c6/0x920 drivers/staging/rtl8712/usb_intf.c:386
[<ffffffff832d0f0b>] usb_probe_interface+0x16b/0x3a0 drivers/usb/core/driver.c:396
[<ffffffff82c3bb06>] call_driver_probe drivers/base/dd.c:579 [inline]
[<ffffffff82c3bb06>] really_probe+0x126/0x440 drivers/base/dd.c:658
[<ffffffff82c3bee3>] __driver_probe_device+0xc3/0x190 drivers/base/dd.c:800
[<ffffffff82c3bfda>] driver_probe_device+0x2a/0x120 drivers/base/dd.c:830
[<ffffffff82c3c1d4>] __device_attach_driver+0x104/0x160 drivers/base/dd.c:958
[<ffffffff82c38f5d>] bus_for_each_drv+0xcd/0x120 drivers/base/bus.c:457
[<ffffffff82c3c6fa>] __device_attach+0xfa/0x290 drivers/base/dd.c:1030
[<ffffffff82c3a6ca>] bus_probe_device+0xca/0xd0 drivers/base/bus.c:532
[<ffffffff82c36b7e>] device_add+0x9be/0xc90 drivers/base/core.c:3625
[<ffffffff832cdfd7>] usb_set_configuration+0x967/0xc70 drivers/usb/core/message.c:2207
[<ffffffff832e0cac>] usb_generic_driver_probe+0x9c/0xf0 drivers/usb/core/generic.c:238
---
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 report is already addressed, 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 report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [syzbot] printk debug
2023-11-20 0:09 [syzbot] [staging?] [usb?] memory leak in _r8712_init_xmit_priv (2) syzbot
@ 2023-11-23 19:08 ` syzbot
2024-01-19 13:22 ` [syzbot] [syzbot] [staging?] [usb?] memory leak in _r8712_init_xmit_priv (2) syzbot
1 sibling, 0 replies; 4+ messages in thread
From: syzbot @ 2023-11-23 19:08 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.
***
Subject: printk debug
Author: yuran.pereira@hotmail.com
#syz test: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
---
drivers/staging/rtl8712/rtl871x_xmit.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/rtl8712/rtl871x_xmit.c b/drivers/staging/rtl8712/rtl871x_xmit.c
index 6353dbe554d3..c80c60417d5c 100644
--- a/drivers/staging/rtl8712/rtl871x_xmit.c
+++ b/drivers/staging/rtl8712/rtl871x_xmit.c
@@ -125,6 +125,7 @@ int _r8712_init_xmit_priv(struct xmit_priv *pxmitpriv,
((addr_t)(pxmitpriv->pallocated_xmitbuf) & 3);
pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmitbuf;
for (i = 0; i < NR_XMITBUFF; i++) {
+ pr_info("==> Allocating pallocated_buf %d\n", i);
INIT_LIST_HEAD(&pxmitbuf->list);
pxmitbuf->pallocated_buf =
kmalloc(MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ, GFP_ATOMIC);
@@ -188,6 +189,7 @@ void _free_xmit_priv(struct xmit_priv *pxmitpriv)
pxmitframe++;
}
for (i = 0; i < NR_XMITBUFF; i++) {
+ pr_info("==> Freeing pallocated_buf %d\n", i);
r8712_xmit_resource_free(padapter, pxmitbuf);
kfree(pxmitbuf->pallocated_buf);
pxmitbuf++;
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [syzbot] [syzbot] [staging?] [usb?] memory leak in _r8712_init_xmit_priv (2)
2023-11-20 0:09 [syzbot] [staging?] [usb?] memory leak in _r8712_init_xmit_priv (2) syzbot
2023-11-23 19:08 ` [syzbot] printk debug syzbot
@ 2024-01-19 13:22 ` syzbot
1 sibling, 0 replies; 4+ messages in thread
From: syzbot @ 2024-01-19 13:22 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: [syzbot] [staging?] [usb?] memory leak in _r8712_init_xmit_priv (2)
Author: n.zhandarovich@fintech.ru
Test to make sure the issue is still there.
#syz test
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [syzbot] [staging?] [usb?] memory leak in _r8712_init_xmit_priv (2)
[not found] <20240119132214.3095-1-n.zhandarovich@fintech.ru>
@ 2024-01-19 14:04 ` syzbot
0 siblings, 0 replies; 4+ messages in thread
From: syzbot @ 2024-01-19 14:04 UTC (permalink / raw)
To: linux-kernel, n.zhandarovich, syzkaller-bugs
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
memory leak in corrupted
BUG: memory leak
unreferenced object 0xffff888109b12000 (size 4096):
comm "kworker/1:1", pid 28, jiffies 4294944675
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 (crc 0):
[<ffffffff815fa6f3>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
[<ffffffff815fa6f3>] slab_post_alloc_hook mm/slub.c:3817 [inline]
[<ffffffff815fa6f3>] slab_alloc_node mm/slub.c:3860 [inline]
[<ffffffff815fa6f3>] kmalloc_trace+0x283/0x330 mm/slub.c:4007
[<ffffffff83d23552>] kmalloc include/linux/slab.h:590 [inline]
[<ffffffff83d23552>] _r8712_init_xmit_priv+0x2b2/0x6e0 drivers/staging/rtl8712/rtl871x_xmit.c:130
[<ffffffff83d1e143>] r8712_init_drv_sw+0xc3/0x290 drivers/staging/rtl8712/os_intfs.c:310
[<ffffffff83d1ce06>] r871xu_drv_init+0x1c6/0x920 drivers/staging/rtl8712/usb_intf.c:386
[<ffffffff8330155b>] usb_probe_interface+0x16b/0x3a0 drivers/usb/core/driver.c:399
[<ffffffff82c6ef96>] call_driver_probe drivers/base/dd.c:579 [inline]
[<ffffffff82c6ef96>] really_probe+0x126/0x440 drivers/base/dd.c:658
[<ffffffff82c6f373>] __driver_probe_device+0xc3/0x190 drivers/base/dd.c:800
[<ffffffff82c6f46a>] driver_probe_device+0x2a/0x120 drivers/base/dd.c:830
[<ffffffff82c6f664>] __device_attach_driver+0x104/0x160 drivers/base/dd.c:958
[<ffffffff82c6c3bd>] bus_for_each_drv+0xcd/0x120 drivers/base/bus.c:457
[<ffffffff82c6fb8a>] __device_attach+0xfa/0x290 drivers/base/dd.c:1030
[<ffffffff82c6db2a>] bus_probe_device+0xca/0xd0 drivers/base/bus.c:532
[<ffffffff82c69fde>] device_add+0x9be/0xc90 drivers/base/core.c:3625
[<ffffffff832fe627>] usb_set_configuration+0x967/0xc70 drivers/usb/core/message.c:2207
[<ffffffff833110bf>] usb_generic_driver_probe+0x7f/0xd0 drivers/usb/core/generic.c:254
[<ffffffff83300c49>] usb_probe_device+0x79/0x180 drivers/usb/core/driver.c:294
BUG: memory leak
unreferenced object 0xffff888109b17000 (size 4096):
comm "kworker/1:1", pid 28, jiffies 4294944675
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 (crc 0):
[<ffffffff815fa6f3>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
[<ffffffff815fa6f3>] slab_post_alloc_hook mm/slub.c:3817 [inline]
[<ffffffff815fa6f3>] slab_alloc_node mm/slub.c:3860 [inline]
[<ffffffff815fa6f3>] kmalloc_trace+0x283/0x330 mm/slub.c:4007
[<ffffffff83d23552>] kmalloc include/linux/slab.h:590 [inline]
[<ffffffff83d23552>] _r8712_init_xmit_priv+0x2b2/0x6e0 drivers/staging/rtl8712/rtl871x_xmit.c:130
[<ffffffff83d1e143>] r8712_init_drv_sw+0xc3/0x290 drivers/staging/rtl8712/os_intfs.c:310
[<ffffffff83d1ce06>] r871xu_drv_init+0x1c6/0x920 drivers/staging/rtl8712/usb_intf.c:386
[<ffffffff8330155b>] usb_probe_interface+0x16b/0x3a0 drivers/usb/core/driver.c:399
[<ffffffff82c6ef96>] call_driver_probe drivers/base/dd.c:579 [inline]
[<ffffffff82c6ef96>] really_probe+0x126/0x440 drivers/base/dd.c:658
[<ffffffff82c6f373>] __driver_probe_device+0xc3/0x190 drivers/base/dd.c:800
[<ffffffff82c6f46a>] driver_probe_device+0x2a/0x120 drivers/base/dd.c:830
[<ffffffff82c6f664>] __device_attach_driver+0x104/0x160 drivers/base/dd.c:958
[<ffffffff82c6c3bd>] bus_for_each_drv+0xcd/0x120 drivers/base/bus.c:457
[<ffffffff82c6fb8a>] __device_attach+0xfa/0x290 drivers/base/dd.c:1030
[<ffffffff82c6db2a>] bus_probe_device+0xca/0xd0 drivers/base/bus.c:532
[<ffffffff82c69fde>] device_add+0x9be/0xc90 drivers/base/core.c:3625
[<ffffffff832fe627>] usb_set_configuration+0x967/0xc70 drivers/usb/core/message.c:2207
[<ffffffff833110bf>] usb_generic_driver_probe+0x7f/0xd0 drivers/usb/core/generic.c:254
[<ffffffff83300c49>] usb_probe_device+0x79/0x180 drivers/usb/core/driver.c:294
BUG: memory leak
unreferenced object 0xffff888109b15000 (size 4096):
comm "kworker/1:1", pid 28, jiffies 4294944675
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 (crc 0):
[<ffffffff815fa6f3>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
[<ffffffff815fa6f3>] slab_post_alloc_hook mm/slub.c:3817 [inline]
[<ffffffff815fa6f3>] slab_alloc_node mm/slub.c:3860 [inline]
[<ffffffff815fa6f3>] kmalloc_trace+0x283/0x330 mm/slub.c:4007
[<ffffffff83d23552>] kmalloc include/linux/slab.h:590 [inline]
[<ffffffff83d23552>] _r8712_init_xmit_priv+0x2b2/0x6e0 drivers/staging/rtl8712/rtl871x_xmit.c:130
[<ffffffff83d1e143>] r8712_init_drv_sw+0xc3/0x290 drivers/staging/rtl8712/os_intfs.c:310
[<ffffffff83d1ce06>] r871xu_drv_init+0x1c6/0x920 drivers/staging/rtl8712/usb_intf.c:386
[<ffffffff8330155b>] usb_probe_interface+0x16b/0x3a0 drivers/usb/core/driver.c:399
[<ffffffff82c6ef96>] call_driver_probe drivers/base/dd.c:579 [inline]
[<ffffffff82c6ef96>] really_probe+0x126/0x440 drivers/base/dd.c:658
[<ffffffff82c6f373>] __driver_probe_device+0xc3/0x190 drivers/base/dd.c:800
[<ffffffff82c6f46a>] driver_probe_device+0x2a/0x120 drivers/base/dd.c:830
[<ffffffff82c6f664>] __device_attach_driver+0x104/0x160 drivers/base/dd.c:958
[<ffffffff82c6c3bd>] bus_for_each_drv+0xcd/0x120 drivers/base/bus.c:457
[<ffffffff82c6fb8a>] __device_attach+0xfa/0x290 drivers/base/dd.c:1030
[<ffffffff82c6db2a>] bus_probe_device+0xca/0xd0 drivers/base/bus.c:532
[<ffffffff82c69fde>] device_add+0x9be/0xc90 drivers/base/core.c:3625
[<ffffffff832fe627>] usb_set_configuration+0x967/0xc70 drivers/usb/core/message.c:2207
[<ffffffff833110bf>] usb_generic_driver_probe+0x7f/0xd0 drivers/usb/core/generic.c:254
[<ffffffff83300c49>] usb_probe_device+0x79/0x180 drivers/usb/core/driver.c:294
Tested on:
commit: 9d1694dc Merge tag 'for-6.8/block-2024-01-18' of git:/..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=17b61b63e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=447c03a4f5a8d571
dashboard link: https://syzkaller.appspot.com/bug?extid=83763e624cfec6b462cb
compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
Note: no patches were applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-01-19 14:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-20 0:09 [syzbot] [staging?] [usb?] memory leak in _r8712_init_xmit_priv (2) syzbot
2023-11-23 19:08 ` [syzbot] printk debug syzbot
2024-01-19 13:22 ` [syzbot] [syzbot] [staging?] [usb?] memory leak in _r8712_init_xmit_priv (2) syzbot
[not found] <20240119132214.3095-1-n.zhandarovich@fintech.ru>
2024-01-19 14:04 ` syzbot
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.