--- zzzz-none-000/linux-4.4.271/fs/squashfs/xattr_id.c 2021-06-03 06:22:09.000000000 +0000 +++ dakota-7530ac-750/linux-4.4.271/fs/squashfs/xattr_id.c 2023-01-11 09:25:43.000000000 +0000 @@ -51,16 +51,16 @@ if (index >= msblk->xattr_ids) return -EINVAL; - start_block = le64_to_cpu(msblk->xattr_id_table[block]); + start_block = squash_le64_to_cpu(msblk->xattr_id_table[block]); err = squashfs_read_metadata(sb, &id, &start_block, &offset, sizeof(id)); if (err < 0) return err; - *xattr = le64_to_cpu(id.xattr); - *size = le32_to_cpu(id.size); - *count = le32_to_cpu(id.count); + *xattr = squash_le64_to_cpu(id.xattr); + *size = squash_le32_to_cpu(id.size); + *count = squash_le32_to_cpu(id.count); return 0; } @@ -82,8 +82,8 @@ if (IS_ERR(id_table)) return (__le64 *) id_table; - *xattr_table_start = le64_to_cpu(id_table->xattr_table_start); - *xattr_ids = le32_to_cpu(id_table->xattr_ids); + *xattr_table_start = squash_le64_to_cpu(id_table->xattr_table_start); + *xattr_ids = squash_le32_to_cpu(id_table->xattr_ids); kfree(id_table); /* Sanity check values */ @@ -119,8 +119,8 @@ * Finally xattr_table_start should be less than table[0]. */ for (n = 0; n < (indexes - 1); n++) { - start = le64_to_cpu(table[n]); - end = le64_to_cpu(table[n + 1]); + start = squash_le64_to_cpu(table[n]); + end = squash_le64_to_cpu(table[n + 1]); if (start >= end || (end - start) > (SQUASHFS_METADATA_SIZE + SQUASHFS_BLOCK_OFFSET)) { @@ -129,14 +129,14 @@ } } - start = le64_to_cpu(table[indexes - 1]); + start = squash_le64_to_cpu(table[indexes - 1]); if (start >= table_start || (table_start - start) > (SQUASHFS_METADATA_SIZE + SQUASHFS_BLOCK_OFFSET)) { kfree(table); return ERR_PTR(-EINVAL); } - if (*xattr_table_start >= le64_to_cpu(table[0])) { + if (*xattr_table_start >= squash_le64_to_cpu(table[0])) { kfree(table); return ERR_PTR(-EINVAL); }