projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c080b46
)
netfilter: nf_conntrack_h323: fix off-by-one in DecodeQ931
author
Toby DiPasquale
<
[email protected]
>
Mon, 11 Jul 2016 10:32:45 +0000
(11:32 +0100)
committer
Pablo Neira Ayuso
<
[email protected]
>
Mon, 11 Jul 2016 10:32:45 +0000
(12:32 +0200)
This patch corrects an off-by-one error in the DecodeQ931 function in
the nf_conntrack_h323 module. This error could result in reading off
the end of a Q.931 frame.
Signed-off-by: Toby DiPasquale <
[email protected]
>
Signed-off-by: Pablo Neira Ayuso <
[email protected]
>
net/netfilter/nf_conntrack_h323_asn1.c
patch
|
blob
|
history
diff --git
a/net/netfilter/nf_conntrack_h323_asn1.c
b/net/netfilter/nf_conntrack_h323_asn1.c
index bcd5ed6b713048e781f73f91e80a0e055eafb6d5..89b2e46925c4bed5d19f6522ab6f45c02c5b0b95 100644
(file)
--- a/
net/netfilter/nf_conntrack_h323_asn1.c
+++ b/
net/netfilter/nf_conntrack_h323_asn1.c
@@
-846,9
+846,10
@@
int DecodeQ931(unsigned char *buf, size_t sz, Q931 *q931)
sz -= len;
/* Message Type */
- if (sz <
1
)
+ if (sz <
2
)
return H323_ERROR_BOUND;
q931->MessageType = *p++;
+ sz--;
PRINT("MessageType = %02X\n", q931->MessageType);
if (*p & 0x80) {
p++;