dpaa2-switch: rework FDB management on the bridge leave path
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 539dda3c5d190c5088b5e57944b1b482fcb464de · < efc1d92eacf03afa6f4d53bf7120e059b6f961f2| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
dpaa2-switch: rework FDB management on the bridge leave path
On bridge leave, the dpaa2_switch_port_set_fdb() function always allocates a new FDB for the port which is becoming standalone. In case no FDB is found, then the port leaving a bridge will continue to use the current one.
The above logic does not cover the case in which there are multiple bridges which have ports from the same DPSW instance. In this case, when the last port leaves bridge #1, it finds an unused FDB to switch to, but the old FDB is not marked as unused. Since the number of FDBs is equal to the number of DPSW interfaces, this will eventually lead to multiple ports sharing the same FDB.
Fix this by changing how we are managing the FDBs on the leave path. Instead of directly allocating a new FDB, first verify if the current port is the last one to leave a bridge. If this is the case, then continue to use the current FDB and only allocate another FDB if there are other ports remaining in the bridge.
From the CVE record · Linux
The Linux kernel dpaa2-switch bridge-leave path can mismanage forwarding databases (FDBs) when multiple bridges have ports on the same DPSW instance. As ports leave bridges, multiple ports can eventually share one FDB. The input does not describe an attacker, access requirements, or user interaction.
Engineers running Linux kernels with dpaa2-switch should check their deployments; affected versions are not specified.