CVE-2024-42084: ftruncate: pass a signed offset
In the Linux kernel, the following vulnerability has been resolved:
ftruncate: pass a signed offset
The old ftruncate() syscall, using the 32-bit offt misses a sign extension when called in compat mode on 64-bit architectures. As a result, passing a negative length accidentally succeeds in truncating to file size between 2GiB and 4GiB.
Changing the type of the compat syscall to the signed compatofft changes the behavior so it instead returns -EINVAL.
The native entry point, the truncate() syscall and the corresponding lofft based variants are all correct already and do not suffer from this mistake.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-42084?
The severity of CVE-2024-42084 is classified as moderate.
How do I fix CVE-2024-42084?
To fix CVE-2024-42084, upgrade to the latest kernel versions provided by your distribution, such as 4.19.317 or later.
Which versions are affected by CVE-2024-42084?
Versions of the Linux kernel prior to 4.19.317, 5.4.279, 5.10.221, 5.15.162, 6.1.97, and others are affected by CVE-2024-42084.
Is CVE-2024-42084 specific to any architecture?
Yes, CVE-2024-42084 specifically impacts 64-bit architectures when operating in compatibility mode.
What impact does CVE-2024-42084 have on systems?
CVE-2024-42084 can lead to unintended behaviors when a negative length is passed to the ftruncate() syscall, potentially causing data corruption.