Skip to content
OpenAdvisories
Unscored CVE-2023-52933 EUVD-2023-59757GHSA-f76f-mm36-mf6v

Squashfs: fix handling and sanity checking of xattr_ids count

Published Mar 27, 2025 · Updated May 23, 2026 · Assigned by Linux

Vendor: Linux Product: Linux Package: linux Package: linux Package: linux-allwinner-5.19 Package: linux-aws Package: linux-aws-5.0 Package: linux-aws-5.11 Package: linux-aws-5.13 Package: linux-aws-5.15 Package: linux-aws-5.19 Package: linux-aws-5.3 Package: linux-aws-5.4 Package: linux-aws-5.8 Package: linux-aws-6.2 Package: linux-aws-6.5 Package: linux-aws-fips Package: linux-aws-hwe Package: linux-azure Package: linux-azure-4.15 Package: linux-azure-5.11 Package: linux-azure-5.13 Package: linux-azure-5.15 Package: linux-azure-5.19 Package: linux-azure-5.3 Package: linux-azure-5.4 Package: linux-azure-5.8 Package: linux-azure-6.2 Package: linux-azure-6.5 Package: linux-azure-edge Package: linux-azure-fde Package: linux-azure-fde-5.19 Package: linux-azure-fde-6.2 Package: linux-azure-fips Package: linux-bluefield Package: linux-fips Package: linux-gcp Package: linux-gcp-4.15 Package: linux-gcp-5.11 Package: linux-gcp-5.13 Package: linux-gcp-5.15 Package: linux-gcp-5.19 Package: linux-gcp-5.3 Package: linux-gcp-5.4 Package: linux-gcp-5.8 Package: linux-gcp-6.2 Package: linux-gcp-6.5 Package: linux-gcp-fips Package: linux-gke Package: linux-gke-4.15 Package: linux-gke-5.15 Package: linux-gke-5.4 Package: linux-gkeop Package: linux-gkeop-5.15 Package: linux-gkeop-5.4 Package: linux-hwe Package: linux-hwe-5.11 Package: linux-hwe-5.13 Package: linux-hwe-5.15 Package: linux-hwe-5.19 Package: linux-hwe-5.4 Package: linux-hwe-5.8 Package: linux-hwe-6.2 Package: linux-hwe-6.5 Package: linux-hwe-edge Package: linux-ibm Package: linux-ibm-5.4 Package: linux-intel-5.13 Package: linux-intel-iot-realtime Package: linux-intel-iotg Package: linux-intel-iotg-5.15 Package: linux-iot Package: linux-kvm Package: linux-lowlatency Package: linux-lowlatency-hwe-5.15 Package: linux-lowlatency-hwe-5.19 Package: linux-lowlatency-hwe-6.2 Package: linux-lowlatency-hwe-6.5 Package: linux-lts-xenial Package: linux-nvidia Package: linux-nvidia-6.2 Package: linux-nvidia-6.5 Package: linux-nvidia-tegra-5.15 Package: linux-oem Package: linux-oem-5.10 Package: linux-oem-5.13 Package: linux-oem-5.14 Package: linux-oem-5.17 Package: linux-oem-5.6 Package: linux-oem-6.0 Package: linux-oem-6.1 Package: linux-oem-6.5 Package: linux-oracle Package: linux-oracle-5.0 Package: linux-oracle-5.11 Package: linux-oracle-5.13 Package: linux-oracle-5.15 Package: linux-oracle-5.3 Package: linux-oracle-5.4 Package: linux-oracle-5.8 Package: linux-oracle-6.5 Package: linux-raspi Package: linux-raspi-5.4 Package: linux-raspi-realtime Package: linux-raspi2 Package: linux-realtime Package: linux-riscv Package: linux-riscv-5.11 Package: linux-riscv-5.15 Package: linux-riscv-5.19 Package: linux-riscv-5.8 Package: linux-riscv-6.5 Package: linux-starfive-5.19 Package: linux-starfive-6.2 Package: linux-starfive-6.5 Package: linux-vmware Package: linux-xilinx-zynqmp Platform: Linux Ecosystem: Debian Ecosystem: Ubuntu

Description

In the Linux kernel, the following vulnerability has been resolved:

Squashfs: fix handling and sanity checking of xattr_ids count

A Sysbot [1] corrupted filesystem exposes two flaws in the handling and
sanity checking of the xattr_ids count in the filesystem. Both of these
flaws cause computation overflow due to incorrect typing.

In the corrupted filesystem the xattr_ids value is 4294967071, which
stored in a signed variable becomes the negative number -225.

Flaw 1 (64-bit systems only):

The signed integer xattr_ids variable causes sign extension.

This causes variable overflow in the SQUASHFS_XATTR_*(A) macros. The
variable is first multiplied by sizeof(struct squashfs_xattr_id) where the
type of the sizeof operator is "unsigned long".

On a 64-bit system this is 64-bits in size, and causes the negative number
to be sign extended and widened to 64-bits and then become unsigned. This
produces the very large number 18446744073709548016 or 2^64 - 3600. This
number when rounded up by SQUASHFS_METADATA_SIZE - 1 (8191 bytes) and
divided by SQUASHFS_METADATA_SIZE overflows and produces a length of 0
(stored in len).

Flaw 2 (32-bit systems only):

On a 32-bit system the integer variable is not widened by the unsigned
long type of the sizeof operator (32-bits), and the signedness of the
variable has no effect due it always being treated as unsigned.

The above corrupted xattr_ids value of 4294967071, when multiplied
overflows and produces the number 4294963696 or 2^32 - 3400. This number
when rounded up by SQUASHFS_METADATA_SIZE - 1 (8191 bytes) and divided by
SQUASHFS_METADATA_SIZE overflows again and produces a length of 0.

The effect of the 0 length computation:

In conjunction with the corrupted xattr_ids field, the filesystem also has
a corrupted xattr_table_start value, where it matches the end of
filesystem value of 850.

This causes the following sanity check code to fail because the
incorrectly computed len of 0 matches the incorrect size of the table
reported by the superblock (0 bytes).

len = SQUASHFS_XATTR_BLOCK_BYTES(*xattr_ids);
indexes = SQUASHFS_XATTR_BLOCKS(*xattr_ids);

/*
* The computed size of the index table (len bytes) should exactly
* match the table start and end points
*/
start = table_start + sizeof(*id_table);
end = msblk->bytes_used;

if (len != (end - start))
return ERR_PTR(-EINVAL);

Changing the xattr_ids variable to be "usigned int" fixes the flaw on a
64-bit system. This relies on the fact the computation is widened by the
unsigned long type of the sizeof operator.

Casting the variable to u64 in the above macro fixes this flaw on a 32-bit
system.

It also means 64-bit systems do not implicitly rely on the type of the
sizeof operator to widen the computation.

[1] https://lore.kernel.org/lkml/000000000000cd44f005f1a0f17f@google.com/

Affected products

VendorProductAffectedFixed
Linux Linux 4.14.222 – < 4.14.306, 4.19.176 – < 4.19.273, 5.4.98 – < 5.4.232, 5.10.16 – < 5.10.168, 4.4.258 – < 4.5, 4.9.258 – < 4.10, 5.11 4.14.306

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 linux 6.1.11-1 —
Debian 13 linux 6.1.11-1 —
Debian 12 linux 6.1.11-1 —
ReleasePackageFixed inAdvisory
Ubuntu Nvidia-BlueField 22.04 LTS linux-bluefield 5.15.0-1017.19 —
Ubuntu 24.04 LTS linux-realtime +1 No fix yet —
Ubuntu 22.04 LTS linux +1 5.15.0-72.79 —
Ubuntu 22.04 LTS linux-aws 5.15.0-1036.40 —
Ubuntu 22.04 LTS linux-azure 5.15.0-1038.45 —
Ubuntu 22.04 LTS linux-azure-fde 5.15.0-1038.45.1 —
Ubuntu 22.04 LTS linux-gcp 5.15.0-1034.42 —
Ubuntu 22.04 LTS linux-gke +1 5.15.0-1033.38 —
Ubuntu 22.04 LTS linux-gkeop 5.15.0-1020.25 —
Ubuntu 22.04 LTS linux-ibm 5.15.0-1030.33 —
Ubuntu 22.04 LTS linux-intel-iotg 5.15.0-1030.35 —
Ubuntu 22.04 LTS linux-nvidia 5.15.0-1025.25 —
Ubuntu 22.04 LTS linux-oracle 5.15.0-1035.41 —
Ubuntu 22.04 LTS linux-raspi 5.15.0-1029.31 —
Ubuntu 22.04 LTS linux-riscv +31 No fix yet —
Ubuntu 20.04 LTS linux 5.4.0-149.166 —
Ubuntu 20.04 LTS linux-aws 5.4.0-1102.110 —
Ubuntu 20.04 LTS linux-aws-5.15 5.15.0-1036.40~20.04.1 —
Ubuntu 20.04 LTS linux-azure 5.4.0-1108.114 —
Ubuntu 20.04 LTS linux-azure-5.15 5.15.0-1038.45~20.04.1 —
Ubuntu 20.04 LTS linux-bluefield 5.4.0-1064.70 —
Ubuntu 20.04 LTS linux-gcp 5.4.0-1105.114 —
Ubuntu 20.04 LTS linux-gcp-5.15 5.15.0-1034.42~20.04.1 —
Ubuntu 20.04 LTS linux-gke +28 No fix yet —
Ubuntu 20.04 LTS linux-hwe-5.15 +1 5.15.0-72.79~20.04.1 —
Ubuntu 20.04 LTS linux-ibm 5.4.0-1049.54 —
Ubuntu 20.04 LTS linux-intel-iotg-5.15 5.15.0-1030.35~20.04.1 —
Ubuntu 20.04 LTS linux-iot 5.4.0-1017.18 —
Ubuntu 20.04 LTS linux-kvm 5.4.0-1091.97 —
Ubuntu 20.04 LTS linux-nvidia-tegra-5.15 5.15.0-1014.14~20.04.1 —
Ubuntu 20.04 LTS linux-oracle 5.4.0-1101.110 —
Ubuntu 20.04 LTS linux-oracle-5.15 5.15.0-1035.41~20.04.1 —
Ubuntu 20.04 LTS linux-raspi 5.4.0-1085.96 —
Ubuntu 20.04 LTS linux-riscv-5.15 5.15.0-1033.37~20.04.1 —
Ubuntu 20.04 LTS linux-xilinx-zynqmp 5.4.0-1024.28 —
Ubuntu 18.04 LTS linux 4.15.0-211.222 —
Ubuntu 18.04 LTS linux-aws 4.15.0-1156.169 —
Ubuntu 18.04 LTS linux-aws-5.4 5.4.0-1103.111~18.04.1 —
Ubuntu 18.04 LTS linux-azure-4.15 4.15.0-1165.180 —
Ubuntu 18.04 LTS linux-azure-5.4 5.4.0-1108.114~18.04.1 —
Ubuntu 18.04 LTS linux-gcp +14 No fix yet —
Ubuntu 18.04 LTS linux-gcp-4.15 4.15.0-1150.166 —
Ubuntu 18.04 LTS linux-gcp-5.4 5.4.0-1105.114~18.04.1 —
Ubuntu 18.04 LTS linux-hwe-5.4 5.4.0-149.166~18.04.1 —
Ubuntu 18.04 LTS linux-ibm-5.4 5.4.0-1049.54~18.04.1 —
Ubuntu 18.04 LTS linux-kvm 4.15.0-1140.145 —
Ubuntu 18.04 LTS linux-oracle 4.15.0-1119.130 —
Ubuntu 18.04 LTS linux-oracle-5.4 5.4.0-1101.110~18.04.1 —
Ubuntu 18.04 LTS linux-raspi-5.4 5.4.0-1085.96~18.04.1 —
Show 8 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 16.04 LTS linux-hwe-edge No fix yet —
Ubuntu Pro Realtime 22.04 LTS linux-intel-iot-realtime 5.15.0-1028.33 —
Ubuntu Pro Realtime 22.04 LTS linux-realtime 5.15.0-1038.41 —
Ubuntu Pro FIPS 20.04 LTS linux-fips No fix yet —
Ubuntu Pro FIPS-updates 20.04 LTS linux-aws-fips 5.4.0-1102.110+fips1 —
Ubuntu Pro FIPS-updates 20.04 LTS linux-azure-fips 5.4.0-1108.114+fips1 —
Ubuntu Pro FIPS-updates 20.04 LTS linux-fips 5.4.0-1077.86 —
Ubuntu Pro FIPS-updates 20.04 LTS linux-gcp-fips 5.4.0-1105.114+fips1 —
Ubuntu Pro FIPS-updates 18.04 LTS linux-aws-fips 4.15.0-2095.101 —
Ubuntu Pro FIPS-updates 18.04 LTS linux-azure-fips 4.15.0-2074.80 —
Ubuntu Pro FIPS-updates 18.04 LTS linux-fips 4.15.0-1111.122 —
Ubuntu Pro FIPS-updates 18.04 LTS linux-gcp-fips 4.15.0-2058.63 —
Ubuntu Pro FIPS-updates 16.04 LTS linux-fips No fix yet —
Ubuntu Pro 16.04 LTS linux +2 No fix yet —
Ubuntu Pro 16.04 LTS linux-aws-hwe 4.15.0-1156.169~16.04.1 —
Ubuntu Pro 16.04 LTS linux-azure 4.15.0-1165.180~16.04.1 —
Ubuntu Pro 16.04 LTS linux-gcp 4.15.0-1150.166~16.04.1 —
Ubuntu Pro 16.04 LTS linux-hwe 4.15.0-211.222~16.04.1 —
Ubuntu Pro 16.04 LTS linux-oracle 4.15.0-1119.130~16.04.1 —
Ubuntu Pro 14.04 LTS linux-aws +1 No fix yet —
Ubuntu Pro 14.04 LTS linux-azure 4.15.0-1165.180~14.04.1 —
ReleasePackageFixed inAdvisory
RHEL 9 rv +77 5.14.0-570.24.1.el9_6 RHSA-2025:9880
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
RHEL 9.4 EUS bpftool 7.3.0-427.77.1.el9_4 RHSA-2025:11245
RHEL 9.4 EUS rv +64 5.14.0-427.77.1.el9_4 RHSA-2025:11245
RHEL 9.2 E4S bpftool 7.0.0-284.125.1.el9_2 RHSA-2025:11045
RHEL 9.2 E4S kernel-rt +14 5.14.0-284.125.1.rt14.410.el9_2 RHSA-2025:10527
RHEL 9.2 E4S perf +47 5.14.0-284.125.1.el9_2 RHSA-2025:11045
RHEL 9.0 E4S kernel-rt +12 5.14.0-70.138.1.rt21.210.el9_0 RHSA-2025:10829
RHEL 9.0 E4S perf +28 5.14.0-70.138.1.el9_0 RHSA-2025:10830

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 9 rv +75 5.14.0-570.24.1.el9_6 ALSA-2025:9880
ReleasePackageFixed inAdvisory
SLES 15 SP5 kernel-64kb +6 5.14.21-150500.55.100.1 SUSE-SU-2025:1241-1
SLES 15 SP5 kernel-default-base 5.14.21-150500.55.100.1.150500.6.47.1 SUSE-SU-2025:1241-1
SLES 15 SP4 kernel-64kb +6 5.14.21-150400.24.161.1 SUSE-SU-2025:1195-1
SLES 15 SP4 kernel-default-base 5.14.21-150400.24.161.1.150400.24.80.1 SUSE-SU-2025:1195-1
SLES 12 SP5 kernel-syms +2 4.12.14-122.255.1 SUSE-SU-2025:1293-1
Show 12 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 15 SP5 kernel-default-base 5.14.21-150500.55.100.1.150500.6.47.1 SUSE-SU-2025:1241-1
SLES for SAP 15 SP5 kernel-docs +4 5.14.21-150500.55.100.1 SUSE-SU-2025:1241-1
SLES for SAP 15 SP4 kernel-default-base 5.14.21-150400.24.161.1.150400.24.80.1 SUSE-SU-2025:1195-1
SLES for SAP 15 SP4 kernel-docs +4 5.14.21-150400.24.161.1 SUSE-SU-2025:1195-1
SLE Micro 5.5 kernel-default-base 5.14.21-150500.55.100.1.150500.6.47.1 SUSE-SU-2025:1241-1
SLE Micro 5.5 kernel-rt +1 5.14.21-150500.13.91.1 SUSE-SU-2025:1176-1
SLE Micro 5.5 kernel-source +1 5.14.21-150500.55.100.1 SUSE-SU-2025:1241-1
SLE Micro 5.4 kernel-default 5.14.21-150400.24.161.1 SUSE-SU-2025:1195-1
SLE Micro 5.4 kernel-default-base 5.14.21-150400.24.161.1.150400.24.80.1 SUSE-SU-2025:1195-1
SLE Micro 5.4 kernel-rt +1 5.14.21-150400.15.115.1 SUSE-SU-2025:1183-1
SLE Micro 5.3 kernel-default 5.14.21-150400.24.161.1 SUSE-SU-2025:1195-1
SLE Micro 5.3 kernel-default-base 5.14.21-150400.24.161.1.150400.24.80.1 SUSE-SU-2025:1195-1
SLE Micro 5.3 kernel-rt +1 5.14.21-150400.15.115.1 SUSE-SU-2025:1183-1
SLE Live Patching 15 SP5 kernel-default 5.14.21-150500.55.100.1 SUSE-SU-2025:1241-1
SLE Live Patching 15 SP5 kernel-livepatch-SLE15-SP5_Update_25 1-150500.11.3.1 SUSE-SU-2025:1241-1
SLE Live Patching 15 SP4 kernel-default 5.14.21-150400.24.161.1 SUSE-SU-2025:1195-1
SLE Live Patching 15 SP4 kernel-livepatch-SLE15-SP4_Update_39 1-150400.9.3.1 SUSE-SU-2025:1195-1
SLE Live Patching 12 SP5 kernel-default 4.12.14-122.255.1 SUSE-SU-2025:1293-1
SLE Live Patching 12 SP5 kgraft-patch-SLE12-SP5_Update_67 1-8.5.1 SUSE-SU-2025:1293-1
SLE HPC 15 SP5 kernel-64kb +5 5.14.21-150500.55.100.1 SUSE-SU-2025:1241-1
SLE HPC 15 SP5 kernel-default-base 5.14.21-150500.55.100.1.150500.6.47.1 SUSE-SU-2025:1241-1
SLE HPC 15 SP4 kernel-64kb +5 5.14.21-150400.24.161.1 SUSE-SU-2025:1195-1
SLE HPC 15 SP4 kernel-default-base 5.14.21-150400.24.161.1.150400.24.80.1 SUSE-SU-2025:1195-1
SUSE Manager Server 4.3 kernel-default-base 5.14.21-150400.24.161.1.150400.24.80.1 SUSE-SU-2025:1195-1
SUSE Manager Server 4.3 kernel-syms +3 5.14.21-150400.24.161.1 SUSE-SU-2025:1195-1
SUSE Manager Proxy 4.3 kernel-default-base 5.14.21-150400.24.161.1.150400.24.80.1 SUSE-SU-2025:1195-1
SUSE Manager Proxy 4.3 kernel-syms +2 5.14.21-150400.24.161.1 SUSE-SU-2025:1195-1

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 kernel-livepatch-6.1.12-17.42 1.0-0.amzn2023 ALAS2023-2023-132
Amazon Linux 2023 perf +12 6.1.12-17.42.amzn2023 ALAS2023-2023-132
Amazon Linux 2 kernel-livepatch-4.14.309-231.529 1.0-0.amzn2 ALAS2-2023-1987
Amazon Linux 2 perf +8 4.14.309-231.529.amzn2 ALAS2-2023-1987

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 9 rv +28 5.14.0-570.24.1.0.1.el9_6 ELSA-2025-9880

Advisories 16

References