Subject: CVE-2024-27430: netrom: Fix a data-race around sysctl_netrom_default_path_quality

From: Greg Kroah-Hartman <[email-masked]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

netrom: Fix a data-race around sysctl_netrom_default_path_quality

We need to protect the reader reading sysctl_netrom_default_path_quality
because the value can be changed concurrently.

The Linux kernel CVE team has assigned CVE-2024-27430 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 2.6.12 with commit 1da177e4c3f4 and fixed in 4.19.310 with commit 7644df766006
	Issue introduced in 2.6.12 with commit 1da177e4c3f4 and fixed in 5.4.272 with commit 7f615232556f
	Issue introduced in 2.6.12 with commit 1da177e4c3f4 and fixed in 5.10.213 with commit e041df5dc9e6
	Issue introduced in 2.6.12 with commit 1da177e4c3f4 and fixed in 5.15.152 with commit bbc21f134b89
	Issue introduced in 2.6.12 with commit 1da177e4c3f4 and fixed in 6.1.82 with commit dec82a8fc45c
	Issue introduced in 2.6.12 with commit 1da177e4c3f4 and fixed in 6.6.22 with commit 7510b08c5f5b
	Issue introduced in 2.6.12 with commit 1da177e4c3f4 and fixed in 6.7.10 with commit 392eb88416dc
	Issue introduced in 2.6.12 with commit 1da177e4c3f4 and fixed in 6.8 with commit 958d6145a6d9

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-27430
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/7644df766006d4878a556e427e3ecc78c2d5606b
	https://git.kernel.org/stable/c/7f615232556f3c6e3eeecef96ef2b00d0aa905bb
	https://git.kernel.org/stable/c/e041df5dc9e68adffcba5499ca28e1252bed6f4b
	https://git.kernel.org/stable/c/bbc21f134b89535d1cf110c5f2b33ac54e5839c4
	https://git.kernel.org/stable/c/dec82a8fc45c6ce494c2cb31f001a2aadb132b57
	https://git.kernel.org/stable/c/7510b08c5f5ba15983da004b021fc6154eeb4047
	https://git.kernel.org/stable/c/392eb88416dcbc5f1d61b9a88d79d78dc8b27652
	https://git.kernel.org/stable/c/958d6145a6d9ba9e075c921aead8753fb91c9101