Executive brief
A vulnerability in the Linux kernel's Open vSwitch component could allow an attacker to crash the system. Open vSwitch is a virtual switch used in cloud and data center environments to manage network traffic between virtual machines. By sending specifically crafted network configuration commands, an attacker can trigger a kernel crash, leading to a complete service outage.
Technical details
A vulnerability exists in the Open vSwitch (OVS) module of the Linux kernel due to improper validation of the 'set(nsh(...))' action. The root cause is a mismatch in memory layout expectations within the nsh_key_put_from_nlattr() function when processing masked set actions. Specifically, nested attributes are doubled in size for masked sets, but the validation logic fails to account for this, leading to a NULL pointer dereference when the kernel attempts to write to unallocated memory via SW_FLOW_KEY_PUT(). Because the feature was found to be fundamentally broken since its introduction, the fix involves the complete removal of NSH field-setting support in OVS. The vulnerability can be triggered via Netlink messages, potentially by a local user with network administrative privileges or through processed network packets depending on the OVS configuration.
Affected products
- Linux Linux Kernel Introduced in b2d0f5d5dc53 (v4.14) and fixed in various stable branches
Timeline
- 2025-11-12: patched: Initial patch submitted to kernel mailing list
- 2025-12-04: disclosed: CVE-2025-40254 assigned and published
References
- https://git.kernel.org/stable/c/0b903f33c31c82b1c3591279fd8a23893802b987
- https://git.kernel.org/stable/c/3415faa1fcb4150f29a72c5ecf959339d797feb7
- https://git.kernel.org/stable/c/3d2e7d3b28469081ccf08301df07cc411a1cc5e9
- https://git.kernel.org/stable/c/4689ba45296dbb3a47e70a1bc2ed0328263e48f3
- https://git.kernel.org/stable/c/87d2429381ddcf8cbd30c8c36793a4f7916d5f99
- https://git.kernel.org/stable/c/9c61d8fe1350b7322f4953318165d6719c3b1475
- https://git.kernel.org/stable/c/dfe28c4167a9259fc0c372d9f9473e1ac95cff67