Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CET breaks 32bit x86 without SSE2, affects VIA Nehemiah (openssl 3.0) #18334

Closed
sebastianas opened this issue May 17, 2022 · 0 comments
Closed
Labels
branch: master Merge to master branch branch: 3.0 Merge to openssl-3.0 branch triaged: bug The issue/pr is/fixes a bug

Comments

@sebastianas
Copy link
Contributor

This has been submit as Debian bug report by Wolfgang Walter.

The VIA Nehemiah is a 32bit x86 without SSE2. The CET related "endbranch" statement in crypto/perlasm/x86asm.pl leads to an invalid opcode. The ENDBR32 instruction is enabled by gcc if multi byte ops are supported based on the SSE2 feature flag, see gcc's cet.m4.

Could we please add an option to that perl script so that it can be set from the Configurations template if the CET opcode should be emitted? I could probably submit a patch if someone outlines the idea ;)

Sebastian

@sebastianas sebastianas added the issue: bug report The issue was opened to report a bug label May 17, 2022
@t8m t8m added branch: master Merge to master branch triaged: bug The issue/pr is/fixes a bug branch: 3.0 Merge to openssl-3.0 branch and removed issue: bug report The issue was opened to report a bug labels May 18, 2022
sebastianas added a commit to sebastianas/openssl that referenced this issue May 19, 2022
The VIA Nehemiah CPU is a x86-32 CPU without SSE2 support. It does not
support multi byte nops and considers the endb32 opcode as an invalid
instruction.

Add an ifdef around the endbr32 opcode on x86-32.

Fixes: openssl#18334
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
sebastianas added a commit to sebastianas/openssl that referenced this issue May 19, 2022
The VIA Nehemiah CPU is a x86-32 CPU without SSE2 support. It does not
support multi byte nops and considers the endb32 opcode as an invalid
instruction.

Add an ifdef around the endbr32 opcode on x86-32.

Fixes: openssl#18334
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
openssl-machine pushed a commit that referenced this issue May 24, 2022
The VIA Nehemiah CPU is a x86-32 CPU without SSE2 support. It does not
support multi byte nops and considers the endb32 opcode as an invalid
instruction.

Add an ifdef around the endbr32 opcode on x86-32.

Fixes: #18334
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from #18353)

(cherry picked from commit 2721387)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch: master Merge to master branch branch: 3.0 Merge to openssl-3.0 branch triaged: bug The issue/pr is/fixes a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants