syzbot


memory leak in sctp_stream_init

Status: fixed on 2020/02/14 01:19
Subsystems: sctp
[Documentation on labels]
Reported-by: syzbot+772d9e36c490b18d51d1@syzkaller.appspotmail.com
Fix commit: 951c6db954a1 sctp: fix memleak on err handling of stream initialization
First crash: 1755d, last: 1755d
Discussions (3)
Title Replies (including bot) Last reply
[PATCH 5.4 000/434] 5.4.7-stable review 465 (465) 2020/01/03 16:53
[PATCH net] sctp: fix memleak on err handling of stream initialization 5 (5) 2019/12/18 05:59
memory leak in sctp_stream_init 4 (5) 2019/12/17 11:53

Sample crash report:
BUG: memory leak
unreferenced object 0xffff8881080a3000 (size 4096):
  comm "syz-executor474", pid 7155, jiffies 4294942658 (age 15.870s)
  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:
    [<00000000df094087>] genradix_alloc_node lib/generic-radix-tree.c:90 [inline]
    [<00000000df094087>] __genradix_ptr_alloc+0xf5/0x250 lib/generic-radix-tree.c:122
    [<0000000057cfa7bb>] __genradix_prealloc+0x46/0x70 lib/generic-radix-tree.c:223
    [<0000000029d02dac>] sctp_stream_alloc_out.part.0+0x57/0x80 net/sctp/stream.c:86
    [<00000000bb930a04>] sctp_stream_alloc_out net/sctp/stream.c:151 [inline]
    [<00000000bb930a04>] sctp_stream_init+0x129/0x180 net/sctp/stream.c:129
    [<00000000ba13c246>] sctp_association_init net/sctp/associola.c:229 [inline]
    [<00000000ba13c246>] sctp_association_new+0x46e/0x700 net/sctp/associola.c:295
    [<000000008eb57b4d>] sctp_connect_new_asoc+0x90/0x220 net/sctp/socket.c:1070
    [<00000000ea24e048>] __sctp_connect+0x182/0x3b0 net/sctp/socket.c:1176
    [<00000000aa2c530a>] __sctp_setsockopt_connectx+0xa9/0xf0 net/sctp/socket.c:1322
    [<0000000018934bfd>] sctp_getsockopt_connectx3 net/sctp/socket.c:1407 [inline]
    [<0000000018934bfd>] sctp_getsockopt net/sctp/socket.c:8079 [inline]
    [<0000000018934bfd>] sctp_getsockopt+0x1394/0x32f6 net/sctp/socket.c:8010
    [<000000005fd7e3c8>] sock_common_getsockopt+0x38/0x50 net/core/sock.c:3108
    [<00000000333baf72>] __sys_getsockopt+0xa8/0x180 net/socket.c:2162
    [<00000000de0f98e4>] __do_sys_getsockopt net/socket.c:2177 [inline]
    [<00000000de0f98e4>] __se_sys_getsockopt net/socket.c:2174 [inline]
    [<00000000de0f98e4>] __x64_sys_getsockopt+0x26/0x30 net/socket.c:2174
    [<00000000cf1dfee9>] do_syscall_64+0x73/0x220 arch/x86/entry/common.c:294
    [<000000000f416860>] entry_SYSCALL_64_after_hwframe+0x44/0xa9


Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/12/14 22:42 upstream e31736d9fae8 eef6e580 .config console log report syz C ci-upstream-gce-leak
* Struck through repros no longer work on HEAD.