Subject: memory leak in rxrpc_lookup_local

From: syzbot <[email-masked]>
Date: Tue, 22 Oct 2019 15:44:12 -0700

Hello,

syzbot found the following crash on:

HEAD commit:    4fe34d61 Merge branch 'x86-urgent-for-linus' of git://git...
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=11b21d40e00000
kernel config:  https://syzkaller.appspot.com/x/.config?x=cd7f8e43c7bdf83a
dashboard link: https://syzkaller.appspot.com/bug?extid=305326672fed51b205f7
compiler:       gcc (GCC) 9.0.0 20181231 (experimental)
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=10e692ff600000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=10af816b600000

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

BUG: memory leak
unreferenced object 0xffff888121f35e00 (size 256):
   comm "syz-executor362", pid 6892, jiffies 4294941791 (age 7.710s)
   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 09 00 00 00 00 80 e7 21 81 88 ff ff  ...........!....
   backtrace:
     [<000000006221752a>] kmemleak_alloc_recursive  
include/linux/kmemleak.h:43 [inline]
     [<000000006221752a>] slab_post_alloc_hook mm/slab.h:586 [inline]
     [<000000006221752a>] slab_alloc mm/slab.c:3319 [inline]
     [<000000006221752a>] kmem_cache_alloc_trace+0x145/0x2c0 mm/slab.c:3548
     [<000000006ee28c35>] kmalloc include/linux/slab.h:556 [inline]
     [<000000006ee28c35>] kzalloc include/linux/slab.h:690 [inline]
     [<000000006ee28c35>] rxrpc_alloc_local net/rxrpc/local_object.c:79  
[inline]
     [<000000006ee28c35>] rxrpc_lookup_local+0x1aa/0x750  
net/rxrpc/local_object.c:277
     [<000000009255b1c3>] rxrpc_bind+0x131/0x1e0 net/rxrpc/af_rxrpc.c:149
     [<00000000d7bcf378>] __sys_bind+0x11c/0x140 net/socket.c:1647
     [<00000000c269c3cb>] __do_sys_bind net/socket.c:1658 [inline]
     [<00000000c269c3cb>] __se_sys_bind net/socket.c:1656 [inline]
     [<00000000c269c3cb>] __x64_sys_bind+0x1e/0x30 net/socket.c:1656
     [<000000000444b7d1>] do_syscall_64+0x73/0x1f0  
arch/x86/entry/common.c:290
     [<000000001700d564>] 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 [email-masked].

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