Skip to content
Heist/ feed
High

net: openvswitch: fix middle attribute validation in push_nsh() action

Type: advisorySource: Official CVE List1 source record

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: 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+0

Announced Group revision 1
Original source ↗

CVE-2025-68785

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: cve:CVE-2025-68785

Linux

Source reference: /containers/cna/affected/0/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Linux

Source reference: /containers/cna/affected/1/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3",
        "lessThan": "d0c135b8bbbcf92836068fd395bebeb7ae6c7bef",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3",
        "lessThan": "3bc2efff20a38b2c7ca18317649715df0dd62ced",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3",
        "lessThan": "1b569db9c2f28b599e40050524aae5f7332bc294",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3",
        "lessThan": "10ffc558246f2c75619aedda0921906095e46702",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3",
        "lessThan": "2ecfc4433acdb149eafd7fb22d7fd4adf90b25e9",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3",
        "lessThan": "c999153bfb2d1d9b295b7010d920f2a7c6d7595f",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3",
        "lessThan": "5ace7ef87f059d68b5f50837ef3e8a1a4870c36e",
        "versionType": "git"
      }
    ],
    "programFiles": [
      "net/openvswitch/flow_netlink.c"
    ],
    "defaultStatus": "unaffected"
  },
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "4.15"
      },
      {
        "status": "unaffected",
        "version": "0",
        "lessThan": "4.15",
        "versionType": "semver"
      },
      {
        "status": "unaffected",
        "version": "5.10.248",
        "versionType": "semver",
        "lessThanOrEqual": "5.10.*"
      },
      {
        "status": "unaffected",
        "version": "5.15.198",
        "versionType": "semver",
        "lessThanOrEqual": "5.15.*"
      },
      {
        "status": "unaffected",
        "version": "6.1.160",
        "versionType": "semver",
        "lessThanOrEqual": "6.1.*"
      },
      {
        "status": "unaffected",
        "version": "6.6.120",
        "versionType": "semver",
        "lessThanOrEqual": "6.6.*"
      },
      {
        "status": "unaffected",
        "version": "6.12.64",
        "versionType": "semver",
        "lessThanOrEqual": "6.12.*"
      },
      {
        "status": "unaffected",
        "version": "6.18.3",
        "versionType": "semver",
        "lessThanOrEqual": "6.18.*"
      },
      {
        "status": "unaffected",
        "version": "6.19",
        "versionType": "original_commit_for_fix",
        "lessThanOrEqual": "*"
      }
    ],
    "programFiles": [
      "net/openvswitch/flow_netlink.c"
    ],
    "defaultStatus": "affected"
  }
]
Related CVEs
CVE-2025-68785

Source reference: /cveMetadata/cveId

Publisher severity

high

Source reference: /containers/cna/metrics

Event
#39121 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement