CVE-2024-42084

ftruncate: pass a signed offset

No CVSS score yet EPSS 0.23%

Published 29 Jul 2024 Updated 11 May 2026 CNA: Linux

Check your servers for CVE-2024-42084

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2024-42084 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

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.

Exploitation

EPSS 0.23%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 14.8% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 10 Sep 2024):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 3f6d078d4accfff8b114f968259a060bfdc7c682, before c329760749b5419769e57cb2be80955d2805f9c9
affected from 3f6d078d4accfff8b114f968259a060bfdc7c682, before f531d4bc6c5588d713359e42ed65e46816d841d8
affected from 3f6d078d4accfff8b114f968259a060bfdc7c682, before 84bf6b64a1a0dfc6de7e1b1c776d58d608e7865a
affected from 3f6d078d4accfff8b114f968259a060bfdc7c682, before dbb226d81cd02cee140139c2369791e6f61f2007
affected from 3f6d078d4accfff8b114f968259a060bfdc7c682, before 5ae6af68410bdad6181ec82104bb9985a7a6a0fa
affected from 3f6d078d4accfff8b114f968259a060bfdc7c682, before 836359247b0403e0634bfbc83e5bb8063fad287a
affected from 3f6d078d4accfff8b114f968259a060bfdc7c682, before 930a4c369f74da26816eaaa71b5888d29b759c27
affected from 3f6d078d4accfff8b114f968259a060bfdc7c682, before 4b8e88e563b5f666446d002ad0dc1e6e8e7102b0
Other versions: unaffected
Linux
affected 3.9
unaffected before 3.9
unaffected from 4.19.317 up to and including 4.19.*
unaffected from 5.4.279 up to and including 5.4.*
unaffected from 5.10.221 up to and including 5.10.*
unaffected from 5.15.162 up to and including 5.15.*
unaffected from 6.1.97 up to and including 6.1.*
unaffected from 6.6.37 up to and including 6.6.*
unaffected from 6.9.8 up to and including 6.9.*
unaffected 6.10 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2024-42084 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2024-42084

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2024-42084
trivy image --scanners vuln IMAGE | grep CVE-2024-42084

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2024-42084 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.