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: <CAJfpegs4jRd=FrgDaLxcnbCKWCU=PrsdEzat58j0xB2XdTatZg@mail.gmail.com>
Date:   Fri, 15 Jul 2022 16:06:52 +0200
From:   Miklos Szeredi <miklos@...redi.hu>
To:     williamsukatube@....com
Cc:     linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        William Dean <williamsukatube@...il.com>,
        Hacash Robot <hacashRobot@...tino.com>
Subject: Re: [PATCH] fuse: Fix a potential memory leak for kstrdup()

On Fri, 15 Jul 2022 at 09:54, <williamsukatube@....com> wrote:
>
> From: William Dean <williamsukatube@...il.com>
>
> kfree() is missing on an error path to free the memory allocated by
> kstrdup():
>
>   sb->s_subtype = kstrdup(parent_sb->s_subtype, GFP_KERNEL);
>
> So it is better to free it via kfree(sb->s_subtype).

Not needed.  s_subtype will be freed in __put_super().

Thanks,
Miklos

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ