net: systemport: Fix buffer overflow in bcm_sysport_get_stats()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: systemport: Fix buffer overflow in bcm_sysport_get_stats()
When running on SYSTEMPORT Lite, certain statistics are unsupported and skipped during bcm_sysport_get_stats(). The variable 'j' tracks the compacted index into the destination data buffer, whereas 'i' iterates over all elements in bcm_sysport_gstrings_stats.
Because the buffer allocated by ethtool is sized only according to bcm_sysport_get_sset_count(), storing values at data[i] instead of data[j] writes past the allocated array bounds, leading to memory corruption.
Fix this by writing to data[j] instead of data[i].
From the CVE record · Linux
On SYSTEMPORT Lite, the Linux kernel’s bcm_sysport_get_stats() can write beyond an ethtool-allocated statistics buffer, causing memory corruption. This can occur when statistics are retrieved; the input does not specify whether an attacker can trigger it remotely or locally, or whether authentication or user interaction is required.
Engineers running the Linux kernel on systems using SYSTEMPORT Lite should check their affected versions; none are specified in the input.