5.5medium
ftruncate: pass a signed offset
- Severity
- 5.5medium CVSS:3.1 by NVD
- Exploit likelihood
- 0.23% (higher than 14% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- 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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| 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 and 1 more 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.* | CVE List |
| 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 | NVD |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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.
NVD (es)
En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: ftruncate: pasa un desplazamiento firmado La antigua llamada al sistema ftruncate(), que utiliza off_t de 32 bits, pierde una extensión de signo cuando se llama en modo de compatibilidad en arquitecturas de 64 bits. Como resultado, pasar una longitud negativa accidentalmente logra truncar el tamaño del archivo entre 2GiB y 4GiB. Cambiar el tipo de llamada al sistema compat a compat_off_t firmado cambia el comportamiento, por lo que en su lugar devuelve -EINVAL. El punto de entrada nativo, la llamada al sistema truncate() y las variantes correspondientes basadas en loff_t ya son correctas y no sufren este error.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-42084 changed 2026-05-11 | CVE Terms of Use |
| NVD | CVE-2024-42084 changed 2026-06-17 | Public domain |