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

- Priority: **Routine**
- Reason: Not severe (CVSS 5.5, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2024-08-07 · Modified: 2026-05-11
- Aliases: UBUNTU-CVE-2024-42246, DEBIAN-CVE-2024-42246
- Record: https://cvemate.com/vulnerability/CVE-2024-42246 · JSON: https://cvemate.com/vulnerability/CVE-2024-42246/json

## Description

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

## Signals

- CVSS: 5.5 medium (v3.1, NVD) CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- EPSS: 0.233%, percentile 15.186%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 129)

- debian linux (Debian): \< 6.1.106-1 \| \< 6.9.10-1
- ubuntu linux (Ubuntu): \< 5.4.0-200.220 \| \< 5.15.0-125.135 \| \< 6.8.0-48.48
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): \< 5.4.0-1135.145 \| \< 5.15.0-1072.78 \| \< 6.8.0-1018.20
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.15 (Ubuntu): \< 5.15.0-1072.78~20.04.1
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.4 (Ubuntu): \< 5.4.0-1135.145~18.04.1
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.8 (Ubuntu): \< 6.8.0-1018.19~22.04.1
- ubuntu linux-aws-fips (Ubuntu): \< 5.4.0-1135.145+fips1 \| All versions (No fix recorded) \| \< 5.15.0-1072.78+fips1
- ubuntu linux-azure (Ubuntu): All versions (No fix recorded) \| \< 5.4.0-1140.147 \| \< 5.15.0-1075.84 \| \< 6.8.0-1017.20
- ubuntu linux-azure-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.15 (Ubuntu): \< 5.15.0-1078.87~20.04.1

## References (first 20 of 36)

- <https://git.kernel.org/stable/c/bc790261218952635f846aaf90bcc0974f6f62c6>
- <https://git.kernel.org/stable/c/934247ea65bc5eca8bdb7f8c0ddc15cef992a5d6>
- <https://git.kernel.org/stable/c/02ee1976edb21a96ce8e3fd4ef563f14cc16d041>
- <https://git.kernel.org/stable/c/5d8254e012996cee1a0f9cc920531cb7e4d9a011>
- <https://git.kernel.org/stable/c/f2431e7db0fe0daccb2f06bb0d23740affcd2fa6>
- <https://git.kernel.org/stable/c/d6c686c01c5f12ff8f7264e0ddf71df6cb0d4414>
- <https://git.kernel.org/stable/c/f388cfd913a2b96c05339a335f365795db1b36b6>
- <https://git.kernel.org/stable/c/626dfed5fa3bfb41e0dffd796032b555b69f9cde>
- <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>
- <https://lists.debian.org/debian-lts-announce/2024/10/msg00003.html>
- <https://ubuntu.com/security/CVE-2024-42246>
- <https://www.cve.org/CVERecord?id=CVE-2024-42246>
- <https://git.kernel.org/linus/626dfed5fa3bfb41e0dffd796032b555b69f9cde>
- <https://ubuntu.com/security/notices/USN-7088-1>
- <https://ubuntu.com/security/notices/USN-7089-1>
- <https://ubuntu.com/security/notices/USN-7090-1>
- <https://ubuntu.com/security/notices/USN-7088-2>
- <https://ubuntu.com/security/notices/USN-7089-2>
- <https://ubuntu.com/security/notices/USN-7088-3>
- <https://ubuntu.com/security/notices/USN-7089-3>

---

Data as of 2026-12-05T04:47:31.073Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
