HIGH Introduced in 5.10
sun8i-ss Prng UAF
CVE-2026-80833
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
01Description
In the Linux kernel, the following vulnerability has been resolved: crypto: sun8i-ss - Remove crypto_rng interface Since the crypto_rng interface for hardware PRNGs is unused and is redundant with hwrng and the actual Linux RNG, it's being phased out. Most drivers for it were already removed. Go ahead and remove the sun8i-ss support which is one of the only remaining ones. As usual for crypto_rng, this driver was also buggy: its ->generate() function had a use-after-free vulnerability due to using wait_for_completion_interruptible_timeout() without handling shutting down the DMA operation if a signal is sent. Also, it had a buffer overread bug in the line 'memcpy(ctx->seed, d + dlen, ctx->slen);'. There's no point in fixing these bugs separately only to remove the code anyway, so this commit is marked with Fixes and Cc stable.
02KernelScan AI Analysis
Risk summary
A local unprivileged user on a system with an Allwinner SoC and the sun8i-ss PRNG config enabled can trigger a use-after-free or buffer overread in the kernel crypto driver through the AF_ALG socket interface. The UAF occurs when a signal interrupts a DMA wait without proper cleanup, and the overread happens when a user-controlled seed size exceeds the allocated buffer. Both can lead to kernel memory corruption, potentially resulting in privilege escalation or denial of service.
Vulnerability analysis
The Allwinner Security System PRNG driver's random number generation function has two memory safety flaws. First, when a signal interrupts the wait for a hardware DMA operation to complete, the code does not properly shut down the DMA transfer before continuing, leading to a use-after-free as the function proceeds to unmap and access buffers that may be in an inconsistent state. Second, when saving the updated seed after generation, the code copies a user-controlled number of bytes from the output buffer without verifying it fits within the allocated space, causing a heap buffer overread. The fix removes the entire crypto_rng interface from this driver, as it is redundant with the standard hwrng and Linux RNG subsystems and was one of the last remaining implementations. The vulnerable code path is reachable by any local user through the kernel crypto API (AF_ALG sockets) on systems equipped with Allwinner SoCs that have the PRNG configuration option enabled.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.10 | 5.10 | 5.10.271 | 9127d2a88c17 |
| 5.15 | 5.10 | 5.15.222 | 64f3406ad082 |
| 6.1 | 5.10 | 6.1.189 | 6117968fe2cd |
| 6.6 | 5.10 | 6.6.158 | a41e4ba94ad4 |
| 6.12 | 5.10 | 6.12.109 | d29ccf9eeb67 |
| 6.18 | 5.10 | 6.18.50 | 7c257a295e05 |
| 7.2 | 5.10 | 7.2.3 | 8ab58786b4c6 |
| mainline | 5.10 | 7.3-rc1 | a78446ee6fae |
| cip/6.12 | 5.10 | 6.12.111-cip32 | d29ccf9eeb67 |