Linux: net: dsa: sja1105: flower: reject cross-chip redirect
What fixes it
- 6bf5158af52a5293e9160d8f2992c629ca14aa7dLinuxCVE List
- 277f8611e017d3ff1ab06af58a6c538b55da1cc8LinuxCVE List
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
In the Linux kernel, the following vulnerability has been resolved:
net: dsa: sja1105: flower: reject cross-chip redirect
dsa_port_from_netdev() may return a valid port from a different switch chip. Programming another chip's port index into the local hardware causes redirection to the wrong port, or an out-of-bounds access if the index exceeds the local chip's port count.
Apply a minimal fix that adds a check to catch this case and adjusts the extack message. When cls->common.skip_sw is not set, the operation could instead redirect to the upstream port and let the software or upstream switch(es) handle the forward, but that is not addressed here.
Text from CVE List
Affected versions 16
- Linuxaffected: dfacc5a23e227cabdff41b6202f510398e90d36b before 6bf5158af52a5293e9160d8f2992c629ca14aa7dCVE List
- Linuxaffected: dfacc5a23e227cabdff41b6202f510398e90d36b before 277f8611e017d3ff1ab06af58a6c538b55da1cc8CVE List
- Linuxaffected: dfacc5a23e227cabdff41b6202f510398e90d36b before eb177aa00c392de3dc530c34f173a962216f82ddCVE List
- Linuxaffected: dfacc5a23e227cabdff41b6202f510398e90d36b before d0e54098c072b6064cdcf8039075ada8b88583daCVE List
- Linuxaffected: dfacc5a23e227cabdff41b6202f510398e90d36b before c999cc39775381b68ed66eae57c1425452672c0fCVE List
- Linuxaffected: dfacc5a23e227cabdff41b6202f510398e90d36b before abd7511e12b231798332afa04ed9bee9e84f9445CVE List
- Linuxaffected: dfacc5a23e227cabdff41b6202f510398e90d36b before cfa5274a5dc2a23b957da5dc806d2ac0c7a66af0CVE List
- Linuxaffected: 5.8CVE List
- Linuxunaffected: all versions before 5.8CVE List
- Linuxunaffected: 5.10.271 through 5.10.*CVE List
- Linuxunaffected: 5.15.222 through 5.15.*CVE List
- Linuxunaffected: 6.1.189 through 6.1.*CVE List
- Linuxunaffected: 6.6.158 through 6.6.*CVE List
- Linuxunaffected: 6.12.111 through 6.12.*CVE List
- Linuxunaffected: 6.18.53 through 6.18.*CVE List
- Linuxunaffected: 7.2CVE List
References 7
- git.kernel.org/stable/c/6bf5158af52a5293e9160d8f2992c629ca14aa7dReferencevia CVE List
- git.kernel.org/stable/c/277f8611e017d3ff1ab06af58a6c538b55da1cc8Referencevia CVE List
- git.kernel.org/stable/c/eb177aa00c392de3dc530c34f173a962216f82ddReferencevia CVE List
- git.kernel.org/stable/c/d0e54098c072b6064cdcf8039075ada8b88583daReferencevia CVE List
- git.kernel.org/stable/c/c999cc39775381b68ed66eae57c1425452672c0fReferencevia CVE List
- git.kernel.org/stable/c/abd7511e12b231798332afa04ed9bee9e84f9445Referencevia CVE List
- git.kernel.org/stable/c/cfa5274a5dc2a23b957da5dc806d2ac0c7a66af0Referencevia CVE List