# CVE-2024-42246: net, sunrpc: Remap EPERM in case of connection failure in xs\_tcp\_setup\_socket

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.33% (percentile 19, 2026-11-26)
- **CWE:** CWE-835
- **Published:** 2024-08-07T15:14:31.615Z
- **Modified:** 2026-06-17T07:49:05.860Z

## Who should check

- Anyone running Linux \>= 4fbac77d2d092b475dda9eea66da674369665427, \< bc790261218952635f846aaf90bcc0974f6f62c6; \>= 4fbac77d2d092b475dda9eea66da674369665427, \< 934247ea65bc5eca8bdb7f8c0ddc15cef992a5d6; \>= 4fbac77d2d092b475dda9eea66da674369665427, \< 02ee1976edb21a96ce8e3fd4ef563f14cc16d041; \>= 4fbac77d2d092b475dda9eea66da674369665427, \< 5d8254e012996cee1a0f9cc920531cb7e4d9a011; \>= 4fbac77d2d092b475dda9eea66da674369665427, \< f2431e7db0fe0daccb2f06bb0d23740affcd2fa6; \>= 4fbac77d2d092b475dda9eea66da674369665427, \< d6c686c01c5f12ff8f7264e0ddf71df6cb0d4414; \>= 4fbac77d2d092b475dda9eea66da674369665427, \< f388cfd913a2b96c05339a335f365795db1b36b6; \>= 4fbac77d2d092b475dda9eea66da674369665427, \< 626dfed5fa3bfb41e0dffd796032b555b69f9cde
- Anyone running Linux 4.17

## Description

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().

## Affected and fixed versions

- Linux: \>= 4fbac77d2d092b475dda9eea66da674369665427, \< bc790261218952635f846aaf90bcc0974f6f62c6; \>= 4fbac77d2d092b475dda9eea66da674369665427, \< 934247ea65bc5eca8bdb7f8c0ddc15cef992a5d6; \>= 4fbac77d2d092b475dda9eea66da674369665427, \< 02ee1976edb21a96ce8e3fd4ef563f14cc16d041; \>= 4fbac77d2d092b475dda9eea66da674369665427, \< 5d8254e012996cee1a0f9cc920531cb7e4d9a011; \>= 4fbac77d2d092b475dda9eea66da674369665427, \< f2431e7db0fe0daccb2f06bb0d23740affcd2fa6; \>= 4fbac77d2d092b475dda9eea66da674369665427, \< d6c686c01c5f12ff8f7264e0ddf71df6cb0d4414; \>= 4fbac77d2d092b475dda9eea66da674369665427, \< f388cfd913a2b96c05339a335f365795db1b36b6; \>= 4fbac77d2d092b475dda9eea66da674369665427, \< 626dfed5fa3bfb41e0dffd796032b555b69f9cde (cvelist)
- Linux: 4.17 (cvelist)

## Mitigation

- Upgrade Linux to 626dfed5fa3bfb41e0dffd796032b555b69f9cde or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-42246. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-42246.md
Affected: Linux >= 4fbac77d2d092b475dda9eea66da674369665427, < bc790261218952635f846aaf90bcc0974f6f62c6; >= 4fbac77d2d092b475dda9eea66da674369665427, < 934247ea65bc5eca8bdb7f8c0ddc15cef992a5d6; >= 4fbac77d2d092b475dda9eea66da674369665427, < 02ee1976edb21a96ce8e3fd4ef563f14cc16d041; >= 4fbac77d2d092b475dda9ee…
Fixed in: Linux 934247ea65bc5eca8bdb7f8c0ddc15cef992a5d6, Linux 02ee1976edb21a96ce8e3fd4ef563f14cc16d041, Linux 5d8254e012996cee1a0f9cc920531cb7e4d9a011, Linux 626dfed5fa3bfb41e0dffd796032b555b69f9cde

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-42246 being exploited?

There is no confirmed exploitation: CVE-2024-42246 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.33% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-42246?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-42246?

Linux \>= 4fbac77d2d092b475dda9eea66da674369665427, \< bc790261218952635f846aaf90bcc0974f6f62c6; \>= 4fbac77d2d092b475dda9eea66da674369665427, \< 934247ea65bc5eca8bdb7f8c0ddc15cef992a5d6; \>= 4fbac77d2d092b475dda9eea66da674369665427, \< 02ee1976edb21a96ce8e3fd4ef563f14cc16d041; \>= 4fbac77d2d092b475dda9eea66da674369665427, \< 5d8254e012996cee1a0f9cc920531cb7e4d9a011; \>= 4fbac77d2d092b475dda9eea66da674369665427, \< f2431e7db0fe0daccb2f06bb0d23740affcd2fa6; \>= 4fbac77d2d092b475dda9eea66da674369665427, \< d6c686c01c5f12ff8f7264e0ddf71df6cb0d4414; \>= 4fbac77d2d092b475dda9eea66da674369665427, \< f388cfd913a2b96c05339a335f365795db1b36b6; \>= 4fbac77d2d092b475dda9eea66da674369665427, \< 626dfed5fa3bfb41e0dffd796032b555b69f9cde; Linux 4.17.

### Is there a fix for CVE-2024-42246?

Yes. Fixed in Linux 934247ea65bc5eca8bdb7f8c0ddc15cef992a5d6, Linux 02ee1976edb21a96ce8e3fd4ef563f14cc16d041, Linux 5d8254e012996cee1a0f9cc920531cb7e4d9a011, Linux 626dfed5fa3bfb41e0dffd796032b555b69f9cde. Upgrade Linux to 626dfed5fa3bfb41e0dffd796032b555b69f9cde or later.

### How do I check if I'm affected by CVE-2024-42246?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/f2431e7db0fe0daccb2f06bb0d23740affcd2fa6>
- patch: <https://git.kernel.org/stable/c/d6c686c01c5f12ff8f7264e0ddf71df6cb0d4414>
- patch: <https://git.kernel.org/stable/c/f388cfd913a2b96c05339a335f365795db1b36b6>
- patch: <https://git.kernel.org/stable/c/626dfed5fa3bfb41e0dffd796032b555b69f9cde>
- other: <https://git.kernel.org/stable/c/bc790261218952635f846aaf90bcc0974f6f62c6>
- other: <https://git.kernel.org/stable/c/934247ea65bc5eca8bdb7f8c0ddc15cef992a5d6>
- other: <https://git.kernel.org/stable/c/02ee1976edb21a96ce8e3fd4ef563f14cc16d041>
- other: <https://git.kernel.org/stable/c/5d8254e012996cee1a0f9cc920531cb7e4d9a011>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>
- other: <https://lists.debian.org/debian-lts-announce/2024/10/msg00003.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-42246>

HTML: <https://flawdb.com/CVE-2024-42246> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-42246>
