Skip to content

Commit a5b21d8

Browse files
committed
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: 72e544b ("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]>
1 parent 388bc03 commit a5b21d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/squashfs/xattr_id.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ __le64 *squashfs_read_xattr_id_table(struct super_block *sb, u64 table_start,
7676
/* Sanity check values */
7777

7878
/* there is always at least one xattr id */
79-
if (*xattr_ids <= 0)
79+
if (*xattr_ids == 0)
8080
return ERR_PTR(-EINVAL);
8181

8282
len = SQUASHFS_XATTR_BLOCK_BYTES(*xattr_ids);

0 commit comments

Comments
 (0)