CVE-2026-139488: wifi: mt76: mt7996: do not reuse the deflink of a removed station link
In the Linux kernel, the following vulnerability has been resolved:
wifi: mt76: mt7996: do not reuse the deflink of a removed station link
mt7996macstainitlink() puts a new link in msta->deflink whenever the station has no primary link. A removed link keeps its mstalink until the station is removed, and the station has no primary link after one mt7996macstachangelinks() call removes all of its links and adds others. If the removed primary link was in msta->deflink, the new link then overwrites it: both link slots point to the same mstalink, and the WTBL index of the removed link is lost, so mt7996macstaremove() never returns it to wcidmask.
Use msta->deflink only if no link slot of the station points to it, and allocate the mstalink otherwise. Choose the primary link as before.