CVE-2026-64311: crypto: loongson - Remove broken and unused loongson-rng

Greg Kroah-Hartman <[email protected]> Sat, 25 Jul 2026 10:48:48 +0200
Newsgroups org.kernel.vger.linux-cve-announce
Message-ID <2026072509-CVE-2026-64311-f537@gregkh>
From: Greg Kroah-Hartman <[email protected]>

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

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

crypto: loongson - Remove broken and unused loongson-rng

The loongson-rng rng_alg has several vulnerabilities, including not
providing forward security, and a use-after-free bug due to the use of
wait_for_completion_interruptible().

Meanwhile, the rng_alg framework doesn't really have any purpose in the
first place other than to access the software algorithms crypto/drbg.c
and crypto/jitterentropy.c.  Hardware-specific rng_algs have no
in-kernel user, and unlike hwrng there's no feed into the actual Linux
RNG.  As such, there's really no point to this code.  There are of
course other rng_alg drivers that are similarly unused, but they're
similarly in the process of being phased out, e.g.
https://lore.kernel.org/r/[email protected] and
https://lore.kernel.org/r/[email protected]

Given that, there's no point in fixing forward these vulnerabilities,
and it makes much more sense to simply roll back the addition of this
driver.  If this platform provides TRNG (not PRNG) functionality, it
could make sense to add a hwrng driver, but it would be quite different.

The Linux kernel CVE team has assigned CVE-2026-64311 to this issue.


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

	Issue introduced in 6.18 with commit 766b2d724c8df071031412eea902b566a0049c31 and fixed in 6.18.39 with commit 037ec8353711c79353b12d5634e0c9ff363a9efa
	Issue introduced in 6.18 with commit 766b2d724c8df071031412eea902b566a0049c31 and fixed in 7.1.4 with commit 43de8b9f01b7dd2f6ca5360c6bf2f203c02288dc
	Issue introduced in 6.18 with commit 766b2d724c8df071031412eea902b566a0049c31 and fixed in 7.2-rc1 with commit af3d1bb9a09daf928fc3f173689fb7904d6a6d4f

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-64311
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:
	MAINTAINERS
	arch/loongarch/configs/loongson32_defconfig
	arch/loongarch/configs/loongson64_defconfig
	drivers/crypto/Kconfig
	drivers/crypto/Makefile
	drivers/crypto/loongson/Kconfig
	drivers/crypto/loongson/Makefile
	drivers/crypto/loongson/loongson-rng.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/037ec8353711c79353b12d5634e0c9ff363a9efa
	https://git.kernel.org/stable/c/43de8b9f01b7dd2f6ca5360c6bf2f203c02288dc
	https://git.kernel.org/stable/c/af3d1bb9a09daf928fc3f173689fb7904d6a6d4f