CVE-2025-40254
kernel: net: openvswitch: remove never-working support for setting nsh fields
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · December 4, 2025
Updated · June 30, 2026
Description
Open vSwitch NSH (Network Service Header) field modification has been fundamentally broken since introduction. The set(nsh(...)) action reuses validation code designed for different memory layouts—masked sets double attribute sizes, but the validator doesn't account for this. Additionally, 'masked' and 'is_mask' flags are conflated, causing SW_FLOW_KEY_PUT() to write into unallocated mask memory, triggering NULL pointer crashes.
Statement
The feature never functioned correctly, so removing it causes no regression. Any flow rules attempting NSH field modification would have failed or crashed. Networks depending on NSH header manipulation should verify they use push_nsh() rather than set().
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
To mitigate this issue, prevent the openvswitch module from being loaded. See https://access.redhat.com/solutions/41278 for instructions on how to blacklist a kernel module.
CVSS / CWE
CVSS 3.1 · 4.7CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
CWE-843 · Access of Resource Using Incompatible Type ('Type Confusion')