thunderbolt: Bound the DROM dual link port number before indexing sw->ports
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ cd22e73bdf5eff7e68a0f8bdfbce123ad43651f6 · < 40d2ffb74094cf36edbe05855566a4c58b6ce808| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
thunderbolt: Bound the DROM dual link port number before indexing sw->ports
tb_drom_parse_entry_port() validates the device-supplied header->index against sw->config.max_port_number before indexing sw->ports[], but the sibling field entry->dual_link_port_nr -- a 6-bit value also read from the DROM -- indexes the same array with no such check. A malicious or malformed Thunderbolt device can set dual_link_port_nr beyond the allocated sw->ports[] (max_port_number + 1 entries), producing an out-of-bounds tb_port pointer that is stored and later dereferenced.
Reject a port entry whose dual_link_port_nr exceeds max_port_number, the same bound already applied to header->index.
From the CVE record · Linux
The Linux kernel does not check a device-supplied Thunderbolt DROM dual-link port number before using it to index a port array. A malicious or malformed Thunderbolt device can supply an out-of-range value, creating a pointer that is later dereferenced.
Engineers running Linux kernels with Thunderbolt support should check their versions against the vendor advisory; affected versions were not provided.