[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2025052025-alias-sublime-c6b0@gregkh>
Date: Tue, 20 May 2025 13:18:37 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: jianqi.ren.cn@...driver.com
Cc: stable@...r.kernel.org, paul@...l-moore.com,
stephen.smalley.work@...il.com, eparis@...isplace.org,
selinux@...r.kernel.org, cgzones@...glemail.com,
patches@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 6.1.y] selinux: avoid dereference of garbage after mount
failure
On Mon, May 12, 2025 at 09:44:00AM +0800, jianqi.ren.cn@...driver.com wrote:
> From: Christian Göttsche <cgzones@...glemail.com>
>
> commit 37801a36b4d68892ce807264f784d818f8d0d39b upstream.
>
> In case kern_mount() fails and returns an error pointer return in the
> error branch instead of continuing and dereferencing the error pointer.
>
> While on it drop the never read static variable selinuxfs_mount.
>
> Cc: stable@...r.kernel.org
> Fixes: 0619f0f5e36f ("selinux: wrap selinuxfs state")
> Signed-off-by: Christian Göttsche <cgzones@...glemail.com>
> Signed-off-by: Paul Moore <paul@...l-moore.com>
> Signed-off-by: Jianqi Ren <jianqi.ren.cn@...driver.com>
> Signed-off-by: He Zhe <zhe.he@...driver.com>
> ---
> Verified the build test
No you did not :(
Powered by blists - more mailing lists