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: <CAHC9VhTD0Z=9M_7TRBoOUDgNigLyYCW2SgNAtaZdPj8nJNCV2Q@mail.gmail.com>
Date:   Mon, 20 Jun 2022 21:22:02 -0400
From:   Paul Moore <paul@...l-moore.com>
To:     Xiu Jianfeng <xiujianfeng@...wei.com>
Cc:     stephen.smalley.work@...il.com, eparis@...isplace.org,
        selinux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND -next] selinux: Let the caller free the momory in
 *mnt_opts on error

On Fri, Jun 17, 2022 at 5:46 AM Xiu Jianfeng <xiujianfeng@...wei.com> wrote:
>
> It may allocate memory for @mnt_opts if NULL in selinux_add_opt(), and
> now some error paths goto @err label to free memory while others don't,
> as suggested by Paul, don't free memory in case of error and let the
> caller to cleanup on error.
>
> And also this patch changes the @s NULL check to return -EINVAL instead.
>
> Link: https://lore.kernel.org/lkml/20220611090550.135674-1-xiujianfeng@huawei.com/T/
> Suggested-by: Paul Moore <paul@...l-moore.com>
> Signed-off-by: Xiu Jianfeng <xiujianfeng@...wei.com>
> ---
>  security/selinux/hooks.c | 11 ++++-------
>  1 file changed, 4 insertions(+), 7 deletions(-)

Thanks, merged into selinux/next with some rewording of the subject
line and commit description.

-- 
paul-moore.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ