CVE-2024-38558
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
19/06/2024
Last modified:
04/11/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
net: openvswitch: fix overwriting ct original tuple for ICMPv6<br />
<br />
OVS_PACKET_CMD_EXECUTE has 3 main attributes:<br />
- OVS_PACKET_ATTR_KEY - Packet metadata in a netlink format.<br />
- OVS_PACKET_ATTR_PACKET - Binary packet content.<br />
- OVS_PACKET_ATTR_ACTIONS - Actions to execute on the packet.<br />
<br />
OVS_PACKET_ATTR_KEY is parsed first to populate sw_flow_key structure<br />
with the metadata like conntrack state, input port, recirculation id,<br />
etc. Then the packet itself gets parsed to populate the rest of the<br />
keys from the packet headers.<br />
<br />
Whenever the packet parsing code starts parsing the ICMPv6 header, it<br />
first zeroes out fields in the key corresponding to Neighbor Discovery<br />
information even if it is not an ND packet.<br />
<br />
It is an &#39;ipv6.nd&#39; field. However, the &#39;ipv6&#39; is a union that shares<br />
the space between &#39;nd&#39; and &#39;ct_orig&#39; that holds the original tuple<br />
conntrack metadata parsed from the OVS_PACKET_ATTR_KEY.<br />
<br />
ND packets should not normally have conntrack state, so it&#39;s fine to<br />
share the space, but normal ICMPv6 Echo packets or maybe other types of<br />
ICMPv6 can have the state attached and it should not be overwritten.<br />
<br />
The issue results in all but the last 4 bytes of the destination<br />
address being wiped from the original conntrack tuple leading to<br />
incorrect packet matching and potentially executing wrong actions<br />
in case this packet recirculates within the datapath or goes back<br />
to userspace.<br />
<br />
ND fields should not be accessed in non-ND packets, so not clearing<br />
them should be fine. Executing memset() only for actual ND packets to<br />
avoid the issue.<br />
<br />
Initializing the whole thing before parsing is needed because ND packet<br />
may not contain all the options.<br />
<br />
The issue only affects the OVS_PACKET_CMD_EXECUTE path and doesn&#39;t<br />
affect packets entering OVS datapath from network interfaces, because<br />
in this case CT metadata is populated from skb after the packet is<br />
already parsed.
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.11 (including) | 4.19.316 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.20 (including) | 5.4.278 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.5 (including) | 5.10.219 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11 (including) | 5.15.161 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 6.1.93 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2 (including) | 6.6.33 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.8.12 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.9 (including) | 6.9.3 (excluding) |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/0b532f59437f688563e9c58bdc1436fefa46e3b5
- https://git.kernel.org/stable/c/431e9215576d7b728f3f53a704d237a520092120
- https://git.kernel.org/stable/c/483eb70f441e2df66ade78aa7217e6e4caadfef3
- https://git.kernel.org/stable/c/5ab6aecbede080b44b8e34720ab72050bf1e6982
- https://git.kernel.org/stable/c/6a51ac92bf35d34b4996d6eb67e2fe469f573b11
- https://git.kernel.org/stable/c/78741b4caae1e880368cb2f5110635f3ce45ecfd
- https://git.kernel.org/stable/c/7c988176b6c16c516474f6fceebe0f055af5eb56
- https://git.kernel.org/stable/c/9ec8b0ccadb908d92f7ee211a4eff05fd932f3f6
- https://git.kernel.org/stable/c/d73fb8bddf89503c9fae7c42e50d44c89909aad6
- https://git.kernel.org/stable/c/0b532f59437f688563e9c58bdc1436fefa46e3b5
- https://git.kernel.org/stable/c/431e9215576d7b728f3f53a704d237a520092120
- https://git.kernel.org/stable/c/483eb70f441e2df66ade78aa7217e6e4caadfef3
- https://git.kernel.org/stable/c/5ab6aecbede080b44b8e34720ab72050bf1e6982
- https://git.kernel.org/stable/c/6a51ac92bf35d34b4996d6eb67e2fe469f573b11
- https://git.kernel.org/stable/c/78741b4caae1e880368cb2f5110635f3ce45ecfd
- https://git.kernel.org/stable/c/7c988176b6c16c516474f6fceebe0f055af5eb56
- https://git.kernel.org/stable/c/9ec8b0ccadb908d92f7ee211a4eff05fd932f3f6
- https://git.kernel.org/stable/c/d73fb8bddf89503c9fae7c42e50d44c89909aad6
- https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html



