enic: Validate length of nl attributes in enic_set_vf_port
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ f8bd909183acffad68780b10c1cdf36161cfd5d1 · < f6638e955ca00c489894789492776842e102af9c| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
enic: Validate length of nl attributes in enic_set_vf_port
enic_set_vf_port assumes that the nl attribute IFLA_PORT_PROFILE is of length PORT_PROFILE_MAX and that the nl attributes IFLA_PORT_INSTANCE_UUID, IFLA_PORT_HOST_UUID are of length PORT_UUID_MAX. These attributes are validated (in the function do_setlink in rtnetlink.c) using the nla_policy ifla_port_policy. The policy defines IFLA_PORT_PROFILE as NLA_STRING, IFLA_PORT_INSTANCE_UUID as NLA_BINARY and IFLA_PORT_HOST_UUID as NLA_STRING. That means that the length validation using the policy is for the max size of the attributes and not on exact size so the length of these attributes might be less than the sizes that enic_set_vf_port expects. This might cause an out of bands read access in the memcpys of the data of these attributes in enic_set_vf_port.
From the CVE record · Linux
The Linux kernel's enic_set_vf_port function assumes certain netlink attributes have exact lengths, but the attribute policy allows shorter values. Supplying shorter attributes may cause an out-of-bounds read during a memory copy. The input does not specify the access or authentication required to supply them.
Engineers running Linux kernels with the enic driver should check their exposure; affected versions are not specified.