xfrm/compat: prevent potential spectre v1 gadget in xfrm_xlate32_attr()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
xfrm/compat: prevent potential spectre v1 gadget in xfrm_xlate32_attr()
int type = nla_type(nla);
if (type > XFRMA_MAX) { return -EOPNOTSUPP; }
@type is then used as an array index and can be used as a Spectre v1 gadget.
if (nla_len(nla) < compat_policy[type].len) {
array_index_nospec() can be used to prevent leaking content of kernel memory to malicious users.
From the CVE record · Linux
The Linux kernel’s xfrm_xlate32_attr() can use an attribute type as an array index in a potential Spectre v1 gadget. A malicious user could potentially leak kernel memory through this path; the input does not specify authentication or interaction requirements.
Engineers running the Linux kernel should check whether their build includes the xfrm/compat fix; affected versions are not specified.