aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Kleikamp2020-11-13 14:58:46 -0600
committerGreg Kroah-Hartman2020-12-29 06:47:08 -0600
commit4a0809752ef23cd4be99b0cd8f7586c8ed7bd433 (patch)
tree3ec05b8c7c828d55e15b24ef43c0e138061a05fa
parent598618c38a77b43c4b70ab4f14657127a12cbf1e (diff)
downloadkernel-4a0809752ef23cd4be99b0cd8f7586c8ed7bd433.tar.gz
kernel-4a0809752ef23cd4be99b0cd8f7586c8ed7bd433.tar.xz
kernel-4a0809752ef23cd4be99b0cd8f7586c8ed7bd433.zip
jfs: Fix array index bounds check in dbAdjTree
commit c61b3e4839007668360ed8b87d7da96d2e59fc6c upstream. Bounds checking tools can flag a bug in dbAdjTree() for an array index out of bounds in dmt_stree. Since dmt_stree can refer to the stree in both structures dmaptree and dmapctl, use the larger array to eliminate the false positive. Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com> Reported-by: butt3rflyh4ck <butterflyhuangxx@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--fs/jfs/jfs_dmap.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/jfs/jfs_dmap.h b/fs/jfs/jfs_dmap.h
index 562b9a7e4311..f502a15c6c98 100644
--- a/fs/jfs/jfs_dmap.h
+++ b/fs/jfs/jfs_dmap.h
@@ -196,7 +196,7 @@ typedef union dmtree {
196#define dmt_leafidx t1.leafidx 196#define dmt_leafidx t1.leafidx
197#define dmt_height t1.height 197#define dmt_height t1.height
198#define dmt_budmin t1.budmin 198#define dmt_budmin t1.budmin
199#define dmt_stree t1.stree 199#define dmt_stree t2.stree
200 200
201/* 201/*
202 * on-disk aggregate disk allocation map descriptor. 202 * on-disk aggregate disk allocation map descriptor.