diff options
author | Xin Long <lucien.xin@gmail.com> | 2018-05-10 12:34:13 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-05-11 00:48:36 +0300 |
commit | 6910e25de2257e2c82c7a2d126e3463cd8e50810 (patch) | |
tree | 4f62bb31883657aee3d03961e715a5938df04519 /net/sctp | |
parent | a577d868b768a3baf16cdd4841ab8cfb165521d6 (diff) | |
download | linux-6910e25de2257e2c82c7a2d126e3463cd8e50810.tar.xz |
sctp: remove sctp_chunk_put from fail_mark err path in sctp_ulpevent_make_rcvmsg
In Commit 1f45f78f8e51 ("sctp: allow GSO frags to access the chunk too"),
it held the chunk in sctp_ulpevent_make_rcvmsg to access it safely later
in recvmsg. However, it also added sctp_chunk_put in fail_mark err path,
which is only triggered before holding the chunk.
syzbot reported a use-after-free crash happened on this err path, where
it shouldn't call sctp_chunk_put.
This patch simply removes this call.
Fixes: 1f45f78f8e51 ("sctp: allow GSO frags to access the chunk too")
Reported-by: syzbot+141d898c5f24489db4aa@syzkaller.appspotmail.com
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/ulpevent.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/net/sctp/ulpevent.c b/net/sctp/ulpevent.c index 84207ad33e8e..8cb7d9858270 100644 --- a/net/sctp/ulpevent.c +++ b/net/sctp/ulpevent.c @@ -715,7 +715,6 @@ struct sctp_ulpevent *sctp_ulpevent_make_rcvmsg(struct sctp_association *asoc, return event; fail_mark: - sctp_chunk_put(chunk); kfree_skb(skb); fail: return NULL; |