bnxt_en: Bound SW TPA IDs to prevent crashes
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:
bnxt_en: Bound SW TPA IDs to prevent crashes
FW supports up to 1024 concurrent TPAs, so the FW TPA ID is in the range 0..1023 (see commit ec4d8e7cf024 ("bnxt_en: Add TPA ID mapping logic for 57500 chips.")). bnxt_alloc_agg_idx is intended to wrap the FW ID down to a software ID which is used to index rxr->rx_tpa, and to generate a mapping between FW IDs and the wrapped software ID.
On a 57608 with firmware version 233, the firmware advertises 32 concurrent TPAs. As of the commit under fixes, bp->max_tpa on this NIC is set to 32.
If the software ID from bnxt_alloc_agg_idx is above 31, this results in an invalid address being loaded on this line:
tpa_info = &rxr->rx_tpa[agg_id];
because rx_tpa is allocated with only bp->max_tpa (32) entries. Writes to tpa_info later in the code are out of bounds.
This bug results in a crash at boot:
From the CVE record · Linux
The bnxt_en driver can index beyond its rx_tpa array when a firmware TPA ID maps to a software ID outside the allocated range. This can cause out-of-bounds writes and a kernel crash; the report describes a crash at boot on a 57608 with firmware version 233. The input does not establish an attacker path, authentication requirement, or user interaction requirement.
Engineers running Linux kernels with the bnxt_en driver should check their systems; affected kernel versions are not specified.