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
F81631630: D35885.id108440.diff
Fri, Apr 19, 6:36 AM
Unknown Object (File)
Fri, Mar 29, 8:29 AM
Unknown Object (File)
Feb 20 2024, 3:06 PM
Unknown Object (File)
Jan 22 2024, 8:46 AM
Unknown Object (File)
Jan 14 2024, 10:28 AM
Unknown Object (File)
Dec 23 2023, 4:54 AM
Unknown Object (File)
Nov 23 2023, 10:23 PM
Unknown Object (File)
Nov 7 2023, 3:35 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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable