CVE-2024-45019: net/mlx5e: Take state lock during tx timeout reporter
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
net/mlx5e: Take state lock during tx timeout reporter
mlx5e_safe_reopen_channels() requires the state lock taken. The referenced changed in the Fixes tag removed the lock to fix another issue. This patch adds it back but at a later point (when calling mlx5e_safe_reopen_channels()) to avoid the deadlock referenced in the Fixes tag.
The Linux kernel CVE team has assigned CVE-2024-45019 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.1.69 with commit 514232495aa5 and fixed in 6.1.107 with commit 03d3734bd692 Issue introduced in 6.6.8 with commit 8ce3d969348a and fixed in 6.6.48 with commit b3b9a87adee9 Issue introduced in 6.7 with commit eab0da38912e and fixed in 6.10.7 with commit 8e57e66ecbdd Issue introduced in 6.7 with commit eab0da38912e and fixed in 6.11-rc4 with commit e6b5afd30b99
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-2024-45019
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/mellanox/mlx5/core/en/reporter_tx.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/03d3734bd692affe4d0e9c9d638f491aaf37411b https://git.kernel.org/stable/c/b3b9a87adee97854bcd71057901d46943076267e https://git.kernel.org/stable/c/8e57e66ecbdd2fddc9fbf3e984b1c523b70e9809 https://git.kernel.org/stable/c/e6b5afd30b99b43682a7764e1a74a42fe4d5f4b3