Date: Tue, 9 Aug 2022 20:00:24 GMT From: Mark Johnston <markj@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: c864c8cf08a9 - releng/13.0 - aio_aqueue(): avoid ucred leak on failure path Message-ID: <202208092000.279K0O6f030909@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch releng/13.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c864c8cf08a9dc197612d5ffffd239aa72de7c97 commit c864c8cf08a9dc197612d5ffffd239aa72de7c97 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2021-09-24 00:14:56 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2022-07-25 20:01:25 +0000 aio_aqueue(): avoid ucred leak on failure path Approved by: so Security: FreeBSD-SA-22:10.aio PR: 258698 (cherry picked from commit 45c2c7c484de7747014492b17ff89e323ee66496) (cherry picked from commit 9499d3c1e40dfeb1f63f61af7cdf25ee27f9a2ec) --- sys/kern/vfs_aio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c index 9b45a06c5f9f..80b7c3ac94e9 100644 --- a/sys/kern/vfs_aio.c +++ b/sys/kern/vfs_aio.c @@ -1698,7 +1698,7 @@ no_kqueue: else error = fo_aio_queue(fp, job); if (error) - goto err3; + goto err4; AIO_LOCK(ki); job->jobflags &= ~KAIOCB_QUEUEING; @@ -1719,6 +1719,8 @@ no_kqueue: AIO_UNLOCK(ki); return (0); +err4: + crfree(job->cred); err3: if (fp) fdrop(fp, td);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202208092000.279K0O6f030909>