diff options
author | Andrew Morton <[email protected]> | 2023-02-02 18:07:35 -0800 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2023-02-03 17:52:25 -0800 |
commit | a5b21d8d791cd4db609d0bbcaa9e0c7e019888d1 (patch) | |
tree | a3f4ef2bd300eb947cd195b52e0efd7e162114dc | |
parent | 388bc034d91d480efa88abc5c8d6e6c8a878b1ab (diff) |
revert "squashfs: harden sanity check in squashfs_read_xattr_id_table"
This fix was nacked by Philip, for reasons identified in the email linked
below.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 72e544b1b28325 ("squashfs: harden sanity check in squashfs_read_xattr_id_table")
Cc: Alexey Khoroshilov <[email protected]>
Cc: Fedor Pchelkin <[email protected]>
Cc: Phillip Lougher <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
-rw-r--r-- | fs/squashfs/xattr_id.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/squashfs/xattr_id.c b/fs/squashfs/xattr_id.c index b88d19e9581e..c8469c656e0d 100644 --- a/fs/squashfs/xattr_id.c +++ b/fs/squashfs/xattr_id.c @@ -76,7 +76,7 @@ __le64 *squashfs_read_xattr_id_table(struct super_block *sb, u64 table_start, /* Sanity check values */ /* there is always at least one xattr id */ - if (*xattr_ids <= 0) + if (*xattr_ids == 0) return ERR_PTR(-EINVAL); len = SQUASHFS_XATTR_BLOCK_BYTES(*xattr_ids); |