VDB

CVE-2024-42246

CVE-2024-42246 PUBLISHED

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.

PackageEcosystemFixed in
perfAmazon Linux6.1.102-108.177.amzn2023
kernelAmazon Linux6.1.102-108.177.amzn2023
kernel-headersAmazon Linux6.1.102-108.177.amzn2023
kernel-tools-develAmazon Linux6.1.102-108.177.amzn2023
kernel-livepatch-6.1.102-108.177Amazon Linux1.0-0.amzn2023
kernel-toolsAmazon Linux6.1.102-108.177.amzn2023
kernel-libbpfAmazon Linux6.1.102-108.177.amzn2023
kernel-libbpf-staticAmazon Linux6.1.102-108.177.amzn2023
kernel-modules-extraAmazon Linux6.1.102-108.177.amzn2023
kernel-modules-extra-commonAmazon Linux6.1.102-108.177.amzn2023
kernel-develAmazon Linux6.1.102-108.177.amzn2023
python3-perfAmazon Linux6.1.102-108.177.amzn2023

1 more packages have a fixed version. See every fix in Lookup.

Affected products

VendorProductVersions
LinuxLinux4fbac77d2d092b475dda9eea66da674369665427, 4fbac77d2d092b475dda9eea66da674369665427, 4fbac77d2d092b475dda9eea66da674369665427
LinuxLinux4.17, 0, 4.19.322
amazon:2023perf0
amazon:2023kernel0
amazon:2023kernel-headers0
amazon:2023kernel-tools-devel0
amazon:2023kernel-livepatch-6.1.102-108.1770
amazon:2023kernel-tools0
amazon:2023kernel-libbpf0
amazon:2023kernel-libbpf-static0
amazon:2023kernel-modules-extra0
amazon:2023kernel-modules-extra-common0
amazon:2023kernel-devel0
amazon:2023python3-perf0
linuxlinux_kernel4.17, 4.17, 4.17
LinuxLinux5.15.167, 4fbac77d2d092b475dda9eea66da674369665427, 4fbac77d2d092b475dda9eea66da674369665427
amazon:2023bpftool0
amazon:2023kernel-libbpf-devel0

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

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›