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]
Date:   Wed, 2 Feb 2022 11:04:42 -0500
From:   Paul Moore <paul@...l-moore.com>
To:     vbendel@...hat.com
Cc:     stephen.smalley.work@...il.com, eparis@...isplace.org,
        omosnace@...hat.com, selinux@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] selinux: fix double free of cond_list on error paths

On Wed, Feb 2, 2022 at 6:25 AM <vbendel@...hat.com> wrote:
>
> From: Vratislav Bendel <vbendel@...hat.com>
>
> On error path from cond_read_list() and duplicate_policydb_cond_list()
> the cond_list_destroy() gets called a second time in caller functions,
> resulting in NULL pointer deref.
> Fix this by resetting the cond_list_len to 0 in cond_list_destroy(),
> making subsequent calls a noop.
>
> Also consistently reset the cond_list pointer to NULL after freeing.
>
> Signed-off-by: Vratislav Bendel <vbendel@...hat.com>
> ---
>  security/selinux/ss/conditional.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

I just merged this into selinux/stable-5.17 and I'll plan on sending
this up to Linus tomorrow, thanks Vratislav.

-- 
paul-moore.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ