---
id: CVE-2025-40149
title: >-
  kernel: tls: Use __sk_dst_get() and dst_dev_rcu() in get_netdev_for_sock()
  (CVE-2025-40149)
summary: >-
  A flaw was found in the Linux kernel’s TLS implementation
  (net/tls/tls_device.c). The function get_netdev_for_sock() is invoked during
  setsockopt(), which is not executed under RCU (Read-Copy-Update) protection.
  It previously used sk_dst_g…
severity: medium
cvss: 5
cvssVector: 'CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L'
cvssSource: vendor
cwe: CWE-416
vendor: Red Hat
product: Red Hat Enterprise Linux BaseOS (v. 10)
affected:
  - enterprise_linux 8
  - enterprise_linux 9
  - enterprise_linux_appstream_eus_v_10_0
  - enterprise_linux_appstream_v_10
  - enterprise_linux_baseos_eus_v_10_0
  - enterprise_linux_baseos_v_10
  - enterprise_linux_codeready_linux_builder_eus_v_10_0
  - enterprise_linux_codeready_linux_builder_v_10
  - enterprise_linux_real_time_for_nfv_eus_v_10_0
  - enterprise_linux_real_time_for_nfv_v_10
  - enterprise_linux_real_time_eus_v_10_0
  - enterprise_linux_real_time_v_10
patched:
  - enterprise_linux_appstream_eus_v_10_0
  - enterprise_linux_appstream_v_10
  - enterprise_linux_baseos_eus_v_10_0
  - enterprise_linux_baseos_v_10
  - enterprise_linux_codeready_linux_builder_eus_v_10_0
  - enterprise_linux_codeready_linux_builder_v_10
  - enterprise_linux_real_time_for_nfv_eus_v_10_0
  - enterprise_linux_real_time_for_nfv_v_10
  - enterprise_linux_real_time_eus_v_10_0
  - enterprise_linux_real_time_v_10
published: '2025-11-12'
updated: '2026-09-15'
sourceUpdated: '2026-09-15T11:38:30+00:00'
source: CSAF
sourceUrl: 'https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-40149.json'
references:
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-40149.json
  - url: 'https://access.redhat.com/security/cve/CVE-2025-40149'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2414466'
  - url: 'https://www.cve.org/CVERecord?id=CVE-2025-40149'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2025-40149'
  - url: >-
      https://lore.kernel.org/linux-cve-announce/2025111257-CVE-2025-40149-2c48@gregkh/T
  - url: 'https://access.redhat.com/errata/RHSA-2026:64767'
  - url: 'https://access.redhat.com/errata/RHSA-2026:67471'
  - url: 'https://git.kernel.org/stable/c/2b1bef126bbb8d0da51491357559126d567c1dee'
  - url: 'https://git.kernel.org/stable/c/e37ca0092ddace60833790b4ad7a390408fb1be9'
  - url: 'https://git.kernel.org/stable/c/13159c7125636371543a82cb7bbae00ab36730cc'
  - url: 'https://git.kernel.org/stable/c/f09cd209359a23f88d4f3fa3d2379d057027e53c'
  - url: 'https://git.kernel.org/stable/c/feb474ddbf26b51f462ae2e60a12013bdcfc5407'
  - url: 'https://git.kernel.org/stable/c/c65f27b9c3be2269918e1cbad6d8884741f835c5'
tags:
  - csaf
  - vex
  - red-hat
  - cve.org
  - score-dispute
epss: 0.00161
epssPercentile: 0.04474
scores:
  vendor: 5
  cna: 7.8
ingestedAt: '2026-09-08T15:33:26.996Z'
---

## Overview

A flaw was found in the Linux kernel’s TLS implementation (net/tls/tls_device.c). The function get_netdev_for_sock() is invoked during setsockopt(), which is not executed under RCU (Read-Copy-Update) protection. It previously used sk_dst_get(sk)->dev, which can lead to a use-after-free (UAF) if the sk’s destination is freed

## Vendor advisories

- **RHSA-2026:64767** · Red Hat · fixed in: Red Hat Enterprise Linux AppStream EUS (v. 10.0), Red Hat Enterprise Linux BaseOS EUS (v. 10.0), Red Hat Enterprise Linux CodeReady Linux Builder EUS (v. 10.0), Red Hat Enterprise Linux Real Time for NFV EUS (v. 10.0), Red Hat Enterprise Linux Real Time EUS (v. 10.0) · released 2026-09-08 · [advisory](https://access.redhat.com/errata/RHSA-2026:64767)
- **RHSA-2026:67471** · Red Hat · fixed in: Red Hat Enterprise Linux AppStream (v. 10), Red Hat Enterprise Linux BaseOS (v. 10), Red Hat Enterprise Linux CodeReady Linux Builder (v. 10), Red Hat Enterprise Linux Real Time for NFV (v. 10), Red Hat Enterprise Linux Real Time (v. 10) · released 2026-09-15 · [advisory](https://access.redhat.com/errata/RHSA-2026:67471)
- **Red Hat VEX** · Moderate · affected: Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9 · no fix planned: Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9 · updated 2026-09-15 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-40149.json)

**kernel: tls: Use __sk_dst_get() and dst_dev_rcu() in get_netdev_for_sock()** — rated Moderate by Red Hat. Released 2025-11-12, updated 2026-09-15.

Affected:

- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9

Fixed:

- Red Hat Enterprise Linux AppStream EUS (v. 10.0)
- Red Hat Enterprise Linux AppStream (v. 10)
- Red Hat Enterprise Linux BaseOS EUS (v. 10.0)
- Red Hat Enterprise Linux BaseOS (v. 10)
- Red Hat Enterprise Linux CodeReady Linux Builder EUS (v. 10.0)
- Red Hat Enterprise Linux CodeReady Linux Builder (v. 10)
- Red Hat Enterprise Linux Real Time for NFV EUS (v. 10.0)
- Red Hat Enterprise Linux Real Time for NFV (v. 10)
- Red Hat Enterprise Linux Real Time EUS (v. 10.0)
- Red Hat Enterprise Linux Real Time (v. 10)

No fix planned:

- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9

Not affected:

- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7

## Remediation

For details on how to apply this update, which includes the changes described in this advisory, refer to:

https://access.redhat.com/articles/11258

The system must be rebooted for this update to take effect.

Red Hat recommends treating all kernel errata as security-relevant. Given the kernel's fundamental role, any bug has a higher chance of impacting system security, even if that impact only becomes clear after a fix is published. Therefore, Red Hat prioritizes delivering fixes that improve our customers' overall security posture.

Because of this proactive approach, a patch may be associa… https://access.redhat.com/errata/RHSA-2026:64767
For details on how to apply this update, which includes the changes described in this advisory, refer to:

https://access.redhat.com/articles/11258

The system must be rebooted for this update to take effect.

Red Hat recommends treating all kernel errata as security-relevant. Given the kernel's fundamental role, any bug has a higher chance of impacting system security, even if that impact only becomes clear after a fix is published. Therefore, Red Hat prioritizes delivering fixes that improve our customers' overall security posture.

Because of this proactive approach, a patch may be associa… https://access.redhat.com/errata/RHSA-2026:67471

Workarounds / mitigations:

- Mitigation for this issue is either not available or the currently available options don't meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
