Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Aug 2019 17:46:23 +0000 (UTC)
From:      Ed Maste <emaste@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: r351257 - stable/11/sys/kern
Message-ID:  <201908201746.x7KHkNV4060785@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Tue Aug 20 17:46:22 2019
New Revision: 351257
URL: https://svnweb.freebsd.org/changeset/base/351257

Log:
  MFC r351254: mqueuefs: fix compat32 struct file leak
  
  In a compat32 error case we previously leaked a struct file.
  
  Submitted by:	Karsten König, Secfault Security
  Security:	CVE-2019-5603

Modified:
  stable/11/sys/kern/uipc_mqueue.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/kern/uipc_mqueue.c
==============================================================================
--- stable/11/sys/kern/uipc_mqueue.c	Tue Aug 20 17:45:44 2019	(r351256)
+++ stable/11/sys/kern/uipc_mqueue.c	Tue Aug 20 17:46:22 2019	(r351257)
@@ -2788,7 +2788,7 @@ freebsd32_kmq_timedsend(struct thread *td,
 	if (uap->abs_timeout != NULL) {
 		error = copyin(uap->abs_timeout, &ets32, sizeof(ets32));
 		if (error != 0)
-			return (error);
+			goto out;
 		CP(ets32, ets, tv_sec);
 		CP(ets32, ets, tv_nsec);
 		abs_timeout = &ets;
@@ -2797,6 +2797,7 @@ freebsd32_kmq_timedsend(struct thread *td,
 	waitok = !(fp->f_flag & O_NONBLOCK);
 	error = mqueue_send(mq, uap->msg_ptr, uap->msg_len,
 		uap->msg_prio, waitok, abs_timeout);
+out:
 	fdrop(fp, td);
 	return (error);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908201746.x7KHkNV4060785>