- Package:
- src:nettle
- Source:
- src:nettle
- Submitter:
- Daniel Kahn Gillmor
- Date:
- 2023-11-21 02:06:02 UTC
- Severity:
- normal
- Tags:
in Message-ID: cpffs17kwvd.fsf@shipon.lysator.liu.se on the nettle-bugs mailing list, Niels Möller observed some new tests to identify side-channel silence that depend on valgrind, but their CI is only running on x86-64. It looks to me like none of the valgrind tests are being run during build on the debian buildd network. It could help the upstream project to get verified valgrind results. The attached patch runs the valgrind tests during build, but i also note that it causes a build failure on amd64 platforms, because of what appears to be data-dependent branching during RSA decryption. I've raised that concern on the upstream nettle-bugs mailing list (and Cc'ed Magnus) to try to figure out what we should do to avoid this negative result. So it's probably not safe yet to just apply this patch unilaterally (at least not in unstable -- maybe in experimental for now to get records from the various build daemons that build experimental?) But the fact that there is a negative result which the current build process doesn't catch suggests that we should probably be running the tests in more detail.
After discussion on the nettle-bugs mailing list, It looks like the most straightforward way to avoid the valgrind failure in rsa-sec-decrypt-test is just to not mark the ciphertext as undefined. This allows the test code to pass even though there's a ciphertext-dependent branching path based on ensuring that the ciphertext is well-formed. The patch below allows the build to complete, with the valgrind tests, on the amd64 arch. I haven't tested it on all the other architectures, but one approach would be to make an upload to debian experimental, with just these changes, to see how the experimental build daemons deal with it. Magnus, If you're OK with my doing that, please let me know, and i can do an NMU.