2020-11-20 15:18:57

by syzbot

[permalink] [raw]
Subject: memory leak in hub_event

Hello,

syzbot found the following issue on:

HEAD commit: 4d02da97 Merge tag 'net-5.10-rc5' of git://git.kernel.org/..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=13a7d2b6500000
kernel config: https://syzkaller.appspot.com/x/.config?x=c5353ac514ca5a43
dashboard link: https://syzkaller.appspot.com/bug?extid=44e64397bd81d5e84cba
compiler: gcc (GCC) 10.1.0-syz 20200507
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14925089500000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16810051500000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: [email protected]

BUG: memory leak
unreferenced object 0xffff88810d5ff800 (size 2048):
comm "kworker/1:0", pid 17, jiffies 4294949188 (age 14.280s)
hex dump (first 32 bytes):
ff ff ff ff 31 00 00 00 00 00 00 00 00 00 00 00 ....1...........
00 00 00 00 00 00 00 00 00 00 00 00 03 00 00 00 ................
backtrace:
[<00000000f0428224>] kmalloc include/linux/slab.h:552 [inline]
[<00000000f0428224>] kzalloc include/linux/slab.h:664 [inline]
[<00000000f0428224>] usb_alloc_dev+0x32/0x450 drivers/usb/core/usb.c:582
[<000000001802b3dd>] hub_port_connect drivers/usb/core/hub.c:5128 [inline]
[<000000001802b3dd>] hub_port_connect_change drivers/usb/core/hub.c:5362 [inline]
[<000000001802b3dd>] port_event drivers/usb/core/hub.c:5508 [inline]
[<000000001802b3dd>] hub_event+0x118d/0x20d0 drivers/usb/core/hub.c:5590
[<0000000092d3650d>] process_one_work+0x27d/0x590 kernel/workqueue.c:2272
[<00000000d4629ab0>] worker_thread+0x59/0x5d0 kernel/workqueue.c:2418
[<000000003c358b45>] kthread+0x178/0x1b0 kernel/kthread.c:292
[<000000003689dbb0>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296

BUG: memory leak
unreferenced object 0xffff888112544c40 (size 32):
comm "kworker/1:0", pid 17, jiffies 4294949188 (age 14.280s)
hex dump (first 32 bytes):
31 2d 31 00 00 00 00 00 00 00 00 00 00 00 00 00 1-1.............
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<00000000d0f4aa93>] kvasprintf+0x6c/0xf0 lib/kasprintf.c:25
[<000000005866b3ad>] kvasprintf_const+0x58/0x110 lib/kasprintf.c:49
[<00000000b590b008>] kobject_set_name_vargs+0x3b/0xe0 lib/kobject.c:289
[<00000000d251a578>] dev_set_name+0x63/0x90 drivers/base/core.c:2722
[<0000000075b37c03>] usb_alloc_dev+0x1ee/0x450 drivers/usb/core/usb.c:650
[<000000001802b3dd>] hub_port_connect drivers/usb/core/hub.c:5128 [inline]
[<000000001802b3dd>] hub_port_connect_change drivers/usb/core/hub.c:5362 [inline]
[<000000001802b3dd>] port_event drivers/usb/core/hub.c:5508 [inline]
[<000000001802b3dd>] hub_event+0x118d/0x20d0 drivers/usb/core/hub.c:5590
[<0000000092d3650d>] process_one_work+0x27d/0x590 kernel/workqueue.c:2272
[<00000000d4629ab0>] worker_thread+0x59/0x5d0 kernel/workqueue.c:2418
[<000000003c358b45>] kthread+0x178/0x1b0 kernel/kthread.c:292
[<000000003689dbb0>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296

BUG: memory leak
unreferenced object 0xffff888112544ce0 (size 32):
comm "kworker/1:0", pid 17, jiffies 4294949231 (age 13.850s)
hex dump (first 32 bytes):
00 4d 54 12 81 88 ff ff 00 00 00 00 00 00 00 00 .MT.............
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<000000005516ca37>] kmalloc include/linux/slab.h:557 [inline]
[<000000005516ca37>] kzalloc include/linux/slab.h:664 [inline]
[<000000005516ca37>] usb_get_configuration+0xce/0x1dd0 drivers/usb/core/config.c:887
[<000000009ab33a39>] usb_enumerate_device drivers/usb/core/hub.c:2387 [inline]
[<000000009ab33a39>] usb_new_device+0x1a9/0x2e0 drivers/usb/core/hub.c:2523
[<0000000069b10350>] hub_port_connect drivers/usb/core/hub.c:5222 [inline]
[<0000000069b10350>] hub_port_connect_change drivers/usb/core/hub.c:5362 [inline]
[<0000000069b10350>] port_event drivers/usb/core/hub.c:5508 [inline]
[<0000000069b10350>] hub_event+0x144a/0x20d0 drivers/usb/core/hub.c:5590
[<0000000092d3650d>] process_one_work+0x27d/0x590 kernel/workqueue.c:2272
[<00000000d4629ab0>] worker_thread+0x59/0x5d0 kernel/workqueue.c:2418
[<000000003c358b45>] kthread+0x178/0x1b0 kernel/kthread.c:292
[<000000003689dbb0>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296

BUG: memory leak
unreferenced object 0xffff888112544bc0 (size 32):
comm "kworker/1:0", pid 17, jiffies 4294949247 (age 13.690s)
hex dump (first 32 bytes):
73 79 7a 00 00 00 00 00 00 00 00 00 00 00 00 00 syz.............
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<00000000b344f779>] kmalloc include/linux/slab.h:557 [inline]
[<00000000b344f779>] usb_cache_string+0x8a/0xf0 drivers/usb/core/message.c:1025
[<0000000074577e65>] usb_enumerate_device drivers/usb/core/hub.c:2397 [inline]
[<0000000074577e65>] usb_new_device+0x98/0x2e0 drivers/usb/core/hub.c:2523
[<0000000069b10350>] hub_port_connect drivers/usb/core/hub.c:5222 [inline]
[<0000000069b10350>] hub_port_connect_change drivers/usb/core/hub.c:5362 [inline]
[<0000000069b10350>] port_event drivers/usb/core/hub.c:5508 [inline]
[<0000000069b10350>] hub_event+0x144a/0x20d0 drivers/usb/core/hub.c:5590
[<0000000092d3650d>] process_one_work+0x27d/0x590 kernel/workqueue.c:2272
[<00000000d4629ab0>] worker_thread+0x59/0x5d0 kernel/workqueue.c:2418
[<000000003c358b45>] kthread+0x178/0x1b0 kernel/kthread.c:292
[<000000003689dbb0>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296

BUG: memory leak
unreferenced object 0xffff888112544cc0 (size 32):
comm "kworker/1:0", pid 17, jiffies 4294949251 (age 13.650s)
hex dump (first 32 bytes):
73 79 7a 00 00 00 00 00 00 00 00 00 00 00 00 00 syz.............
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<00000000b344f779>] kmalloc include/linux/slab.h:557 [inline]
[<00000000b344f779>] usb_cache_string+0x8a/0xf0 drivers/usb/core/message.c:1025
[<000000003d5bd90b>] usb_enumerate_device drivers/usb/core/hub.c:2398 [inline]
[<000000003d5bd90b>] usb_new_device+0xae/0x2e0 drivers/usb/core/hub.c:2523
[<0000000069b10350>] hub_port_connect drivers/usb/core/hub.c:5222 [inline]
[<0000000069b10350>] hub_port_connect_change drivers/usb/core/hub.c:5362 [inline]
[<0000000069b10350>] port_event drivers/usb/core/hub.c:5508 [inline]
[<0000000069b10350>] hub_event+0x144a/0x20d0 drivers/usb/core/hub.c:5590
[<0000000092d3650d>] process_one_work+0x27d/0x590 kernel/workqueue.c:2272
[<00000000d4629ab0>] worker_thread+0x59/0x5d0 kernel/workqueue.c:2418
[<000000003c358b45>] kthread+0x178/0x1b0 kernel/kthread.c:292
[<000000003689dbb0>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296

BUG: memory leak
unreferenced object 0xffff888112544d40 (size 32):
comm "kworker/1:0", pid 17, jiffies 4294949255 (age 13.610s)
hex dump (first 32 bytes):
73 79 7a 00 00 00 00 00 00 00 00 00 00 00 00 00 syz.............
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<00000000b344f779>] kmalloc include/linux/slab.h:557 [inline]
[<00000000b344f779>] usb_cache_string+0x8a/0xf0 drivers/usb/core/message.c:1025
[<000000007392d5f6>] usb_enumerate_device drivers/usb/core/hub.c:2400 [inline]
[<000000007392d5f6>] usb_new_device+0xc4/0x2e0 drivers/usb/core/hub.c:2523
[<0000000069b10350>] hub_port_connect drivers/usb/core/hub.c:5222 [inline]
[<0000000069b10350>] hub_port_connect_change drivers/usb/core/hub.c:5362 [inline]
[<0000000069b10350>] port_event drivers/usb/core/hub.c:5508 [inline]
[<0000000069b10350>] hub_event+0x144a/0x20d0 drivers/usb/core/hub.c:5590
[<0000000092d3650d>] process_one_work+0x27d/0x590 kernel/workqueue.c:2272
[<00000000d4629ab0>] worker_thread+0x59/0x5d0 kernel/workqueue.c:2418
[<000000003c358b45>] kthread+0x178/0x1b0 kernel/kthread.c:292
[<000000003689dbb0>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296

write to /proc/sys/kernel/hung_task_check_interval_secs failed: No such file or directory
write to /proc/sys/kernel/softlockup_all_cpu_backtrace failed: No such file or directory


---
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 [email protected].

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


2020-11-20 16:59:27

by Alan Stern

[permalink] [raw]
Subject: Re: memory leak in hub_event

On Fri, Nov 20, 2020 at 07:15:20AM -0800, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 4d02da97 Merge tag 'net-5.10-rc5' of git://git.kernel.org/..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=13a7d2b6500000
> kernel config: https://syzkaller.appspot.com/x/.config?x=c5353ac514ca5a43
> dashboard link: https://syzkaller.appspot.com/bug?extid=44e64397bd81d5e84cba
> compiler: gcc (GCC) 10.1.0-syz 20200507
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14925089500000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16810051500000
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: [email protected]
>
> BUG: memory leak
> unreferenced object 0xffff88810d5ff800 (size 2048):
> comm "kworker/1:0", pid 17, jiffies 4294949188 (age 14.280s)
> hex dump (first 32 bytes):
> ff ff ff ff 31 00 00 00 00 00 00 00 00 00 00 00 ....1...........
> 00 00 00 00 00 00 00 00 00 00 00 00 03 00 00 00 ................
> backtrace:
> [<00000000f0428224>] kmalloc include/linux/slab.h:552 [inline]
> [<00000000f0428224>] kzalloc include/linux/slab.h:664 [inline]
> [<00000000f0428224>] usb_alloc_dev+0x32/0x450 drivers/usb/core/usb.c:582
> [<000000001802b3dd>] hub_port_connect drivers/usb/core/hub.c:5128 [inline]
> [<000000001802b3dd>] hub_port_connect_change drivers/usb/core/hub.c:5362 [inline]
> [<000000001802b3dd>] port_event drivers/usb/core/hub.c:5508 [inline]
> [<000000001802b3dd>] hub_event+0x118d/0x20d0 drivers/usb/core/hub.c:5590
> [<0000000092d3650d>] process_one_work+0x27d/0x590 kernel/workqueue.c:2272
> [<00000000d4629ab0>] worker_thread+0x59/0x5d0 kernel/workqueue.c:2418
> [<000000003c358b45>] kthread+0x178/0x1b0 kernel/kthread.c:292
> [<000000003689dbb0>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296

This looks like a reference is being taken but not released. Hard to
tell where it's happening, though. Let's try to narrow it down.

Alan Stern

#syz test: upstream 4d02da97

Index: usb-devel/drivers/media/usb/gspca/gspca.c
===================================================================
--- usb-devel.orig/drivers/media/usb/gspca/gspca.c
+++ usb-devel/drivers/media/usb/gspca/gspca.c
@@ -1489,6 +1489,8 @@ int gspca_dev_probe2(struct usb_interfac
}

gspca_dev->v4l2_dev.release = gspca_release;
+ ret = -EIO;
+ goto out;
ret = v4l2_device_register(&intf->dev, &gspca_dev->v4l2_dev);
if (ret)
goto out;

2020-11-20 16:59:52

by syzbot

[permalink] [raw]
Subject: Re: Re: memory leak in hub_event

> On Fri, Nov 20, 2020 at 07:15:20AM -0800, syzbot wrote:
>> Hello,
>>
>> syzbot found the following issue on:
>>
>> HEAD commit: 4d02da97 Merge tag 'net-5.10-rc5' of git://git.kernel.org/..
>> git tree: upstream
>> console output: https://syzkaller.appspot.com/x/log.txt?x=13a7d2b6500000
>> kernel config: https://syzkaller.appspot.com/x/.config?x=c5353ac514ca5a43
>> dashboard link: https://syzkaller.appspot.com/bug?extid=44e64397bd81d5e84cba
>> compiler: gcc (GCC) 10.1.0-syz 20200507
>> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14925089500000
>> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16810051500000
>>
>> IMPORTANT: if you fix the issue, please add the following tag to the commit:
>> Reported-by: [email protected]
>>
>> BUG: memory leak
>> unreferenced object 0xffff88810d5ff800 (size 2048):
>> comm "kworker/1:0", pid 17, jiffies 4294949188 (age 14.280s)
>> hex dump (first 32 bytes):
>> ff ff ff ff 31 00 00 00 00 00 00 00 00 00 00 00 ....1...........
>> 00 00 00 00 00 00 00 00 00 00 00 00 03 00 00 00 ................
>> backtrace:
>> [<00000000f0428224>] kmalloc include/linux/slab.h:552 [inline]
>> [<00000000f0428224>] kzalloc include/linux/slab.h:664 [inline]
>> [<00000000f0428224>] usb_alloc_dev+0x32/0x450 drivers/usb/core/usb.c:582
>> [<000000001802b3dd>] hub_port_connect drivers/usb/core/hub.c:5128 [inline]
>> [<000000001802b3dd>] hub_port_connect_change drivers/usb/core/hub.c:5362 [inline]
>> [<000000001802b3dd>] port_event drivers/usb/core/hub.c:5508 [inline]
>> [<000000001802b3dd>] hub_event+0x118d/0x20d0 drivers/usb/core/hub.c:5590
>> [<0000000092d3650d>] process_one_work+0x27d/0x590 kernel/workqueue.c:2272
>> [<00000000d4629ab0>] worker_thread+0x59/0x5d0 kernel/workqueue.c:2418
>> [<000000003c358b45>] kthread+0x178/0x1b0 kernel/kthread.c:292
>> [<000000003689dbb0>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296
>
> This looks like a reference is being taken but not released. Hard to
> tell where it's happening, though. Let's try to narrow it down.
>
> Alan Stern
>
> #syz test: upstream 4d02da97

"upstream" does not look like a valid git repo address.

>
> Index: usb-devel/drivers/media/usb/gspca/gspca.c
> ===================================================================
> --- usb-devel.orig/drivers/media/usb/gspca/gspca.c
> +++ usb-devel/drivers/media/usb/gspca/gspca.c
> @@ -1489,6 +1489,8 @@ int gspca_dev_probe2(struct usb_interfac
> }
>
> gspca_dev->v4l2_dev.release = gspca_release;
> + ret = -EIO;
> + goto out;
> ret = v4l2_device_register(&intf->dev, &gspca_dev->v4l2_dev);
> if (ret)
> goto out;

2020-11-20 17:05:59

by Alan Stern

[permalink] [raw]
Subject: Re: Re: memory leak in hub_event

On Fri, Nov 20, 2020 at 08:56:11AM -0800, syzbot wrote:
> > On Fri, Nov 20, 2020 at 07:15:20AM -0800, syzbot wrote:
> >> Hello,
> >>
> >> syzbot found the following issue on:
> >>
> >> HEAD commit: 4d02da97 Merge tag 'net-5.10-rc5' of git://git.kernel.org/..
> >> git tree: upstream
> >> console output: https://syzkaller.appspot.com/x/log.txt?x=13a7d2b6500000
> >> kernel config: https://syzkaller.appspot.com/x/.config?x=c5353ac514ca5a43
> >> dashboard link: https://syzkaller.appspot.com/bug?extid=44e64397bd81d5e84cba
> >> compiler: gcc (GCC) 10.1.0-syz 20200507
> >> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14925089500000
> >> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16810051500000

> > #syz test: upstream 4d02da97
>
> "upstream" does not look like a valid git repo address.

Okay, Andrey. If "upstream" is not accepted as a valid git repo
address, why does syzkaller list it on the "git tree:" line? It seems
to me that syzkaller should be willing to accept as input anything it
produces as output.

And what repo should I put here?

Alan Stern

2020-11-23 18:32:37

by Andrey Konovalov

[permalink] [raw]
Subject: Re: Re: memory leak in hub_event

On Fri, Nov 20, 2020 at 6:00 PM Alan Stern <[email protected]> wrote:
>
> On Fri, Nov 20, 2020 at 08:56:11AM -0800, syzbot wrote:
> > > On Fri, Nov 20, 2020 at 07:15:20AM -0800, syzbot wrote:
> > >> Hello,
> > >>
> > >> syzbot found the following issue on:
> > >>
> > >> HEAD commit: 4d02da97 Merge tag 'net-5.10-rc5' of git://git.kernel.org/..
> > >> git tree: upstream
> > >> console output: https://syzkaller.appspot.com/x/log.txt?x=13a7d2b6500000
> > >> kernel config: https://syzkaller.appspot.com/x/.config?x=c5353ac514ca5a43
> > >> dashboard link: https://syzkaller.appspot.com/bug?extid=44e64397bd81d5e84cba
> > >> compiler: gcc (GCC) 10.1.0-syz 20200507
> > >> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14925089500000
> > >> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16810051500000
>
> > > #syz test: upstream 4d02da97
> >
> > "upstream" does not look like a valid git repo address.
>
> Okay, Andrey. If "upstream" is not accepted as a valid git repo
> address, why does syzkaller list it on the "git tree:" line? It seems
> to me that syzkaller should be willing to accept as input anything it
> produces as output.
>
> And what repo should I put here?

Hi Alan,

Yeah, this is confusing, sorry. I've filed
https://github.com/google/syzkaller/issues/2265 for this.

Here "upstream" stands for the mainline tree, so something like this
should work:

#syz test: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
4d02da97

Thanks!


Attachments:
gspca.patch (445.00 B)

2020-11-23 18:48:50

by syzbot

[permalink] [raw]
Subject: Re: memory leak in hub_event

Hello,

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

write to /proc/sys/kernel/hung_task_check_interval_secs failed: No such file or directory
write to /proc/sys/kernel/softlockup_all_cpu_backtrace failed: No such file or directory
BUG: memory leak
unreferenced object 0xffff888117824d00 (size 256):
comm "syz-executor.6", pid 8896, jiffies 4294943994 (age 432.900s)
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 ad 17 81 88 ff ff ................
backtrace:
[<0000000069b066ee>] kmalloc include/linux/slab.h:552 [inline]
[<0000000069b066ee>] kzalloc include/linux/slab.h:664 [inline]
[<0000000069b066ee>] rxrpc_alloc_local net/rxrpc/local_object.c:79 [inline]
[<0000000069b066ee>] rxrpc_lookup_local+0x1c1/0x760 net/rxrpc/local_object.c:244
[<0000000085db7132>] rxrpc_bind+0x174/0x240 net/rxrpc/af_rxrpc.c:149
[<00000000a2a77c59>] afs_open_socket+0xdb/0x200 fs/afs/rxrpc.c:64
[<0000000086f4a248>] afs_net_init+0x2b4/0x340 fs/afs/main.c:126
[<00000000fafe7caa>] ops_init+0x4e/0x190 net/core/net_namespace.c:152
[<00000000c3d26710>] setup_net+0xdb/0x2d0 net/core/net_namespace.c:342
[<000000001d81d993>] copy_net_ns+0x14b/0x320 net/core/net_namespace.c:483
[<0000000058b54b80>] create_new_namespaces+0x199/0x4e0 kernel/nsproxy.c:110
[<00000000cd2a2042>] unshare_nsproxy_namespaces+0x9b/0x120 kernel/nsproxy.c:231
[<00000000f7907f96>] ksys_unshare+0x2fe/0x5c0 kernel/fork.c:2949
[<0000000050cbc28c>] __do_sys_unshare kernel/fork.c:3017 [inline]
[<0000000050cbc28c>] __se_sys_unshare kernel/fork.c:3015 [inline]
[<0000000050cbc28c>] __x64_sys_unshare+0x12/0x20 kernel/fork.c:3015
[<00000000ade5a609>] do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
[<000000003424d3b0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

BUG: memory leak
unreferenced object 0xffff8881182a6700 (size 256):
comm "syz-executor.2", pid 8885, jiffies 4294943999 (age 432.850s)
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 b7 16 81 88 ff ff ................
backtrace:
[<0000000069b066ee>] kmalloc include/linux/slab.h:552 [inline]
[<0000000069b066ee>] kzalloc include/linux/slab.h:664 [inline]
[<0000000069b066ee>] rxrpc_alloc_local net/rxrpc/local_object.c:79 [inline]
[<0000000069b066ee>] rxrpc_lookup_local+0x1c1/0x760 net/rxrpc/local_object.c:244
[<0000000085db7132>] rxrpc_bind+0x174/0x240 net/rxrpc/af_rxrpc.c:149
[<00000000a2a77c59>] afs_open_socket+0xdb/0x200 fs/afs/rxrpc.c:64
[<0000000086f4a248>] afs_net_init+0x2b4/0x340 fs/afs/main.c:126
[<00000000fafe7caa>] ops_init+0x4e/0x190 net/core/net_namespace.c:152
[<00000000c3d26710>] setup_net+0xdb/0x2d0 net/core/net_namespace.c:342
[<000000001d81d993>] copy_net_ns+0x14b/0x320 net/core/net_namespace.c:483
[<0000000058b54b80>] create_new_namespaces+0x199/0x4e0 kernel/nsproxy.c:110
[<00000000cd2a2042>] unshare_nsproxy_namespaces+0x9b/0x120 kernel/nsproxy.c:231
[<00000000f7907f96>] ksys_unshare+0x2fe/0x5c0 kernel/fork.c:2949
[<0000000050cbc28c>] __do_sys_unshare kernel/fork.c:3017 [inline]
[<0000000050cbc28c>] __se_sys_unshare kernel/fork.c:3015 [inline]
[<0000000050cbc28c>] __x64_sys_unshare+0x12/0x20 kernel/fork.c:3015
[<00000000ade5a609>] do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
[<000000003424d3b0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

BUG: memory leak
unreferenced object 0xffff888118395100 (size 256):
comm "syz-executor.4", pid 8892, jiffies 4294944000 (age 432.840s)
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 8b 17 81 88 ff ff ................
backtrace:
[<0000000069b066ee>] kmalloc include/linux/slab.h:552 [inline]
[<0000000069b066ee>] kzalloc include/linux/slab.h:664 [inline]
[<0000000069b066ee>] rxrpc_alloc_local net/rxrpc/local_object.c:79 [inline]
[<0000000069b066ee>] rxrpc_lookup_local+0x1c1/0x760 net/rxrpc/local_object.c:244
[<0000000085db7132>] rxrpc_bind+0x174/0x240 net/rxrpc/af_rxrpc.c:149
[<00000000a2a77c59>] afs_open_socket+0xdb/0x200 fs/afs/rxrpc.c:64
[<0000000086f4a248>] afs_net_init+0x2b4/0x340 fs/afs/main.c:126
[<00000000fafe7caa>] ops_init+0x4e/0x190 net/core/net_namespace.c:152
[<00000000c3d26710>] setup_net+0xdb/0x2d0 net/core/net_namespace.c:342
[<000000001d81d993>] copy_net_ns+0x14b/0x320 net/core/net_namespace.c:483
[<0000000058b54b80>] create_new_namespaces+0x199/0x4e0 kernel/nsproxy.c:110
[<00000000cd2a2042>] unshare_nsproxy_namespaces+0x9b/0x120 kernel/nsproxy.c:231
[<00000000f7907f96>] ksys_unshare+0x2fe/0x5c0 kernel/fork.c:2949
[<0000000050cbc28c>] __do_sys_unshare kernel/fork.c:3017 [inline]
[<0000000050cbc28c>] __se_sys_unshare kernel/fork.c:3015 [inline]
[<0000000050cbc28c>] __x64_sys_unshare+0x12/0x20 kernel/fork.c:3015
[<00000000ade5a609>] do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
[<000000003424d3b0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

BUG: memory leak
unreferenced object 0xffff8881116e0f00 (size 256):
comm "syz-executor.7", pid 8894, jiffies 4294944002 (age 432.820s)
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 b9 17 81 88 ff ff ................
backtrace:
[<0000000069b066ee>] kmalloc include/linux/slab.h:552 [inline]
[<0000000069b066ee>] kzalloc include/linux/slab.h:664 [inline]
[<0000000069b066ee>] rxrpc_alloc_local net/rxrpc/local_object.c:79 [inline]
[<0000000069b066ee>] rxrpc_lookup_local+0x1c1/0x760 net/rxrpc/local_object.c:244
[<0000000085db7132>] rxrpc_bind+0x174/0x240 net/rxrpc/af_rxrpc.c:149
[<00000000a2a77c59>] afs_open_socket+0xdb/0x200 fs/afs/rxrpc.c:64
[<0000000086f4a248>] afs_net_init+0x2b4/0x340 fs/afs/main.c:126
[<00000000fafe7caa>] ops_init+0x4e/0x190 net/core/net_namespace.c:152
[<00000000c3d26710>] setup_net+0xdb/0x2d0 net/core/net_namespace.c:342
[<000000001d81d993>] copy_net_ns+0x14b/0x320 net/core/net_namespace.c:483
[<0000000058b54b80>] create_new_namespaces+0x199/0x4e0 kernel/nsproxy.c:110
[<00000000cd2a2042>] unshare_nsproxy_namespaces+0x9b/0x120 kernel/nsproxy.c:231
[<00000000f7907f96>] ksys_unshare+0x2fe/0x5c0 kernel/fork.c:2949
[<0000000050cbc28c>] __do_sys_unshare kernel/fork.c:3017 [inline]
[<0000000050cbc28c>] __se_sys_unshare kernel/fork.c:3015 [inline]
[<0000000050cbc28c>] __x64_sys_unshare+0x12/0x20 kernel/fork.c:3015
[<00000000ade5a609>] do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
[<000000003424d3b0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

write to /proc/sys/kernel/hung_task_check_interval_secs failed: No such file or directory
write to /proc/sys/kernel/softlockup_all_cpu_backtrace failed: No such file or directory


Tested on:

commit: 4d02da97 Merge tag 'net-5.10-rc5' of git://git.kernel.org/..
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=134bda0d500000
kernel config: https://syzkaller.appspot.com/x/.config?x=b29e92cdfa2687df
dashboard link: https://syzkaller.appspot.com/bug?extid=44e64397bd81d5e84cba
compiler: gcc (GCC) 10.1.0-syz 20200507
patch: https://syzkaller.appspot.com/x/patch.diff?x=10d4463e500000