CVE-2024-56717: net: mscc: ocelot: fix incorrect IFH SRC_PORT field in ocelot_ifh_set_basic()
In the Linux kernel, the following vulnerability has been resolved:
net: mscc: ocelot: fix incorrect IFH SRCPORT field in ocelotifhsetbasic()
Packets injected by the CPU should have a SRCPORT field equal to the CPU port module index in the Analyzer block (ocelot->numphysports).
The blamed commit copied the ocelotifhsetbasic() call incorrectly from ocelotxmitcommon() in net/dsa/tagocelot.c. Instead of calling with "x", it calls with BITULL(x), but the field is not a port mask, but rather a single port index.
[ side note: this is the technical debt of code duplication :( ]
The error used to be silent and doesn't appear to have other user-visible manifestations, but with new changes in the packing library, it now fails loudly as follows:
------------[ cut here ]------------ Cannot store 0x40 inside bits 46-43 - will truncate sja1105 spi2.0: xmit timed out WARNING: CPU: 1 PID: 102 at lib/packing.c:98 pack+0x90/0x198 sja1105 spi2.0: timed out polling for tstamp CPU: 1 UID: 0 PID: 102 Comm: felixxmit Tainted: G W N 6.13.0-rc1-00372-gf706b85d972d-dirty #2605 Call trace: pack+0x90/0x198 (P) pack+0x90/0x198 (L) packing+0x78/0x98 ocelotifhsetbasic+0x260/0x368 ocelotportinjectframe+0xa8/0x250 felixportdeferredxmit+0x14c/0x258 kthreadworkerfn+0x134/0x350 kthread+0x114/0x138
The code path pertains to the ocelot switchdev driver and to the felix secondary DSA tag protocol, ocelot-8021q. Here seen with ocelot-8021q.
The messenger (packing) is not really to blame, so fix the original commit instead.
Other sources
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.223-1Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.27-1 - Upgrade
Upgrade
debian/linux-6.1to a version that resolves this vulnerability.Fixed in 6.1.129-1~deb11u1
Event History
Frequently Asked Questions
What is the severity of CVE-2024-56717?
CVE-2024-56717 has not been assigned a specific severity rating, but it involves a fix in the Linux kernel that addresses packet handling.
How do I fix CVE-2024-56717?
To fix CVE-2024-56717, upgrade to the latest version of the Linux kernel that includes the patch.
Which versions of the Linux kernel are affected by CVE-2024-56717?
CVE-2024-56717 affects Linux kernel versions between 6.1.107 to 6.1.122, 6.6.48 to 6.6.68, 6.10.7 to 6.12.7, and specific release candidates 6.13-rc1, 6.13-rc2, and 6.13-rc3.
What kind of vulnerability is CVE-2024-56717?
CVE-2024-56717 is a vulnerability related to incorrect packet handling in the Linux kernel.
Is CVE-2024-56717 actively being exploited?
There is currently no public indication that CVE-2024-56717 is being actively exploited in the wild.