Date: Tue, 17 May 2016 22:28:53 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300090 - head/sys/kern Message-ID: <201605172228.u4HMSrrf012226@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Tue May 17 22:28:53 2016 New Revision: 300090 URL: https://svnweb.freebsd.org/changeset/base/300090 Log: Validate that user supplied control message length is not negative. Submitted by: C Turt <cturt hardenedbsd.org> Security: SA-16:19 Security: CVE-2016-1887 Modified: head/sys/kern/uipc_syscalls.c Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Tue May 17 22:28:42 2016 (r300089) +++ head/sys/kern/uipc_syscalls.c Tue May 17 22:28:53 2016 (r300090) @@ -1699,6 +1699,9 @@ sockargs(mp, buf, buflen, type) struct mbuf *m; int error; + if (buflen < 0) + return (EINVAL); + if (buflen > MLEN) { #ifdef COMPAT_OLDSOCK if (type == MT_SONAME && buflen <= 112)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605172228.u4HMSrrf012226>