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 SRC_PORT field in ocelot_ifh_set_basic()
Packets injected by the CPU should have a SRC_PORT field equal to the
CPU port module index in the Analyzer block (ocelot->num_phys_ports).
The blamed commit copied the ocelot_ifh_set_basic() call incorrectly
from ocelot_xmit_common() in net/dsa/tag_ocelot.c. Instead of calling
with "x", it calls with BIT_ULL(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: felix_xmit
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
ocelot_ifh_set_basic+0x260/0x368
ocelot_port_inject_frame+0xa8/0x250
felix_port_deferred_xmit+0x14c/0x258
kthread_worker_fn+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.
Security readout for executives and security teams
Plain-English summary
This is a Linux kernel networking bug in specialized switch hardware support. On affected systems, locally triggered packet injection through the Ocelot/Felix switch driver path can fail loudly and disrupt availability. The cited CVSS is 5.5, with no confidentiality or integrity impact stated.
Executive priority
Treat as targeted moderate priority. It matters most for embedded, networking, or appliance-like Linux deployments using affected switch silicon. Patch during the normal security cycle unless those devices are operationally critical or already showing network instability.
Technical view
The bug is an incorrect SRC_PORT field value in ocelot_ifh_set_basic(). A port index was treated like a bitmask, causing packing failures and transmit timeouts in Ocelot switchdev and Felix secondary DSA tag protocol ocelot-8021q paths.
Likely exposure
Exposure is likely limited to Linux systems using Microsemi Ocelot switchdev or Felix DSA ocelot-8021q networking paths. General Linux servers without that hardware and driver path are unlikely exposed based on the supplied evidence.
Exploitation context
The CVSS vector requires local access and low privileges, with high availability impact. The bundle marks KEV as false, and no cited source claims active exploitation. The evidence describes driver failure conditions, not public weaponization.
Researcher notes
The source describes a correctness bug exposed by packing library behavior. The affected surface is driver-specific, and the supplied data does not prove remote reachability. Validate exposure through kernel branch, hardware, enabled driver, and runtime path evidence.
Mitigation direction
Apply the relevant Linux stable kernel fixes referenced by kernel.org.
Follow distribution guidance, including the cited Debian LTS advisory where applicable.
Prioritize systems using Ocelot or Felix switch hardware paths.
Check vendor kernel packages rather than backporting manually unless required.
Schedule testing for network availability after kernel updates.
Validation and detection
Inventory kernel versions against the CVE and distribution advisories.
Confirm whether mscc ocelot, felix, or ocelot-8021q paths are in use.
Review logs for packing warnings, transmit timeouts, or timestamp polling timeouts.
Test packet forwarding and switch functions after remediation.
Document non-exposure when the relevant hardware or drivers are absent.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2024-56717 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.