Date: Sat, 25 Mar 2017 14:26:45 +0000 (UTC) From: Dmitry Chagin <dchagin@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: r315954 - stable/11/sys/compat/linux Message-ID: <201703251426.v2PEQk7h024917@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dchagin Date: Sat Mar 25 14:26:45 2017 New Revision: 315954 URL: https://svnweb.freebsd.org/changeset/base/315954 Log: MFC r315503: As noted by Roel Bouwman Linux allows a large buffer size than the struct ucred size. Fix this. PR: 102956 Modified: stable/11/sys/compat/linux/linux_socket.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linux/linux_socket.c ============================================================================== --- stable/11/sys/compat/linux/linux_socket.c Sat Mar 25 14:25:20 2017 (r315953) +++ stable/11/sys/compat/linux/linux_socket.c Sat Mar 25 14:26:45 2017 (r315954) @@ -1621,7 +1621,7 @@ linux_getsockopt(struct thread *td, stru /* NOTREACHED */ break; case LOCAL_PEERCRED: - if (args->optlen != sizeof(lxu)) + if (args->optlen < sizeof(lxu)) return (EINVAL); xulen = sizeof(xu); error = kern_getsockopt(td, args->s, bsd_args.level,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703251426.v2PEQk7h024917>