mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
[NETFILTER]: xt_sctp: fix endless loop caused by 0 chunk length
Fix endless loop in the SCTP match similar to those already fixed in the SCTP conntrack helper (was CVE-2006-1527). Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
25f42b6af0
commit
d3dcd4efe2
@ -62,7 +62,7 @@ match_packet(const struct sk_buff *skb,
|
||||
|
||||
do {
|
||||
sch = skb_header_pointer(skb, offset, sizeof(_sch), &_sch);
|
||||
if (sch == NULL) {
|
||||
if (sch == NULL || sch->length == 0) {
|
||||
duprintf("Dropping invalid SCTP packet.\n");
|
||||
*hotdrop = 1;
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user