OPENSSL_cleanse() may crash on some 32bit sparc cpus (sometimes)
#21 898 ouverte le 30 août 2023
Métriques du dépôt
- Stars
- (30 157 stars)
- Métriques de merge PR
- (Aucune PR mergée en 30 j)
Description
The (tricky, I like it!) sparc v9 vs. sparc v8 detection code in OPENSSL_cleanse may sometimes go wrong on some CPUs and eroneously go into the v9 branch, where it then crashes on the STX instructions with an invalid op code trap.
The problem is that some CPUs do not implement the rd %asr instructions fully, but instead always read the y register. If, by chance, %y contains 99 at the start of the function, it will detect the CPU as a v9 implementation.
An example of such a CPU is the microSPARC IIep, I originally ran into the crash by doing "openssl speed" on a SparcStation LX, which has a TI TMS390S10.