From owner-svn-src-all@freebsd.org Wed Mar 7 17:16:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 392FDF41AB9; Wed, 7 Mar 2018 17:16:42 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DF83281ED3; Wed, 7 Mar 2018 17:16:41 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DA5C024ADE; Wed, 7 Mar 2018 17:16:41 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w27HGfr1030617; Wed, 7 Mar 2018 17:16:41 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w27HGfUZ030615; Wed, 7 Mar 2018 17:16:41 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <201803071716.w27HGfUZ030615@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Wed, 7 Mar 2018 17:16:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r330611 - in releng: 10.3/sys/netipsec 10.4/sys/netipsec X-SVN-Group: releng X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: in releng: 10.3/sys/netipsec 10.4/sys/netipsec X-SVN-Commit-Revision: 330611 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2018 17:16:42 -0000 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);