memory leak in wacom_probe

11 views
Skip to first unread message

syzbot

unread,
Nov 12, 2020, 10:07:19 AM11/12/20
to benjamin....@redhat.com, ji...@kernel.org, linux...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: eccc8767 Merge branch 'fixes' of git://git.kernel.org/pub/..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=145055aa500000
kernel config: https://syzkaller.appspot.com/x/.config?x=a3f13716fa0212fd
dashboard link: https://syzkaller.appspot.com/bug?extid=5b49c9695968d7250a26
compiler: gcc (GCC) 10.1.0-syz 20200507
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16339ad6500000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1409f511500000

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

BUG: memory leak
unreferenced object 0xffff88810dc44a00 (size 512):
comm "kworker/1:2", pid 3674, jiffies 4294943617 (age 14.100s)
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:
[<0000000023e1afac>] kmalloc_array include/linux/slab.h:592 [inline]
[<0000000023e1afac>] __kfifo_alloc+0xad/0x100 lib/kfifo.c:43
[<00000000c477f737>] wacom_probe+0x1a1/0x3b0 drivers/hid/wacom_sys.c:2727
[<00000000b3109aca>] hid_device_probe+0x16b/0x210 drivers/hid/hid-core.c:2281
[<00000000aff7c640>] really_probe+0x159/0x480 drivers/base/dd.c:554
[<00000000778d0bc3>] driver_probe_device+0x84/0x100 drivers/base/dd.c:738
[<000000005108dbb5>] __device_attach_driver+0xee/0x110 drivers/base/dd.c:844
[<00000000efb7c59e>] bus_for_each_drv+0xb7/0x100 drivers/base/bus.c:431
[<0000000024ab1590>] __device_attach+0x122/0x250 drivers/base/dd.c:912
[<000000004c7ac048>] bus_probe_device+0xc6/0xe0 drivers/base/bus.c:491
[<00000000b93050a3>] device_add+0x5ac/0xc30 drivers/base/core.c:2936
[<00000000e5b46ea5>] hid_add_device+0x151/0x390 drivers/hid/hid-core.c:2437
[<00000000c6add147>] usbhid_probe+0x412/0x560 drivers/hid/usbhid/hid-core.c:1407
[<00000000c33acdb4>] usb_probe_interface+0x177/0x370 drivers/usb/core/driver.c:396
[<00000000aff7c640>] really_probe+0x159/0x480 drivers/base/dd.c:554
[<00000000778d0bc3>] driver_probe_device+0x84/0x100 drivers/base/dd.c:738
[<000000005108dbb5>] __device_attach_driver+0xee/0x110 drivers/base/dd.c:844



---
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 syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

unread,
Nov 21, 2020, 5:07:10 AM11/21/20
to syzkall...@googlegroups.com, tranma...@gmail.com
Hello,

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

BUG: memory leak
unreferenced object 0xffff8881174d2a00 (size 256):
comm "syz-executor.5", pid 8936, jiffies 4294943767 (age 433.450s)
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 0a 00 00 00 00 80 20 0c 81 88 ff ff .......... .....
backtrace:
[<0000000034241e1e>] kmalloc include/linux/slab.h:552 [inline]
[<0000000034241e1e>] kzalloc include/linux/slab.h:664 [inline]
[<0000000034241e1e>] rxrpc_alloc_local net/rxrpc/local_object.c:79 [inline]
[<0000000034241e1e>] rxrpc_lookup_local+0x1c1/0x760 net/rxrpc/local_object.c:244
[<000000008e525ddd>] rxrpc_bind+0x174/0x240 net/rxrpc/af_rxrpc.c:149
[<00000000a190d0f2>] afs_open_socket+0xdb/0x200 fs/afs/rxrpc.c:64
[<000000000c7529e9>] afs_net_init+0x2b4/0x340 fs/afs/main.c:126
[<00000000ecef0d4d>] ops_init+0x4e/0x190 net/core/net_namespace.c:152
[<0000000081c5fb7d>] setup_net+0xdb/0x2d0 net/core/net_namespace.c:342
[<0000000065e61a01>] copy_net_ns+0x14b/0x320 net/core/net_namespace.c:483
[<00000000aa45e037>] create_new_namespaces+0x199/0x4e0 kernel/nsproxy.c:110
[<00000000cd44ad75>] unshare_nsproxy_namespaces+0x9b/0x120 kernel/nsproxy.c:231
[<000000006c74af03>] ksys_unshare+0x2fe/0x5c0 kernel/fork.c:2949
[<00000000757544ef>] __do_sys_unshare kernel/fork.c:3017 [inline]
[<00000000757544ef>] __se_sys_unshare kernel/fork.c:3015 [inline]
[<00000000757544ef>] __x64_sys_unshare+0x12/0x20 kernel/fork.c:3015
[<00000000d953485b>] do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
[<00000000008a465b>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

BUG: memory leak
unreferenced object 0xffff8881173df800 (size 256):
comm "syz-executor.6", pid 8933, jiffies 4294943775 (age 433.370s)
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 0a 00 00 00 00 80 4c 16 81 88 ff ff ..........L.....
backtrace:
[<0000000034241e1e>] kmalloc include/linux/slab.h:552 [inline]
[<0000000034241e1e>] kzalloc include/linux/slab.h:664 [inline]
[<0000000034241e1e>] rxrpc_alloc_local net/rxrpc/local_object.c:79 [inline]
[<0000000034241e1e>] rxrpc_lookup_local+0x1c1/0x760 net/rxrpc/local_object.c:244
[<000000008e525ddd>] rxrpc_bind+0x174/0x240 net/rxrpc/af_rxrpc.c:149
[<00000000a190d0f2>] afs_open_socket+0xdb/0x200 fs/afs/rxrpc.c:64
[<000000000c7529e9>] afs_net_init+0x2b4/0x340 fs/afs/main.c:126
[<00000000ecef0d4d>] ops_init+0x4e/0x190 net/core/net_namespace.c:152
[<0000000081c5fb7d>] setup_net+0xdb/0x2d0 net/core/net_namespace.c:342
[<0000000065e61a01>] copy_net_ns+0x14b/0x320 net/core/net_namespace.c:483
[<00000000aa45e037>] create_new_namespaces+0x199/0x4e0 kernel/nsproxy.c:110
[<00000000cd44ad75>] unshare_nsproxy_namespaces+0x9b/0x120 kernel/nsproxy.c:231
[<000000006c74af03>] ksys_unshare+0x2fe/0x5c0 kernel/fork.c:2949
[<00000000757544ef>] __do_sys_unshare kernel/fork.c:3017 [inline]
[<00000000757544ef>] __se_sys_unshare kernel/fork.c:3015 [inline]
[<00000000757544ef>] __x64_sys_unshare+0x12/0x20 kernel/fork.c:3015
[<00000000d953485b>] do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
[<00000000008a465b>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

BUG: memory leak
unreferenced object 0xffff88811624be00 (size 256):
comm "syz-executor.3", pid 8932, jiffies 4294943776 (age 433.360s)
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 0a 00 00 00 00 c0 55 16 81 88 ff ff ..........U.....
backtrace:
[<0000000034241e1e>] kmalloc include/linux/slab.h:552 [inline]
[<0000000034241e1e>] kzalloc include/linux/slab.h:664 [inline]
[<0000000034241e1e>] rxrpc_alloc_local net/rxrpc/local_object.c:79 [inline]
[<0000000034241e1e>] rxrpc_lookup_local+0x1c1/0x760 net/rxrpc/local_object.c:244
[<000000008e525ddd>] rxrpc_bind+0x174/0x240 net/rxrpc/af_rxrpc.c:149
[<00000000a190d0f2>] afs_open_socket+0xdb/0x200 fs/afs/rxrpc.c:64
[<000000000c7529e9>] afs_net_init+0x2b4/0x340 fs/afs/main.c:126
[<00000000ecef0d4d>] ops_init+0x4e/0x190 net/core/net_namespace.c:152
[<0000000081c5fb7d>] setup_net+0xdb/0x2d0 net/core/net_namespace.c:342
[<0000000065e61a01>] copy_net_ns+0x14b/0x320 net/core/net_namespace.c:483
[<00000000aa45e037>] create_new_namespaces+0x199/0x4e0 kernel/nsproxy.c:110
[<00000000cd44ad75>] unshare_nsproxy_namespaces+0x9b/0x120 kernel/nsproxy.c:231
[<000000006c74af03>] ksys_unshare+0x2fe/0x5c0 kernel/fork.c:2949
[<00000000757544ef>] __do_sys_unshare kernel/fork.c:3017 [inline]
[<00000000757544ef>] __se_sys_unshare kernel/fork.c:3015 [inline]
[<00000000757544ef>] __x64_sys_unshare+0x12/0x20 kernel/fork.c:3015
[<00000000d953485b>] do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
[<00000000008a465b>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

BUG: memory leak
unreferenced object 0xffff88811659b400 (size 256):
comm "syz-executor.7", pid 8934, jiffies 4294943776 (age 433.360s)
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 0a 00 00 00 00 00 5b 16 81 88 ff ff ..........[.....
backtrace:
[<0000000034241e1e>] kmalloc include/linux/slab.h:552 [inline]
[<0000000034241e1e>] kzalloc include/linux/slab.h:664 [inline]
[<0000000034241e1e>] rxrpc_alloc_local net/rxrpc/local_object.c:79 [inline]
[<0000000034241e1e>] rxrpc_lookup_local+0x1c1/0x760 net/rxrpc/local_object.c:244
[<000000008e525ddd>] rxrpc_bind+0x174/0x240 net/rxrpc/af_rxrpc.c:149
[<00000000a190d0f2>] afs_open_socket+0xdb/0x200 fs/afs/rxrpc.c:64
[<000000000c7529e9>] afs_net_init+0x2b4/0x340 fs/afs/main.c:126
[<00000000ecef0d4d>] ops_init+0x4e/0x190 net/core/net_namespace.c:152
[<0000000081c5fb7d>] setup_net+0xdb/0x2d0 net/core/net_namespace.c:342
[<0000000065e61a01>] copy_net_ns+0x14b/0x320 net/core/net_namespace.c:483
[<00000000aa45e037>] create_new_namespaces+0x199/0x4e0 kernel/nsproxy.c:110
[<00000000cd44ad75>] unshare_nsproxy_namespaces+0x9b/0x120 kernel/nsproxy.c:231
[<000000006c74af03>] ksys_unshare+0x2fe/0x5c0 kernel/fork.c:2949
[<00000000757544ef>] __do_sys_unshare kernel/fork.c:3017 [inline]
[<00000000757544ef>] __se_sys_unshare kernel/fork.c:3015 [inline]
[<00000000757544ef>] __x64_sys_unshare+0x12/0x20 kernel/fork.c:3015
[<00000000d953485b>] do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
[<00000000008a465b>] entry_SYSCALL_64_after_hwframe+0x44/0xa9



Tested on:

commit: eccc8767 Merge branch 'fixes' of git://git.kernel.org/pub/..
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=1752e3b1500000
patch: https://syzkaller.appspot.com/x/patch.diff?x=135d6fde500000

Jiri Kosina

unread,
Nov 24, 2020, 3:44:21 AM11/24/20
to syzbot, benjamin....@redhat.com, linux...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com, Jason Gerecke, Ping Cheng
On Thu, 12 Nov 2020, syzbot wrote:

> Hello,
>
> syzbot found the following issue on:

CCing Jason and Ping, the maintainers of hid-wacom.
--
Jiri Kosina
SUSE Labs

Reply all
Reply to author
Forward
0 new messages