aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGordon Tetlow <gordon@FreeBSD.org>2018-03-07 17:16:41 +0000
committerGordon Tetlow <gordon@FreeBSD.org>2018-03-07 17:16:41 +0000
commitaedcefc6b237e08aafd1d2935f1834afb6a466cd (patch)
treebcafedd35555c1b08b03f1bce3286bb40caf07a8
parent937fc455dc67f52f7a8efd13d20b45f329e0b073 (diff)
downloadsrc-aedcefc6b237e08aafd1d2935f1834afb6a466cd.tar.gz
src-aedcefc6b237e08aafd1d2935f1834afb6a466cd.zip
Correct patch for ipsec vulnerability.
Approved by: so Security: FreeBSD-SA-18:01.netipsec
Notes
Notes: svn path=/releng/10.3/; revision=330611
-rw-r--r--sys/netipsec/xform_ah.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netipsec/xform_ah.c b/sys/netipsec/xform_ah.c
index 3f678414c322..5593768842c9 100644
--- a/sys/netipsec/xform_ah.c
+++ b/sys/netipsec/xform_ah.c
@@ -619,11 +619,11 @@ ah_input(struct mbuf *m, struct secasvar *sav, int skip, int protoff)
DPRINTF(("%s: bad mbuf length %u (expecting %lu)"
" for packet in SA %s/%08lx\n", __func__,
m->m_pkthdr.len, (u_long) (skip + authsize + rplen),
- ipsec_address(&sav->sah->saidx.dst, buf, sizeof(buf)),
+ ipsec_address(&sav->sah->saidx.dst),
(u_long) ntohl(sav->spi)));
AHSTAT_INC(ahs_badauthl);
- error = EACCES;
- goto bad;
+ m_freem(m);
+ return EACCES;
}
AHSTAT_ADD(ahs_ibytes, m->m_pkthdr.len - skip - hl);