Skip to content

Commit 3a7b21e

Browse files
kaberummakynes
authored andcommitted
netfilter: nf_ct_sip: don't drop packets with offsets pointing outside the packet
Some Cisco phones create huge messages that are spread over multiple packets. After calculating the offset of the SIP body, it is validated to be within the packet and the packet is dropped otherwise. This breaks operation of these phones. Since connection tracking is supposed to be passive, just let those packets pass unmodified and untracked. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
1 parent 53f6318 commit 3a7b21e

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

net/netfilter/nf_conntrack_sip.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1593,10 +1593,8 @@ static int sip_help_tcp(struct sk_buff *skb, unsigned int protoff,
15931593
end += strlen("\r\n\r\n") + clen;
15941594

15951595
msglen = origlen = end - dptr;
1596-
if (msglen > datalen) {
1597-
nf_ct_helper_log(skb, ct, "incomplete/bad SIP message");
1598-
return NF_DROP;
1599-
}
1596+
if (msglen > datalen)
1597+
return NF_ACCEPT;
16001598

16011599
ret = process_sip_msg(skb, ct, protoff, dataoff,
16021600
&dptr, &msglen);

0 commit comments

Comments
 (0)