Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 May 2019 11:18:50 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r347687 - stable/11/sys/netinet6
Message-ID:  <201905161118.x4GBIoBS004056@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Thu May 16 11:18:50 2019
New Revision: 347687
URL: https://svnweb.freebsd.org/changeset/base/347687

Log:
  MFC r346401:
  
  Avoid a buffer overwrite in rip6_output() when computing the checksum
  as requested by the user via the IPPROTO_IPV6 level socket option
  IPV6_CHECKSUM. The check if there are enough bytes in the packet to
  store the checksum at the requested offset was wrong by 1.

Modified:
  stable/11/sys/netinet6/raw_ip6.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netinet6/raw_ip6.c
==============================================================================
--- stable/11/sys/netinet6/raw_ip6.c	Thu May 16 11:14:08 2019	(r347686)
+++ stable/11/sys/netinet6/raw_ip6.c	Thu May 16 11:18:50 2019	(r347687)
@@ -498,7 +498,7 @@ rip6_output(struct mbuf *m, struct socket *so, ...)
 			off = offsetof(struct icmp6_hdr, icmp6_cksum);
 		else
 			off = in6p->in6p_cksum;
-		if (plen < off + 1) {
+		if (plen < off + 2) {
 			error = EINVAL;
 			goto bad;
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905161118.x4GBIoBS004056>