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;
}
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"