CVE-2024-27421: netrom: Fix a data-race around sysctl_netrom_routing_control
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
netrom: Fix a data-race around sysctl_netrom_routing_control
We need to protect the reader reading the sysctl value because the value can be changed concurrently.
The Linux kernel CVE team has assigned CVE-2024-27421 to this issue.
Affected and fixed versions
===========================
Issue introduced in 2.6.12 with commit 1da177e4c3f4 and fixed in 4.19.310 with commit c13fbb5902bc Issue introduced in 2.6.12 with commit 1da177e4c3f4 and fixed in 5.4.272 with commit c4309e5f8e80 Issue introduced in 2.6.12 with commit 1da177e4c3f4 and fixed in 5.10.213 with commit b7d33e083f9d Issue introduced in 2.6.12 with commit 1da177e4c3f4 and fixed in 5.15.152 with commit f9c4d4246417 Issue introduced in 2.6.12 with commit 1da177e4c3f4 and fixed in 6.1.82 with commit 4c02b9ccbb11 Issue introduced in 2.6.12 with commit 1da177e4c3f4 and fixed in 6.6.22 with commit d732b8325132 Issue introduced in 2.6.12 with commit 1da177e4c3f4 and fixed in 6.7.10 with commit 859175d4bc11 Issue introduced in 2.6.12 with commit 1da177e4c3f4 and fixed in 6.8 with commit b5dffcb8f71b
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-27421
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:
net/netrom/nr_route.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/c13fbb5902bce848759385986d4833f5b90782c1 https://git.kernel.org/stable/c/c4309e5f8e80584715c814e1d012dbc3eee5a500 https://git.kernel.org/stable/c/b7d33e083f9d5d39445c0a91e7ad4f3e2c47fcb5 https://git.kernel.org/stable/c/f9c4d42464173b826190fae2283ed1a4bbae0c8b https://git.kernel.org/stable/c/4c02b9ccbb11862ee39850b2b285664cd579b039 https://git.kernel.org/stable/c/d732b83251322ecd3b503e03442247745d6052ce https://git.kernel.org/stable/c/859175d4bc11af829e2fdd261a7effdaba9b5d8f https://git.kernel.org/stable/c/b5dffcb8f71bdd02a4e5799985b51b12f4eeaf76