CVE-2024-56717

Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
29/12/2024
Last modified:
03/11/2025

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> net: mscc: ocelot: fix incorrect IFH SRC_PORT field in ocelot_ifh_set_basic()<br /> <br /> Packets injected by the CPU should have a SRC_PORT field equal to the<br /> CPU port module index in the Analyzer block (ocelot-&gt;num_phys_ports).<br /> <br /> The blamed commit copied the ocelot_ifh_set_basic() call incorrectly<br /> from ocelot_xmit_common() in net/dsa/tag_ocelot.c. Instead of calling<br /> with "x", it calls with BIT_ULL(x), but the field is not a port mask,<br /> but rather a single port index.<br /> <br /> [ side note: this is the technical debt of code duplication :( ]<br /> <br /> The error used to be silent and doesn&amp;#39;t appear to have other<br /> user-visible manifestations, but with new changes in the packing<br /> library, it now fails loudly as follows:<br /> <br /> ------------[ cut here ]------------<br /> Cannot store 0x40 inside bits 46-43 - will truncate<br /> sja1105 spi2.0: xmit timed out<br /> WARNING: CPU: 1 PID: 102 at lib/packing.c:98 __pack+0x90/0x198<br /> sja1105 spi2.0: timed out polling for tstamp<br /> CPU: 1 UID: 0 PID: 102 Comm: felix_xmit<br /> Tainted: G W N 6.13.0-rc1-00372-gf706b85d972d-dirty #2605<br /> Call trace:<br /> __pack+0x90/0x198 (P)<br /> __pack+0x90/0x198 (L)<br /> packing+0x78/0x98<br /> ocelot_ifh_set_basic+0x260/0x368<br /> ocelot_port_inject_frame+0xa8/0x250<br /> felix_port_deferred_xmit+0x14c/0x258<br /> kthread_worker_fn+0x134/0x350<br /> kthread+0x114/0x138<br /> <br /> The code path pertains to the ocelot switchdev driver and to the felix<br /> secondary DSA tag protocol, ocelot-8021q. Here seen with ocelot-8021q.<br /> <br /> The messenger (packing) is not really to blame, so fix the original<br /> commit instead.

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.1.107 (including) 6.1.122 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.6.48 (including) 6.6.68 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.10.7 (including) 6.12.7 (excluding)
cpe:2.3:o:linux:linux_kernel:6.13:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc3:*:*:*:*:*:*