Author: gordon
Date: Wed Mar  7 17:16:41 2018
New Revision: 330611
URL: https://svnweb.freebsd.org/changeset/base/330611

Log:
  Correct patch for ipsec vulnerability.
  
  Approved by:  so
  Security:     FreeBSD-SA-18:01.netipsec

Modified:
  releng/10.3/sys/netipsec/xform_ah.c
  releng/10.4/sys/netipsec/xform_ah.c

Modified: releng/10.3/sys/netipsec/xform_ah.c
==============================================================================
--- releng/10.3/sys/netipsec/xform_ah.c Wed Mar  7 17:08:07 2018        
(r330610)
+++ releng/10.3/sys/netipsec/xform_ah.c Wed Mar  7 17:16:41 2018        
(r330611)
@@ -619,11 +619,11 @@ ah_input(struct mbuf *m, struct secasvar *sav, int ski
                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);
 

Modified: releng/10.4/sys/netipsec/xform_ah.c
==============================================================================
--- releng/10.4/sys/netipsec/xform_ah.c Wed Mar  7 17:08:07 2018        
(r330610)
+++ releng/10.4/sys/netipsec/xform_ah.c Wed Mar  7 17:16:41 2018        
(r330611)
@@ -619,11 +619,11 @@ ah_input(struct mbuf *m, struct secasvar *sav, int ski
                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);
 
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to