crypto: sun4i-ss - Remove insecure and unused rng_alg
Subsystems (3)
From: Tianchu Chen <[email protected]>
In-Reply-To: <[email protected]>
References: <[email protected]>
Quoted 4 lines · Eric Biggers
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
Thanks,
Tianchu
Quoted 24 lines · Tianchu Chen
From: Tianchu Chen <[email protected]>
In-Reply-To: <[email protected]>
References: <[email protected]>Quoted 4 lines · Eric Biggers
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 viaAF_ALGALG_SET_KEYwith 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_algbut adding a proper bounds check insun4i_ss_prng_seed()might still be a preferable option to consider.
Quoted 6 lines
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 protected]>
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