Page MenuHomeFreeBSD

libcrypto: Work around strict aliasing violations in bn_nist.c
ClosedPublic

Authored by jrtc27 on Jul 24 2022, 1:24 AM.
Tags
None
Referenced Files
F115309568: D35885.diff
Tue, Apr 22, 11:29 AM
Unknown Object (File)
Thu, Apr 17, 10:34 PM
Unknown Object (File)
Tue, Apr 15, 7:46 PM
Unknown Object (File)
Wed, Apr 2, 5:29 AM
Unknown Object (File)
Mar 18 2025, 8:11 AM
Unknown Object (File)
Mar 5 2025, 4:09 AM
Unknown Object (File)
Feb 25 2025, 2:57 AM
Unknown Object (File)
Feb 24 2025, 2:18 PM
Subscribers

Details

Summary

This file is full of strict aliasing violations. Previously it was only
optimised in ways that broke the code by CHERI LLVM, but now it appears
that the in-tree LLVM also breaks it for RISC-V, resulting in broken
ECDSA signature validation with error messages like the following:

root@unmatched:/usr/src # ssh-keygen -l -f /etc/ssh/ssh_host_ecdsa_key
/etc/ssh/ssh_host_ecdsa_key is not a key file.
root@unmatched:/usr/src # git fetch
fatal: unable to access 'https://git.FreeBSD.org/src.git/': error:1012606B:elliptic curve routines:EC_POINT_set_affine_coordinates:point is not on curve

Obtained from: CheriBSD
MFC after: 1 week

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 46516
Build 43405: arc lint + arc unit