CVE-2024-42084
ftruncate: pass a signed offset
Reported by linux · Published July 29, 2024
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| kernel-tools | Amazon Linux | 6.1.97-104.177.amzn2023, 4.14.352-267.564.amzn2 |
| python-perf | Amazon Linux | 4.14.352-267.564.amzn2 |
| kernel | Amazon Linux | 6.1.97-104.177.amzn2023 |
| kernel-headers | Amazon Linux | 4.14.352-267.564.amzn2 |
| kernel-livepatch-4.14.352-267.564 | Amazon Linux | 1.0-0.amzn2 |
| kernel-libbpf | Amazon Linux | 6.1.97-104.177.amzn2023 |
| kernel-devel | Amazon Linux | 4.14.352-267.564.amzn2 |
| kernel-livepatch-6.1.97-104.177 | Amazon Linux | 1.0-0.amzn2023 |
| perf | Amazon Linux | 6.1.97-104.177.amzn2023, 4.14.352-267.564.amzn2 |
| kernel-libbpf-static | Amazon Linux | 6.1.97-104.177.amzn2023 |
| kernel-libbpf-devel | Amazon Linux | 6.1.97-104.177.amzn2023 |
| kernel-modules-extra | Amazon Linux | 6.1.97-104.177.amzn2023 |
3 more packages have a fixed version. See every fix in Lookup.
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 3f6d078d4accfff8b114f968259a060bfdc7c682, 3f6d078d4accfff8b114f968259a060bfdc7c682, 3f6d078d4accfff8b114f968259a060bfdc7c682 |
| Linux | Linux | 3.9, 0, 4.19.317 |
| amazon:2023 | kernel-tools | 0 |
| amazon:2 | python-perf | 0 |
| amazon:2023 | kernel | 0 |
| amazon:2 | kernel-headers | 0 |
| amazon:2 | kernel-livepatch-4.14.352-267.564 | 0 |
| amazon:2023 | kernel-libbpf | 0 |
| amazon:2 | kernel-devel | 0 |
| amazon:2023 | kernel-livepatch-6.1.97-104.177 | 0 |
| amazon:2 | perf | 0 |
| amazon:2 | kernel-tools | 0 |
| amazon:2023 | kernel-libbpf-static | 0 |
| amazon:2023 | kernel-libbpf-devel | 0 |
| amazon:2023 | perf | 0 |
| amazon:2023 | kernel-modules-extra | 0 |
| amazon:2023 | bpftool | 0 |
| Linux | Linux | 3f6d078d4accfff8b114f968259a060bfdc7c682, 3f6d078d4accfff8b114f968259a060bfdc7c682, 3f6d078d4accfff8b114f968259a060bfdc7c682 |
| amazon:2 | kernel-tools-devel | 0 |
| linux | linux_kernel | 3.9, 3.9, 3.9 |
…and 6 more
Timeline
- Jul 29, 2024 CVE Published
- Jul 30, 2024 EPSS Score (30 in total, the first dated here)
- Oct 4, 2024 Coalition ESS Score (8 in total, the first dated here)
- Jan 7, 2026 Security Advisory (367 in total, the first dated here)
- Mar 30, 2026 Distribution Patch (249 in total, the first dated here)
- Nov 19, 2026 CVE Updated
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2024-42084
vulnetix vdb fixes CVE-2024-42084
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-42084/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart