svn commit: r343784 - head/sys/kern
Mark Johnston
markj at FreeBSD.org
Tue Feb 5 17:55:09 UTC 2019
Author: markj
Date: Tue Feb 5 17:55:08 2019
New Revision: 343784
URL: https://svnweb.freebsd.org/changeset/base/343784
Log:
Avoid leaking fp references when truncating SCM_RIGHTS control messages.
Reported by: pho
Approved by: so
MFC after: 0 minutes
Security: CVE-2019-5596
Sponsored by: The FreeBSD Foundation
Modified:
head/sys/kern/uipc_syscalls.c
Modified: head/sys/kern/uipc_syscalls.c
==============================================================================
--- head/sys/kern/uipc_syscalls.c Tue Feb 5 17:54:09 2019 (r343783)
+++ head/sys/kern/uipc_syscalls.c Tue Feb 5 17:55:08 2019 (r343784)
@@ -1605,8 +1605,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;
More information about the svn-src-all
mailing list