# CVE-2025-68785: net: openvswitch: fix middle attribute validation in push\_nsh() action

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

- **Severity:** HIGH 7.1
- **CVSS:** 7.1 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; 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.22% (percentile 7, 2026-11-26)
- **CWE:** CWE-125
- **Published:** 2026-01-13T15:28:58.930Z
- **Modified:** 2026-10-19T19:17:04.873Z

## Who should check

- Anyone running Linux \>= b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3, \< d0c135b8bbbcf92836068fd395bebeb7ae6c7bef; \>= b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3, \< 3bc2efff20a38b2c7ca18317649715df0dd62ced; \>= b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3, \< 1b569db9c2f28b599e40050524aae5f7332bc294; \>= b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3, \< 10ffc558246f2c75619aedda0921906095e46702; \>= b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3, \< 2ecfc4433acdb149eafd7fb22d7fd4adf90b25e9; \>= b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3, \< c999153bfb2d1d9b295b7010d920f2a7c6d7595f; \>= b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3, \< 5ace7ef87f059d68b5f50837ef3e8a1a4870c36e
- Anyone running Linux 4.15

## Description

In the Linux kernel, the following vulnerability has been resolved:

net: openvswitch: fix middle attribute validation in push\_nsh() action

The push\_nsh() action structure looks like this:

 OVS\_ACTION\_ATTR\_PUSH\_NSH(OVS\_KEY\_ATTR\_NSH(OVS\_NSH\_KEY\_ATTR\_BASE,...))

The outermost OVS\_ACTION\_ATTR\_PUSH\_NSH attribute is OK'ed by the
nla\_for\_each\_nested() inside \_\_ovs\_nla\_copy\_actions().  The innermost
OVS\_NSH\_KEY\_ATTR\_BASE/MD1/MD2 are OK'ed by the nla\_for\_each\_nested()
inside nsh\_key\_put\_from\_nlattr().  But nothing checks if the attribute
in the middle is OK.  We don't even check that this attribute is the
OVS\_KEY\_ATTR\_NSH.  We just do a double unwrap with a pair of nla\_data()
calls - first time directly while calling validate\_push\_nsh() and the
second time as part of the nla\_for\_each\_nested() macro, which isn't
safe, potentially causing invalid memory access if the size of this
attribute is incorrect.  The failure may not be noticed during
validation due to larger netlink buffer, but cause trouble later during
action execution where the buffer is allocated exactly to the size:

 BUG: KASAN: slab-out-of-bounds in nsh\_hdr\_from\_nlattr+0x1dd/0x6a0 \[openvswitch\]
 Read of size 184 at addr ffff88816459a634 by task a.out/22624

 CPU: 8 UID: 0 PID: 22624 6.18.0-rc7+ \#115 PREEMPT(voluntary)
 Call Trace:
  \<TASK\>
  dump\_stack\_lvl+0x51/0x70
  print\_address\_description.constprop.0+0x2c/0x390
  kasan\_report+0xdd/0x110
  kasan\_check\_range+0x35/0x1b0
  \_\_asan\_memcpy+0x20/0x60
  nsh\_hdr\_from\_nlattr+0x1dd/0x6a0 \[openvswitch\]
  push\_nsh+0x82/0x120 \[openvswitch\]
  do\_execute\_actions+0x1405/0x2840 \[openvswitch\]
  ovs\_execute\_actions+0xd5/0x3b0 \[openvswitch\]
  ovs\_packet\_cmd\_execute+0x949/0xdb0 \[openvswitch\]
  genl\_family\_rcv\_msg\_doit+0x1d6/0x2b0
  genl\_family\_rcv\_msg+0x336/0x580
  genl\_rcv\_msg+0x9f/0x130
  netlink\_rcv\_skb+0x11f/0x370
  genl\_rcv+0x24/0x40
  netlink\_unicast+0x73e/0xaa0
  netlink\_sendmsg+0x744/0xbf0
  \_\_sys\_sendto+0x3d6/0x450
  do\_syscall\_64+0x79/0x2c0
  entry\_SYSCALL\_64\_after\_hwframe+0x76/0x7e
  \</TASK\>

Let's add some checks that the attribute is properly sized and it's
the only one attribute inside the action.  Technically, there is no
real reason for OVS\_KEY\_ATTR\_NSH to be there, as we know that we're
pushing an NSH header already, it just creates extra nesting, but
that's how uAPI works today.  So, keeping as it is.

## Affected and fixed versions

- Linux: \>= b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3, \< d0c135b8bbbcf92836068fd395bebeb7ae6c7bef; \>= b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3, \< 3bc2efff20a38b2c7ca18317649715df0dd62ced; \>= b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3, \< 1b569db9c2f28b599e40050524aae5f7332bc294; \>= b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3, \< 10ffc558246f2c75619aedda0921906095e46702; \>= b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3, \< 2ecfc4433acdb149eafd7fb22d7fd4adf90b25e9; \>= b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3, \< c999153bfb2d1d9b295b7010d920f2a7c6d7595f; \>= b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3, \< 5ace7ef87f059d68b5f50837ef3e8a1a4870c36e (cvelist)
- Linux: 4.15 (cvelist)

## Mitigation

- Upgrade Linux to 5ace7ef87f059d68b5f50837ef3e8a1a4870c36e or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2025-68785.md
Affected: Linux >= b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3, < d0c135b8bbbcf92836068fd395bebeb7ae6c7bef; >= b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3, < 3bc2efff20a38b2c7ca18317649715df0dd62ced; >= b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3, < 1b569db9c2f28b599e40050524aae5f7332bc294; >= b2d0f5d5dc53532e6f07bc5…
Fixed in: Linux 3bc2efff20a38b2c7ca18317649715df0dd62ced, Linux 1b569db9c2f28b599e40050524aae5f7332bc294, Linux 10ffc558246f2c75619aedda0921906095e46702, Linux 2ecfc4433acdb149eafd7fb22d7fd4adf90b25e9, Linux 5ace7ef87f059d68b5f50837ef3e8a1a4870c36e

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-2025-68785 being exploited?

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

### How serious is CVE-2025-68785?

High: CVSS 7.1 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-68785?

Linux \>= b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3, \< d0c135b8bbbcf92836068fd395bebeb7ae6c7bef; \>= b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3, \< 3bc2efff20a38b2c7ca18317649715df0dd62ced; \>= b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3, \< 1b569db9c2f28b599e40050524aae5f7332bc294; \>= b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3, \< 10ffc558246f2c75619aedda0921906095e46702; \>= b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3, \< 2ecfc4433acdb149eafd7fb22d7fd4adf90b25e9; \>= b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3, \< c999153bfb2d1d9b295b7010d920f2a7c6d7595f; \>= b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3, \< 5ace7ef87f059d68b5f50837ef3e8a1a4870c36e; Linux 4.15.

### Is there a fix for CVE-2025-68785?

Yes. Fixed in Linux 3bc2efff20a38b2c7ca18317649715df0dd62ced, Linux 1b569db9c2f28b599e40050524aae5f7332bc294, Linux 10ffc558246f2c75619aedda0921906095e46702, Linux 2ecfc4433acdb149eafd7fb22d7fd4adf90b25e9, Linux 5ace7ef87f059d68b5f50837ef3e8a1a4870c36e. Upgrade Linux to 5ace7ef87f059d68b5f50837ef3e8a1a4870c36e or later.

### How do I check if I'm affected by CVE-2025-68785?

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

- other: <https://git.kernel.org/stable/c/d0c135b8bbbcf92836068fd395bebeb7ae6c7bef>
- other: <https://git.kernel.org/stable/c/3bc2efff20a38b2c7ca18317649715df0dd62ced>
- other: <https://git.kernel.org/stable/c/1b569db9c2f28b599e40050524aae5f7332bc294>
- other: <https://git.kernel.org/stable/c/10ffc558246f2c75619aedda0921906095e46702>
- other: <https://git.kernel.org/stable/c/2ecfc4433acdb149eafd7fb22d7fd4adf90b25e9>
- other: <https://git.kernel.org/stable/c/c999153bfb2d1d9b295b7010d920f2a7c6d7595f>
- other: <https://git.kernel.org/stable/c/5ace7ef87f059d68b5f50837ef3e8a1a4870c36e>

## 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-2025-68785>

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