]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Mar 2023 08:49:27 +0000 (09:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Mar 2023 08:49:27 +0000 (09:49 +0100)
added patches:
ext4-fix-possible-double-unlock-when-moving-a-directory.patch

queue-5.15/ext4-fix-possible-double-unlock-when-moving-a-directory.patch [new file with mode: 0644]
queue-5.15/series

diff --git a/queue-5.15/ext4-fix-possible-double-unlock-when-moving-a-directory.patch b/queue-5.15/ext4-fix-possible-double-unlock-when-moving-a-directory.patch
new file mode 100644 (file)
index 0000000..eeeee6f
--- /dev/null
@@ -0,0 +1,33 @@
+From 70e42feab2e20618ddd0cbfc4ab4b08628236ecd Mon Sep 17 00:00:00 2001
+From: Theodore Ts'o <tytso@mit.edu>
+Date: Fri, 17 Mar 2023 21:53:52 -0400
+Subject: ext4: fix possible double unlock when moving a directory
+
+From: Theodore Ts'o <tytso@mit.edu>
+
+commit 70e42feab2e20618ddd0cbfc4ab4b08628236ecd upstream.
+
+Fixes: 0813299c586b ("ext4: Fix possible corruption when moving a directory")
+Link: https://lore.kernel.org/r/5efbe1b9-ad8b-4a4f-b422-24824d2b775c@kili.mountain
+Reported-by: Dan Carpenter <error27@gmail.com>
+Reported-by: syzbot+0c73d1d8b952c5f3d714@syzkaller.appspotmail.com
+Signed-off-by: Theodore Ts'o <tytso@mit.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/ext4/namei.c |    4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+--- a/fs/ext4/namei.c
++++ b/fs/ext4/namei.c
+@@ -3898,10 +3898,8 @@ static int ext4_rename(struct user_names
+                               goto end_rename;
+               }
+               retval = ext4_rename_dir_prepare(handle, &old);
+-              if (retval) {
+-                      inode_unlock(old.inode);
++              if (retval)
+                       goto end_rename;
+-              }
+       }
+       /*
+        * If we're renaming a file within an inline_data dir and adding or
index e29b87e31e60d7b014c954622bce0576d63537c2..04d500b0967c40fb97973e88f66be653d44bdba2 100644 (file)
@@ -70,3 +70,4 @@ drm-amdkfd-fix-an-illegal-memory-access.patch
 net-9p-fix-bug-in-client-create-for-.l.patch
 sh-intc-avoid-spurious-sizeof-pointer-div-warning.patch
 drm-amd-display-fix-shift-out-of-bounds-in-calculate.patch
+ext4-fix-possible-double-unlock-when-moving-a-directory.patch