]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Drop queue-5.15/selinux-avoid-dereference-of-garbage-after-mount-fai.patch
authorSasha Levin <sashal@kernel.org>
Sun, 7 Apr 2024 19:34:23 +0000 (15:34 -0400)
committerSasha Levin <sashal@kernel.org>
Sun, 7 Apr 2024 19:34:23 +0000 (15:34 -0400)
queue-5.15/selinux-avoid-dereference-of-garbage-after-mount-fai.patch [deleted file]
queue-5.15/series

diff --git a/queue-5.15/selinux-avoid-dereference-of-garbage-after-mount-fai.patch b/queue-5.15/selinux-avoid-dereference-of-garbage-after-mount-fai.patch
deleted file mode 100644 (file)
index f0aac37..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-From 6d98c3c1fef632225f341c91f898f704c513a416 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Thu, 28 Mar 2024 20:16:58 +0100
-Subject: selinux: avoid dereference of garbage after mount failure
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Christian Göttsche <cgzones@googlemail.com>
-
-[ Upstream commit 37801a36b4d68892ce807264f784d818f8d0d39b ]
-
-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: Sasha Levin <sashal@kernel.org>
----
- security/selinux/selinuxfs.c | 12 +++++++-----
- 1 file changed, 7 insertions(+), 5 deletions(-)
-
-diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
-index f2f6203e0fff5..a96895d8bb6d7 100644
---- a/security/selinux/selinuxfs.c
-+++ b/security/selinux/selinuxfs.c
-@@ -2208,7 +2208,6 @@ static struct file_system_type sel_fs_type = {
-       .kill_sb        = sel_kill_sb,
- };
--static struct vfsmount *selinuxfs_mount __ro_after_init;
- struct path selinux_null __ro_after_init;
- static int __init init_sel_fs(void)
-@@ -2230,18 +2229,21 @@ static int __init init_sel_fs(void)
-               return err;
-       }
--      selinux_null.mnt = selinuxfs_mount = kern_mount(&sel_fs_type);
--      if (IS_ERR(selinuxfs_mount)) {
-+      selinux_null.mnt = kern_mount(&sel_fs_type);
-+      if (IS_ERR(selinux_null.mnt)) {
-               pr_err("selinuxfs:  could not mount!\n");
--              err = PTR_ERR(selinuxfs_mount);
--              selinuxfs_mount = NULL;
-+              err = PTR_ERR(selinux_null.mnt);
-+              selinux_null.mnt = NULL;
-+              return err;
-       }
-+
-       selinux_null.dentry = d_hash_and_lookup(selinux_null.mnt->mnt_root,
-                                               &null_name);
-       if (IS_ERR(selinux_null.dentry)) {
-               pr_err("selinuxfs:  could not lookup null!\n");
-               err = PTR_ERR(selinux_null.dentry);
-               selinux_null.dentry = NULL;
-+              return err;
-       }
-       return err;
--- 
-2.43.0
-
index d17244b40a6c7cec1a32596d48fa9e45bc99ab61..d3554d6fc642b9b72e7e3e55ab6de1f97156f6fb 100644 (file)
@@ -664,4 +664,3 @@ net-usb-asix-suspend-embedded-phy-if-external-is-use.patch
 drivers-net-convert-to-boolean-for-the-mac_managed_p.patch
 net-fec-set-mac_managed_pm-during-probe.patch
 net-ravb-always-process-tx-descriptor-ring.patch
-selinux-avoid-dereference-of-garbage-after-mount-fai.patch