lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d7531388512379288c5719f152fc5ae5ecd8509a.camel@netapp.com>
Date:   Tue, 12 Nov 2019 18:47:01 +0000
From:   "Schumaker, Anna" <Anna.Schumaker@...app.com>
To:     "navid.emamdoost@...il.com" <navid.emamdoost@...il.com>,
        "trond.myklebust@...merspace.com" <trond.myklebust@...merspace.com>
CC:     "linux-nfs@...r.kernel.org" <linux-nfs@...r.kernel.org>,
        "emamd001@....edu" <emamd001@....edu>,
        "smccaman@....edu" <smccaman@....edu>,
        "kjlu@....edu" <kjlu@....edu>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] NFSv4: fix memory leak if nfs4_begin_drain_session fails

Hi Navid,

On Tue, 2019-11-05 at 23:37 -0600, Navid Emamdoost wrote:
> Would you please review this patch?

This memory leak was fixed by:

commit 1e672e3644940d83bd94e7cb46bac6bb3627de02
Author: Wenwen Wang <wenwen@...uga.edu>
Date:   Tue Aug 20 22:21:21 2019 -0500

    NFSv4: Fix a memory leak bug
    
    In nfs4_try_migration(), if nfs4_begin_drain_session() fails, the
    previously allocated 'page' and 'locations' are not deallocated, leading to
    memory leaks. To fix this issue, go to the 'out' label to free 'page' and
    'locations' before returning the error.
    
    Signed-off-by: Wenwen Wang <wenwen@...uga.edu>
    Signed-off-by: Anna Schumaker <Anna.Schumaker@...app.com>



And was included as part of the initial NFS merge for the v5.4-rc cycle.

Thanks,
Anna

> 
> On Thu, Sep 19, 2019 at 7:22 PM Navid Emamdoost
> <navid.emamdoost@...il.com> wrote:
> > In nfs4_try_migration, if nfs4_begin_drain_session fails the allocated
> > memory should be released.
> > 
> > Signed-off-by: Navid Emamdoost <navid.emamdoost@...il.com>
> > ---
> >  fs/nfs/nfs4state.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
> > index cad4e064b328..124649f12067 100644
> > --- a/fs/nfs/nfs4state.c
> > +++ b/fs/nfs/nfs4state.c
> > @@ -2096,7 +2096,7 @@ static int nfs4_try_migration(struct nfs_server
> > *server, const struct cred *cred
> > 
> >         status = nfs4_begin_drain_session(clp);
> >         if (status != 0)
> > -               return status;
> > +               goto out;
> > 
> >         status = nfs4_replace_transport(server, locations);
> >         if (status != 0) {
> > --
> > 2.17.1
> > 
> 
> --
> Navid.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ