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/68f15d67-8945-2728-1f17-5b53a80ec52d@squashfs.org.uk Fixes: 72e544b ("squashfs: harden sanity check in squashfs_read_xattr_id_table") Cc: Alexey Khoroshilov <khoroshilov@ispras.ru> Cc: Fedor Pchelkin <pchelkin@ispras.ru> Cc: Phillip Lougher <phillip@squashfs.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 388bc03 commit a5b21d8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)