Subject: Re: [PATCH] crypto: sun4i-ss - Remove insecure and unused rng_alg

From: Eric Biggers <[email-masked]>
Date: Mon, 1 Jun 2026 15:54:03 +0000

On Mon, Jun 01, 2026 at 09:19:23AM +0000, Tianchu Chen wrote:
> From: Tianchu Chen <[email-masked]>
> In-Reply-To: <[email-masked]>
> References: <[email-masked]>
> 
> On Fri, May 29, 2026 at 12:36:48PM -0700, Eric Biggers wrote:
> > Remove sun4i_ss_rng, as it is insecure and unused:
> >
> > - It has multiple vulnerabilities.  sun4i_ss_prng_seed() is missing
> >   locking and has a buffer overflow.
> 
> Thanks for cleaning this up.
> 
> For the record, the sun4i_ss_prng_seed() buffer overflow you mention here
> is the same issue we reported earlier with a targeted fix:
>   https://lore.kernel.org/linux-crypto/20260529194152.GA3628@quark/
> 
> It is an unauthenticated, unbounded memcpy() into the 24-byte ss->seed[]
> buffer, reachable from any user via AF_ALG ALG_SET_KEY with no privileges
> on affected Allwinner sun4i hardware.
> 
> Please note that this should be treated as a security fix. For the earlier
> stable releases, keeping the rng_alg but adding a proper bounds check in
> sun4i_ss_prng_seed() might still be a preferable option to consider.
> 
> Given the above, would you mind adding the following trailers to the commit
> message?  Besides crediting the discovery and report, they would also make
> this security issue easier to track and reference across the stable trees:
> 
>   Discovered by Atuin - Automated Vulnerability Discovery Engine
>   Reported-by: Tianchu Chen <[email-masked]>

Yes I'll add those, sorry for forgetting them.

I do think we should proceed with removal, seeing as this driver is
unused, and I found three additional vulnerabilities in it.  So four
security fixes would be needed.  But then we'd be removing the driver
anyway due to it being pointless, so it would just be busy work.

- Eric