# CVE-2024-42084: ftruncate: pass a signed offset

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.23%, higher than 14% of CVEs (2026-12-01)
- Published: 2024-07-29T16:26:20.581Z
- Modified: 2026-06-17T07:48:46.520Z
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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

ftruncate: pass a signed offset

The old ftruncate() syscall, using the 32-bit off_t 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 compat_off_t
changes the behavior so it instead returns -EINVAL.

The native entry point, the truncate() syscall and the corresponding
loff_t based variants are all correct already and do not suffer
from this mistake.

(As written by CVE List.)

## Affected

- Linux Linux: from 3f6d078d4accfff8b114f968259a060bfdc7c682 before c329760749b5419769e57cb2be80955d2805f9c9; from 3f6d078d4accfff8b114f968259a060bfdc7c682 before f531d4bc6c5588d713359e42ed65e46816d841d8; from 3f6d078d4accfff8b114f968259a060bfdc7c682 before 84bf6b64a1a0dfc6de7e1b1c776d58d608e7865a; from 3f6d078d4accfff8b114f968259a060bfdc7c682 before dbb226d81cd02cee140139c2369791e6f61f2007; from 3f6d078d4accfff8b114f968259a060bfdc7c682 before 5ae6af68410bdad6181ec82104bb9985a7a6a0fa; from 3f6d078d4accfff8b114f968259a060bfdc7c682 before 836359247b0403e0634bfbc83e5bb8063fad287a; from 3f6d078d4accfff8b114f968259a060bfdc7c682 before 930a4c369f74da26816eaaa71b5888d29b759c27; from 3f6d078d4accfff8b114f968259a060bfdc7c682 before 4b8e88e563b5f666446d002ad0dc1e6e8e7102b0; 3.9 (not affected: before 3.9; from 4.19.317 up to 4.19.*; from 5.4.279 up to 5.4.*; from 5.10.221 up to 5.10.*; from 5.15.162 up to 5.15.*; from 6.1.97 up to 6.1.*; from 6.6.37 up to 6.6.*; from 6.9.8 up to 6.9.*; from 6.10 up to *)
- linux linux_kernel: from 3.9 before 4.19.317; from 4.20 before 5.4.279; from 5.5 before 5.10.221; from 5.11 before 5.15.162; from 5.16 before 6.1.97; from 6.2 before 6.6.37; from 6.7 before 6.9.8; 6.10

## References

- <https://git.kernel.org/stable/c/c329760749b5419769e57cb2be80955d2805f9c9> (patch)
- <https://git.kernel.org/stable/c/f531d4bc6c5588d713359e42ed65e46816d841d8> (patch)
- <https://git.kernel.org/stable/c/84bf6b64a1a0dfc6de7e1b1c776d58d608e7865a> (patch)
- <https://git.kernel.org/stable/c/dbb226d81cd02cee140139c2369791e6f61f2007> (patch)
- <https://git.kernel.org/stable/c/5ae6af68410bdad6181ec82104bb9985a7a6a0fa> (patch)
- <https://git.kernel.org/stable/c/836359247b0403e0634bfbc83e5bb8063fad287a> (patch)
- <https://git.kernel.org/stable/c/930a4c369f74da26816eaaa71b5888d29b759c27> (patch)
- <https://git.kernel.org/stable/c/4b8e88e563b5f666446d002ad0dc1e6e8e7102b0> (patch)
- <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>

## Sources

- CVE List: [CVE-2024-42084](https://www.cve.org/CVERecord?id=CVE-2024-42084), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2024-42084](https://nvd.nist.gov/vuln/detail/CVE-2024-42084), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-42084 · Whole record: https://cve.day/CVE-2024-42084.json · Rebuilt by cve.day 2026-11-25T22:58:43.344Z
