Commit 6910e25d authored by Xin Long's avatar Xin Long Committed by David S. Miller

sctp: remove sctp_chunk_put from fail_mark err path in sctp_ulpevent_make_rcvmsg

In Commit 1f45f78f ("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: 1f45f78f ("sctp: allow GSO frags to access the chunk too")
Signed-off-by: default avatarXin Long <>
Acked-by: default avatarNeil Horman <>
Acked-by: default avatarMarcelo Ricardo Leitner <>
Signed-off-by: default avatarDavid S. Miller <>
parent a577d868
......@@ -715,7 +715,6 @@ struct sctp_ulpevent *sctp_ulpevent_make_rcvmsg(struct sctp_association *asoc,
return event;
return NULL;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment