CVE-2026-31679 Overview
A vulnerability has been identified in the Linux kernel's Open vSwitch (OVS) implementation affecting MPLS (Multi-Protocol Label Switching) set and set_masked action handling. The validate_set() function incorrectly accepted OVS_KEY_ATTR_MPLS as a variable-sized payload for SET/SET_MASKED actions, when the OVS action handling logic expects fixed-size MPLS key data conforming to the struct ovs_key_mpls structure. This improper input validation allows attackers with local access to potentially read or corrupt kernel memory by providing malformed MPLS action payloads.
Critical Impact
Local attackers can exploit improper MPLS payload validation in Open vSwitch to achieve high confidentiality and availability impact through memory disclosure or system crashes.
Affected Products
- Linux kernel (versions with Open vSwitch module)
- Systems running Open vSwitch for network virtualization
- Linux-based network infrastructure utilizing MPLS switching
Discovery Timeline
- 2026-04-25 - CVE CVE-2026-31679 published to NVD
- 2026-04-27 - Last updated in NVD database
Technical Details for CVE-2026-31679
Vulnerability Analysis
The vulnerability resides in the Open vSwitch kernel module's action validation logic. When processing MPLS SET or SET_MASKED actions, the validate_set() function failed to properly enforce size constraints on the MPLS key attribute payload. The OVS action handler expects MPLS key data to conform to the struct ovs_key_mpls structure, which has a fixed size. However, the validation routine treated the payload as variable-sized, creating a mismatch between what was accepted during validation and what the action handler expected during processing.
This input validation error can lead to out-of-bounds memory access when the kernel processes malformed MPLS action payloads. An attacker with local access could craft specially malformed OVS flow rules with incorrect MPLS payload sizes, potentially causing the kernel to read beyond buffer boundaries or corrupt adjacent memory structures.
Root Cause
The root cause is improper input validation in the validate_set() function within the Open vSwitch kernel module. The function failed to use the normalized key_len value (which accounts for both standard and masked cases) to validate that MPLS action key sizes match the expected fixed struct ovs_key_mpls size. The fix implements proper size validation by checking the already normalized key length and rejecting any MPLS action payloads that do not match the expected structure size.
Attack Vector
The attack requires local access to a system where the attacker can interact with the Open vSwitch datapath, typically through netlink interfaces used to configure OVS flow rules. An attacker would need sufficient privileges to create or modify OVS flow actions. The attack involves:
- Gaining access to the OVS management interface (requires local access and appropriate privileges)
- Crafting a flow rule with an MPLS SET or SET_MASKED action containing a malformed payload size
- Triggering the action processing to cause out-of-bounds memory access
The vulnerability could result in kernel memory disclosure (confidentiality impact) or system instability and crashes (availability impact). The fix rejects invalid MPLS action payload lengths early in the validation phase, preventing malformed payloads from reaching the action handler.
Detection Methods for CVE-2026-31679
Indicators of Compromise
- Unexpected kernel crashes or panics involving the openvswitch kernel module
- Unusual OVS flow rule configurations with abnormal MPLS action payloads
- Kernel log messages indicating memory access violations in Open vSwitch code paths
- Anomalous netlink communications targeting OVS datapath interfaces
Detection Strategies
- Monitor kernel logs for oops/panic messages referencing Open vSwitch or ovs_key_mpls structures
- Implement kernel module integrity monitoring to detect unexpected OVS behavior
- Deploy endpoint detection solutions capable of identifying exploitation attempts against kernel vulnerabilities
- Audit OVS flow rule modifications for suspicious MPLS action configurations
Monitoring Recommendations
- Enable enhanced kernel logging for the Open vSwitch module during vulnerability assessment
- Configure alerting for any kernel crashes involving network virtualization components
- Monitor system stability metrics on servers running Open vSwitch workloads
- Review netlink socket activity for suspicious OVS configuration changes
How to Mitigate CVE-2026-31679
Immediate Actions Required
- Update the Linux kernel to a patched version that includes the MPLS payload length validation fix
- Restrict local access to systems running Open vSwitch to trusted administrators only
- Review and audit existing OVS flow rules for any suspicious MPLS action configurations
- Consider temporarily disabling MPLS functionality in OVS if not required for operations
Patch Information
The Linux kernel maintainers have released patches to address this vulnerability. The fix implements proper validation by using the already normalized key_len value to check MPLS action key sizes and rejecting payloads that do not match the expected struct ovs_key_mpls size. Multiple stable kernel branches have received backported fixes:
- Linux Kernel Commit Update 1
- Linux Kernel Commit Update 2
- Linux Kernel Commit Update 3
- Linux Kernel Commit Update 4
- Linux Kernel Commit Update 5
- Linux Kernel Commit Update 6
- Linux Kernel Commit Update 7
- Linux Kernel Commit Update 8
Workarounds
- Limit access to OVS management interfaces using SELinux or AppArmor policies
- Implement network segmentation to restrict which users can configure OVS datapath rules
- Use container isolation for OVS workloads to limit the impact of potential exploitation
- Monitor and restrict CAP_NET_ADMIN capability assignments on affected systems
# Check current kernel version for patching status
uname -r
# Verify Open vSwitch module is loaded
lsmod | grep openvswitch
# Restrict OVS management to specific users (example using chmod)
chmod 600 /var/run/openvswitch/db.sock
# Monitor kernel logs for OVS-related issues
dmesg | grep -i openvswitch
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


