]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 4.19
authorSasha Levin <sashal@kernel.org>
Fri, 25 Oct 2024 10:20:41 +0000 (06:20 -0400)
committerSasha Levin <sashal@kernel.org>
Fri, 25 Oct 2024 10:20:41 +0000 (06:20 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-4.19/jfs-fix-sanity-check-in-dbmount.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/jfs-fix-sanity-check-in-dbmount.patch b/queue-4.19/jfs-fix-sanity-check-in-dbmount.patch
new file mode 100644 (file)
index 0000000..a0a54d9
--- /dev/null
@@ -0,0 +1,35 @@
+From 64745ae29fac92128aff2ed539b51765189f4cc8 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 22 Oct 2024 09:40:37 -0500
+Subject: jfs: Fix sanity check in dbMount
+
+From: Dave Kleikamp <dave.kleikamp@oracle.com>
+
+[ Upstream commit 67373ca8404fe57eb1bb4b57f314cff77ce54932 ]
+
+MAXAG is a legitimate value for bmp->db_numag
+
+Fixes: e63866a47556 ("jfs: fix out-of-bounds in dbNextAG() and diAlloc()")
+
+Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ fs/jfs/jfs_dmap.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c
+index 21597e8b727c6..b6c698fe7301d 100644
+--- a/fs/jfs/jfs_dmap.c
++++ b/fs/jfs/jfs_dmap.c
+@@ -200,7 +200,7 @@ int dbMount(struct inode *ipbmap)
+       }
+       bmp->db_numag = le32_to_cpu(dbmp_le->dn_numag);
+-      if (!bmp->db_numag || bmp->db_numag >= MAXAG) {
++      if (!bmp->db_numag || bmp->db_numag > MAXAG) {
+               err = -EINVAL;
+               goto err_release_metapage;
+       }
+-- 
+2.43.0
+
index 752c2aed7fea56cdc565dacfa14b1d7ef60021e1..b271011e3716679f8bded65bcbe70ea02c2f8589 100644 (file)
@@ -306,3 +306,4 @@ kvm-s390-gaccess-refactor-access-address-range-check.patch
 kvm-s390-gaccess-cleanup-access-to-guest-pages.patch
 kvm-s390-gaccess-check-if-guest-address-is-in-memslo.patch
 udf-fix-uninit-value-use-in-udf_get_fileshortad.patch
+jfs-fix-sanity-check-in-dbmount.patch