Date: Sun, 11 Aug 2019 20:34:16 +0000 (UTC) From: "George V. Neville-Neil" <gnn@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r350864 - stable/12/sys/net Message-ID: <201908112034.x7BKYGkI059985@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gnn Date: Sun Aug 11 20:34:16 2019 New Revision: 350864 URL: https://svnweb.freebsd.org/changeset/base/350864 Log: MFC: 350557 Properly validate arguments for route deletion Reported by: Liang Zhuo brightiup.zhuo@gmail.com Modified: stable/12/sys/net/route.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/route.c ============================================================================== --- stable/12/sys/net/route.c Sun Aug 11 19:17:29 2019 (r350863) +++ stable/12/sys/net/route.c Sun Aug 11 20:34:16 2019 (r350864) @@ -1553,6 +1553,8 @@ rtrequest1_fib(int req, struct rt_addrinfo *info, stru switch (req) { case RTM_DELETE: if (netmask) { + if (dst->sa_len > sizeof(mdst)) + return (EINVAL); rt_maskedcopy(dst, (struct sockaddr *)&mdst, netmask); dst = (struct sockaddr *)&mdst; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908112034.x7BKYGkI059985>