From: Greg KH <gregkh@linuxfoundation.org>
To: jianqi.ren.cn@windriver.com
Cc: stable@vger.kernel.org, paul@paul-moore.com,
stephen.smalley.work@gmail.com, eparis@parisplace.org,
selinux@vger.kernel.org, cgzones@googlemail.com,
patches@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 6.1.y] selinux: avoid dereference of garbage after mount failure
Date: Tue, 20 May 2025 13:18:37 +0200 [thread overview]
Message-ID: <2025052025-alias-sublime-c6b0@gregkh> (raw)
In-Reply-To: <20250512014400.3326099-1-jianqi.ren.cn@windriver.com>
On Mon, May 12, 2025 at 09:44:00AM +0800, jianqi.ren.cn@windriver.com wrote:
> From: Christian Göttsche <cgzones@googlemail.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@vger.kernel.org
> Fixes: 0619f0f5e36f ("selinux: wrap selinuxfs state")
> Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
> Signed-off-by: Paul Moore <paul@paul-moore.com>
> Signed-off-by: Jianqi Ren <jianqi.ren.cn@windriver.com>
> Signed-off-by: He Zhe <zhe.he@windriver.com>
> ---
> Verified the build test
No you did not :(
prev parent reply other threads:[~2025-05-20 11:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-12 1:44 [PATCH 6.1.y] selinux: avoid dereference of garbage after mount failure jianqi.ren.cn
2025-05-12 21:52 ` Sasha Levin
2025-05-20 11:18 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2025052025-alias-sublime-c6b0@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=cgzones@googlemail.com \
--cc=eparis@parisplace.org \
--cc=jianqi.ren.cn@windriver.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@lists.linux.dev \
--cc=paul@paul-moore.com \
--cc=selinux@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=stephen.smalley.work@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox