diff options
author | Patrick McHardy <kaber@trash.net> | 2007-01-30 14:25:24 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-01-30 14:25:24 -0800 |
commit | adcb4711101dfef89d473f64a913089d303962ae (patch) | |
tree | c582cac3adbfd25fe09f91f9a62cfdbcfcb62714 /net/netfilter | |
parent | 7da5bfbb12e327b3a347ee3e076957cd6564eb56 (diff) |
[NETFILTER]: SIP conntrack: fix out of bounds memory access
When checking for an @-sign in skp_epaddr_len, make sure not to
run over the packet boundaries.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/nf_conntrack_sip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c index c93fb37a54f..9dec1153467 100644 --- a/net/netfilter/nf_conntrack_sip.c +++ b/net/netfilter/nf_conntrack_sip.c @@ -312,7 +312,7 @@ static int skp_epaddr_len(struct nf_conn *ct, const char *dptr, dptr++; } - if (*dptr == '@') { + if (dptr <= limit && *dptr == '@') { dptr++; (*shift)++; } else |