Debian Patches

Status for yubihsm-shell/2.6.0-5

Patch Description Author Forwarded Bugs Origin Last update
remove-_FORTIFY_SOURCE.patch Remove redefinition of _FORTIFY_SOURCE
Starting with Ubuntu 24.04, _FORTIFY_SOURCE=3 is a default flag and is
known to provide better mitigation than _FORTIFY_SOURCE=2. This patch
also removes the -O2 flag, since -O3 is now the default on Ubuntu.

On Debian, these are already passed via dpkg-buildflags.
Pushkar Kulkarni <pushkar.kulkarni@canonical.com> not-needed 2024-12-02
unterminated-string-initializations.patch tests: Fix unterminated string initializations
The new GCC 15 reports error when the string initializers overflow the
size of the underlying structure. This is common when the byte strings
are constructed in quotes such as "\xBB" as such this string has
trailing null byte and therefore the size two.

This is not an issue in the tests as they do not expect the string to be
NULL terminated, but it might uncover issues in other cases.

Example of the error:

/builddir/build/BUILD/yubihsm-shell-2.6.0-build/yubihsm-shell-2.6.0/pkcs11/tests/aes_encrypt_test.c:38:3: error: initializer-string for array of ‘unsigned char’ is too long [-Werror=unterminated-string-initialization]
38 | "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jakub Jelen <jjelen@redhat.com> no debian other, https://github.com/Yubico/yubihsm-shell/pull/450 2025-03-09
fix-32bit.patch Fix asym_wrap_test on 32-bit architectures
`C_WrapKey` and `C_UnwrapKey` use `CK_ULONG` for the wrapped key size,
which isn't the same as `size_t` on all architectures. This caused
"passing argument ... from incompatible pointer type" errors on Debian
i386.
Colin Watson <cjwatson@debian.org> yes 2024-09-11
time_t-size.patch Don't assume that sizeof(time_t) == sizeof(long)
On some architectures, such as Debian's 32-bit armel and armhf
architectures after their recent migration to 64-bit `time_t`, the
`time_t` and `long` types are not the same size. Fix `yh_com_benchmark`
to avoid assuming that they are.
Colin Watson <cjwatson@debian.org> yes 2024-09-11

All known versions for source package 'yubihsm-shell'

Links