netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* memory leak in sctp_get_port_local (3)
@ 2019-10-14  2:49 syzbot
  2019-10-14 17:12 ` Xin Long
  0 siblings, 1 reply; 2+ messages in thread
From: syzbot @ 2019-10-14  2:49 UTC (permalink / raw)
  To: davem, linux-kernel, linux-sctp, marcelo.leitner, netdev,
	nhorman, syzkaller-bugs, vyasevich

Hello,

syzbot found the following crash on:

HEAD commit:    da940012 Merge tag 'char-misc-5.4-rc3' of git://git.kernel..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=11c87fc7600000
kernel config:  https://syzkaller.appspot.com/x/.config?x=e76c708f07645488
dashboard link: https://syzkaller.appspot.com/bug?extid=d44f7bbebdea49dbc84a
compiler:       gcc (GCC) 9.0.0 20181231 (experimental)
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=128d3f8b600000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=17ead04b600000

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

executing program
executing program
BUG: memory leak
unreferenced object 0xffff888120b3d380 (size 64):
   comm "syz-executor517", pid 6949, jiffies 4294941316 (age 13.400s)
   hex dump (first 32 bytes):
     23 4e 00 00 00 00 00 00 00 00 00 00 00 00 00 00  #N..............
     88 16 ef 24 81 88 ff ff 00 00 00 00 00 00 00 00  ...$............
   backtrace:
     [<000000006e6207b2>] kmemleak_alloc_recursive  
include/linux/kmemleak.h:43 [inline]
     [<000000006e6207b2>] slab_post_alloc_hook mm/slab.h:586 [inline]
     [<000000006e6207b2>] slab_alloc mm/slab.c:3319 [inline]
     [<000000006e6207b2>] kmem_cache_alloc+0x13f/0x2c0 mm/slab.c:3483
     [<00000000d0d058e2>] sctp_bucket_create net/sctp/socket.c:8523 [inline]
     [<00000000d0d058e2>] sctp_get_port_local+0x189/0x5a0  
net/sctp/socket.c:8270
     [<0000000082735c7f>] sctp_do_bind+0xcc/0x200 net/sctp/socket.c:402
     [<0000000080c8d55e>] sctp_bindx_add+0x4b/0xd0 net/sctp/socket.c:497
     [<00000000eb10f474>] sctp_setsockopt_bindx+0x156/0x1b0  
net/sctp/socket.c:1022
     [<000000004e959dd5>] sctp_setsockopt net/sctp/socket.c:4641 [inline]
     [<000000004e959dd5>] sctp_setsockopt+0xaea/0x2dc0 net/sctp/socket.c:4611
     [<000000000e9e767a>] sock_common_setsockopt+0x38/0x50  
net/core/sock.c:3147
     [<00000000a549638a>] __sys_setsockopt+0x10f/0x220 net/socket.c:2084
     [<000000003c15b96c>] __do_sys_setsockopt net/socket.c:2100 [inline]
     [<000000003c15b96c>] __se_sys_setsockopt net/socket.c:2097 [inline]
     [<000000003c15b96c>] __x64_sys_setsockopt+0x26/0x30 net/socket.c:2097
     [<00000000ee3ea8a3>] do_syscall_64+0x73/0x1f0  
arch/x86/entry/common.c:290
     [<000000006bf005e9>] 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 syzkaller@googlegroups.com.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: memory leak in sctp_get_port_local (3)
  2019-10-14  2:49 memory leak in sctp_get_port_local (3) syzbot
@ 2019-10-14 17:12 ` Xin Long
  0 siblings, 0 replies; 2+ messages in thread
From: Xin Long @ 2019-10-14 17:12 UTC (permalink / raw)
  To: syzbot
  Cc: davem, LKML, linux-sctp, Marcelo Ricardo Leitner, network dev,
	Neil Horman, syzkaller-bugs, Vlad Yasevich

On Mon, Oct 14, 2019 at 10:50 AM syzbot
<syzbot+d44f7bbebdea49dbc84a@syzkaller.appspotmail.com> wrote:
>
> Hello,
>
> syzbot found the following crash on:
>
> HEAD commit:    da940012 Merge tag 'char-misc-5.4-rc3' of git://git.kernel..
> git tree:       upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=11c87fc7600000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=e76c708f07645488
> dashboard link: https://syzkaller.appspot.com/bug?extid=d44f7bbebdea49dbc84a
> compiler:       gcc (GCC) 9.0.0 20181231 (experimental)
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=128d3f8b600000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=17ead04b600000
We probably need to add ".no_autobind = true" in sctp_prot to prevent
sendmsg() from going the path: inet_sendmsg()->inet_send_prepare()->
inet_autobind(), and leave sctp_sendmsg() to handle sctp_autobind().

will have a try tomorrow.

>
> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> Reported-by: syzbot+d44f7bbebdea49dbc84a@syzkaller.appspotmail.com
>
> executing program
> executing program
> BUG: memory leak
> unreferenced object 0xffff888120b3d380 (size 64):
>    comm "syz-executor517", pid 6949, jiffies 4294941316 (age 13.400s)
>    hex dump (first 32 bytes):
>      23 4e 00 00 00 00 00 00 00 00 00 00 00 00 00 00  #N..............
>      88 16 ef 24 81 88 ff ff 00 00 00 00 00 00 00 00  ...$............
>    backtrace:
>      [<000000006e6207b2>] kmemleak_alloc_recursive
> include/linux/kmemleak.h:43 [inline]
>      [<000000006e6207b2>] slab_post_alloc_hook mm/slab.h:586 [inline]
>      [<000000006e6207b2>] slab_alloc mm/slab.c:3319 [inline]
>      [<000000006e6207b2>] kmem_cache_alloc+0x13f/0x2c0 mm/slab.c:3483
>      [<00000000d0d058e2>] sctp_bucket_create net/sctp/socket.c:8523 [inline]
>      [<00000000d0d058e2>] sctp_get_port_local+0x189/0x5a0
> net/sctp/socket.c:8270
>      [<0000000082735c7f>] sctp_do_bind+0xcc/0x200 net/sctp/socket.c:402
>      [<0000000080c8d55e>] sctp_bindx_add+0x4b/0xd0 net/sctp/socket.c:497
>      [<00000000eb10f474>] sctp_setsockopt_bindx+0x156/0x1b0
> net/sctp/socket.c:1022
>      [<000000004e959dd5>] sctp_setsockopt net/sctp/socket.c:4641 [inline]
>      [<000000004e959dd5>] sctp_setsockopt+0xaea/0x2dc0 net/sctp/socket.c:4611
>      [<000000000e9e767a>] sock_common_setsockopt+0x38/0x50
> net/core/sock.c:3147
>      [<00000000a549638a>] __sys_setsockopt+0x10f/0x220 net/socket.c:2084
>      [<000000003c15b96c>] __do_sys_setsockopt net/socket.c:2100 [inline]
>      [<000000003c15b96c>] __se_sys_setsockopt net/socket.c:2097 [inline]
>      [<000000003c15b96c>] __x64_sys_setsockopt+0x26/0x30 net/socket.c:2097
>      [<00000000ee3ea8a3>] do_syscall_64+0x73/0x1f0
> arch/x86/entry/common.c:290
>      [<000000006bf005e9>] 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 syzkaller@googlegroups.com.
>
> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-14 17:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-14  2:49 memory leak in sctp_get_port_local (3) syzbot
2019-10-14 17:12 ` Xin Long

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).