File truncation via compat offset sign error
Published Jul 29, 2024 · Updated May 11, 2026
Improper input handling in Linux allows local users to truncate writable files to sizes between 2 GiB and 4 GiB. The 32-bit compat ftruncate syscall on 64-bit kernels accepts a negative length without sign-extending it and interprets the value as a large positive offset. Exploitation requires local syscall access and permission to change the target file; native ftruncate and loff_t variants are unaffected.
Summary
What happened
Improper input handling in Linux allows local users to truncate writable files to sizes between 2 GiB and 4 GiB. The 32-bit compat ftruncate syscall on 64-bit kernels accepts a negative length without sign-extending it and interprets the value as a large positive offset. Exploitation requires local syscall access and permission to change the target file; native ftruncate and loff_t variants are unaffected.
The record
- CVE
- CVE-2024-42084
- Published
- Jul 29, 2024
- Updated
- May 11, 2026
- Vendor
- The Linux Kernel Organization
- Product
- Linux
- Classifications
- T1565.001
- Attack vector
- local
- Privileges
- authenticated
Timeline
How it unfolded
- Jul 29, 2024CVE publishedPublication date reported by the CVE source.
- May 11, 2026Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=3.9
- Affected versionversion=3f6d078d4accfff8b114f968259a060bfdc7c682 <4b8e88e563b5f666446d002ad0dc1e6e8e7102b0
- Affected versionversion=3f6d078d4accfff8b114f968259a060bfdc7c682 <5ae6af68410bdad6181ec82104bb9985a7a6a0fa
- Affected versionversion=3f6d078d4accfff8b114f968259a060bfdc7c682 <836359247b0403e0634bfbc83e5bb8063fad287a
- Affected versionversion=3f6d078d4accfff8b114f968259a060bfdc7c682 <84bf6b64a1a0dfc6de7e1b1c776d58d608e7865a
- Affected versionversion=3f6d078d4accfff8b114f968259a060bfdc7c682 <930a4c369f74da26816eaaa71b5888d29b759c27
- Affected versionversion=3f6d078d4accfff8b114f968259a060bfdc7c682 <c329760749b5419769e57cb2be80955d2805f9c9
- Affected versionversion=3f6d078d4accfff8b114f968259a060bfdc7c682 <dbb226d81cd02cee140139c2369791e6f61f2007
- Affected versionversion=3f6d078d4accfff8b114f968259a060bfdc7c682 <f531d4bc6c5588d713359e42ed65e46816d841d8
What conditions does exploitation require?
What is affected?
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
No public exploit references are available in this record.
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo