Date: Tue, 5 Feb 2019 17:56:22 +0000 (UTC) From: Mark Johnston <markj@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: r343785 - stable/12/sys/kern Message-ID: <201902051756.x15HuMUX040972@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Tue Feb 5 17:56:22 2019 New Revision: 343785 URL: https://svnweb.freebsd.org/changeset/base/343785 Log: MFC r343784: Avoid leaking fp references when truncating SCM_RIGHTS control messages. Approved by: so Security: CVE-2019-5596 Modified: stable/12/sys/kern/uipc_syscalls.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/uipc_syscalls.c ============================================================================== --- stable/12/sys/kern/uipc_syscalls.c Tue Feb 5 17:55:08 2019 (r343784) +++ stable/12/sys/kern/uipc_syscalls.c Tue Feb 5 17:56:22 2019 (r343785) @@ -1607,8 +1607,10 @@ m_dispose_extcontrolm(struct mbuf *m) fd = *fds++; error = fget(td, fd, &cap_no_rights, &fp); - if (error == 0) + if (error == 0) { fdclose(td, fp, fd); + fdrop(fp, td); + } } } clen -= datalen;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902051756.x15HuMUX040972>