CVE-2024-42246
net, sunrpc: Remap EPERM in case of connection failure in xs_tcp_setup_socket
Reported by linux · Published August 7, 2024
In the Linux kernel, the following vulnerability has been resolved: net, sunrpc: Remap EPERM in case of connection failure in xs_tcp_setup_socket When using a BPF program on kernel_connect(), the call can return -EPERM. This causes xs_tcp_setup_socket() to loop forever, filling up the syslog and causing the kernel to potentially freeze up. Neil suggested: This will propagate -EPERM up into other layers which might not be ready to handle it. It might be safer to map EPERM to an error we would be more likely to expect from the network system - such as ECONNREFUSED or ENETDOWN. ECONNREFUSED as error seems reasonable. For programs setting a different error can be out of reach (see handling in 4fbac77d2d09) in particular on kernels which do not have f10d05966196 ("bpf: Make BPF_PROG_RUN_ARRAY return -err instead of allow boolean"), thus given that it is better to simply remap for consistent behavior. UDP does handle EPERM in xs_udp_send_request().
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| perf | Amazon Linux | 6.1.102-108.177.amzn2023 |
| kernel | Amazon Linux | 6.1.102-108.177.amzn2023 |
| kernel-headers | Amazon Linux | 6.1.102-108.177.amzn2023 |
| kernel-tools-devel | Amazon Linux | 6.1.102-108.177.amzn2023 |
| kernel-livepatch-6.1.102-108.177 | Amazon Linux | 1.0-0.amzn2023 |
| kernel-tools | Amazon Linux | 6.1.102-108.177.amzn2023 |
| kernel-libbpf | Amazon Linux | 6.1.102-108.177.amzn2023 |
| kernel-libbpf-static | Amazon Linux | 6.1.102-108.177.amzn2023 |
| kernel-modules-extra | Amazon Linux | 6.1.102-108.177.amzn2023 |
| kernel-modules-extra-common | Amazon Linux | 6.1.102-108.177.amzn2023 |
| kernel-devel | Amazon Linux | 6.1.102-108.177.amzn2023 |
| python3-perf | Amazon Linux | 6.1.102-108.177.amzn2023 |
1 more packages have a fixed version. See every fix in Lookup.
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 4fbac77d2d092b475dda9eea66da674369665427, 4fbac77d2d092b475dda9eea66da674369665427, 4fbac77d2d092b475dda9eea66da674369665427 |
| Linux | Linux | 4.17, 0, 4.19.322 |
| amazon:2023 | perf | 0 |
| amazon:2023 | kernel | 0 |
| amazon:2023 | kernel-headers | 0 |
| amazon:2023 | kernel-tools-devel | 0 |
| amazon:2023 | kernel-livepatch-6.1.102-108.177 | 0 |
| amazon:2023 | kernel-tools | 0 |
| amazon:2023 | kernel-libbpf | 0 |
| amazon:2023 | kernel-libbpf-static | 0 |
| amazon:2023 | kernel-modules-extra | 0 |
| amazon:2023 | kernel-modules-extra-common | 0 |
| amazon:2023 | kernel-devel | 0 |
| amazon:2023 | python3-perf | 0 |
| linux | linux_kernel | 4.17, 4.17, 4.17 |
| Linux | Linux | 5.15.167, 4fbac77d2d092b475dda9eea66da674369665427, 4fbac77d2d092b475dda9eea66da674369665427 |
| amazon:2023 | bpftool | 0 |
| amazon:2023 | kernel-libbpf-devel | 0 |
Timeline
- Aug 7, 2024 CVE Published
- Aug 13, 2024 EPSS Score (30 in total, the first dated here)
- Oct 4, 2024 Coalition ESS Score (6 in total, the first dated here)
- Jan 6, 2026 Security Advisory (135 in total, the first dated here)
- Mar 30, 2026 Distribution Patch (121 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2024-42246
vulnetix vdb fixes CVE-2024-42246
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-42246/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart