projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
74973f6
)
netfilter: nf_ct_sip: validate Content-Length in TCP SIP messages
author
Patrick McHardy
<kaber@trash.net>
Mon, 16 May 2011 12:42:26 +0000
(14:42 +0200)
committer
Patrick McHardy
<kaber@trash.net>
Mon, 16 May 2011 12:42:26 +0000
(14:42 +0200)
Verify that the message length of a single SIP message, which is calculated
based on the Content-Length field contained in the SIP message, does not
exceed the packet boundaries.
Signed-off-by: Patrick McHardy <kaber@trash.net>
net/netfilter/nf_conntrack_sip.c
patch
|
blob
|
blame
|
history
diff --git
a/net/netfilter/nf_conntrack_sip.c
b/net/netfilter/nf_conntrack_sip.c
index bcf47eb518effb4645440a6f64726089984eaeb7..1f81abde131fc64b7af2d3ee325077f3884e72e7 100644
(file)
--- a/
net/netfilter/nf_conntrack_sip.c
+++ b/
net/netfilter/nf_conntrack_sip.c
@@
-1461,6
+1461,8
@@
static int sip_help_tcp(struct sk_buff *skb, unsigned int protoff,
end += strlen("\r\n\r\n") + clen;
msglen = origlen = end - dptr;
+ if (msglen > datalen)
+ return NF_DROP;
ret = process_sip_msg(skb, ct, dataoff, &dptr, &msglen);
if (ret != NF_ACCEPT)