summaryrefslogtreecommitdiffstats
path: root/net/sctp/input.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2021-10-18 13:51:43 +0100
committerMark Brown <broonie@kernel.org>2021-10-18 13:51:43 +0100
commited96f35cecb0a7d1d95bbba8b9f212e60d0f7480 (patch)
tree15fe5f3dc395c3b1e713ad52bcd529b1a343cfe2 /net/sctp/input.c
parent72bf80cf09c4693780ad93a31b48fa5a4e17a946 (diff)
parent519d81956ee277b4419c723adfb154603c2565ba (diff)
downloadlinux-stable-ed96f35cecb0a7d1d95bbba8b9f212e60d0f7480.tar.gz
linux-stable-ed96f35cecb0a7d1d95bbba8b9f212e60d0f7480.tar.bz2
linux-stable-ed96f35cecb0a7d1d95bbba8b9f212e60d0f7480.zip
Merge tag 'v5.15-rc6' into regulator-5.16
Linux 5.15-rc6
Diffstat (limited to 'net/sctp/input.c')
-rw-r--r--net/sctp/input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sctp/input.c b/net/sctp/input.c
index 5ef86fdb1176..1f1786021d9c 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -702,7 +702,7 @@ static int sctp_rcv_ootb(struct sk_buff *skb)
ch = skb_header_pointer(skb, offset, sizeof(*ch), &_ch);
/* Break out if chunk length is less then minimal. */
- if (ntohs(ch->length) < sizeof(_ch))
+ if (!ch || ntohs(ch->length) < sizeof(_ch))
break;
ch_end = offset + SCTP_PAD4(ntohs(ch->length));