Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Sep 2021 22:44:30 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 258698] aio(4): ucred leak in aio_aqueue()'s failure path
Message-ID:  <bug-258698-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D258698

            Bug ID: 258698
           Summary: aio(4): ucred leak in aio_aqueue()'s failure path
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: sigsys@gmail.com

diff --git c/sys/kern/vfs_aio.c i/sys/kern/vfs_aio.c
index ebe91ff0fdaf..a3a099873ff1 100644
--- c/sys/kern/vfs_aio.c
+++ i/sys/kern/vfs_aio.c
@@ -1714,7 +1714,7 @@ aio_aqueue(struct thread *td, struct aiocb *ujob, str=
uct
aioliojob *lj,
        else
                error =3D fo_aio_queue(fp, job);
        if (error)
-               goto err3;
+               goto err4;

        AIO_LOCK(ki);
        job->jobflags &=3D ~KAIOCB_QUEUEING;
@@ -1735,6 +1735,8 @@ aio_aqueue(struct thread *td, struct aiocb *ujob, str=
uct
aioliojob *lj,
        AIO_UNLOCK(ki);
        return (0);

+err4:
+       crfree(job->cred);
 err3:
        if (fp)
                fdrop(fp, td);

--=20
You are receiving this mail because:
You are the assignee for the bug.=



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