CVE-2026-45849: net: mscc: ocelot: add missing lock protection in ocelot_port_xmit_inj()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
net: mscc: ocelot: add missing lock protection in ocelot_port_xmit_inj()
ocelot_port_xmit_inj() calls ocelot_can_inject() and ocelot_port_inject_frame() without holding the injection group lock. Both functions contain lockdep_assert_held() for the injection lock, and the correct caller felix_port_deferred_xmit() properly acquires the lock using ocelot_lock_inj_grp() before calling these functions.
Add ocelot_lock_inj_grp()/ocelot_unlock_inj_grp() around the register injection path to fix the missing lock protection. The FDMA path is not affected as it uses its own locking mechanism.
The Linux kernel CVE team has assigned CVE-2026-45849 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.1.107 with commit 960ec92774e152b677ccd0006abcab7b9dd814c2 and fixed in 6.1.165 with commit 0b217a40156f497e09dd20d3f7baec40c785f386 Issue introduced in 6.6.48 with commit e83b49ecb569c9c5fa7cc30e55cf2c15f71f9f39 and fixed in 6.6.128 with commit cc1b179f778f98270bdbbb48d183b4b6427ae198 Issue introduced in 6.11 with commit c5e12ac3beb0dd3a718296b2d8af5528e9ab728e and fixed in 6.12.75 with commit 7ac58d8832802ec89baa7539e13e6d58a88cce04 Issue introduced in 6.11 with commit c5e12ac3beb0dd3a718296b2d8af5528e9ab728e and fixed in 6.18.14 with commit 51c32ae7fae14552d79f7139614b77c1bbd57a48 Issue introduced in 6.11 with commit c5e12ac3beb0dd3a718296b2d8af5528e9ab728e and fixed in 6.19.4 with commit 63da961381e0d979459dede713001f8452364477 Issue introduced in 6.11 with commit c5e12ac3beb0dd3a718296b2d8af5528e9ab728e and fixed in 7.0 with commit 026f6513c5880c2c89e38ad66bbec2868f978605 Issue introduced in 6.10.7 with commit 609cd73bf38bbd48f1e695e01802114b01aa8811
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-45849
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/net/ethernet/mscc/ocelot_net.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/0b217a40156f497e09dd20d3f7baec40c785f386 https://git.kernel.org/stable/c/cc1b179f778f98270bdbbb48d183b4b6427ae198 https://git.kernel.org/stable/c/7ac58d8832802ec89baa7539e13e6d58a88cce04 https://git.kernel.org/stable/c/51c32ae7fae14552d79f7139614b77c1bbd57a48 https://git.kernel.org/stable/c/63da961381e0d979459dede713001f8452364477 https://git.kernel.org/stable/c/026f6513c5880c2c89e38ad66bbec2868f978605