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

sha2: fix incorrect sha256 hash issue #7

Closed
wants to merge 4 commits into from

Commits on Jun 7, 2023

  1. cavs2c: fix typo in filename

    Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
    cyphar committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    e513adc View commit details
    Browse the repository at this point in the history
  2. autoconf: always set -fno-strict-aliasing

    Our sha2 code has undefined behaviour when compiled with
    -fstrict-aliasing (applied by default with -O2 in GCC), and in GCC >=
    11, this undefined behaviour results in incorrect sha256 digests to be
    returned from libnbcompat.
    
    Autoconf is not really meant to be used to set specific compiler flags
    (since they are non-portable by definition) but the most portable way of
    adding these is to use the macros provided by autoconf-archive. The new
    m4/ scripts are from version v2023.02.20 of autoconf-archive[1].
    
    [1]: https://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=commit;h=v2023.02.20
    
    Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
    cyphar committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    b14b9ae View commit details
    Browse the repository at this point in the history
  3. automake: use libnbcompat.la when linking test files

    This ensures that we link with whatever form of libnbcompat autoconf
    feels is correct. Note that autoconf makes sure that we are using the
    locally-compiled .so as well (in this configuration, the *-test
    "binaries" are actually shell scripts that set LD_LIBRARY_PATH among
    many other hacks).
    
    I'm not sure whether this change makes any real difference in practice,
    but it is probably the way that you're "supposed" to link against a
    libtool-ised library within the same project.
    
    Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
    cyphar committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    32f1afe View commit details
    Browse the repository at this point in the history
  4. gha: add CI tests for most GCC versions

    This should ensure that we never miss another hashing issue (at least
    among the hash functions we currently test).
    
    Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
    cyphar committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    7774769 View commit details
    Browse the repository at this point in the history