Description
An out-of-bounds read issue was discovered in the Yubico-Piv 1.5.0 smartcard driver. The file lib/ykpiv.c contains the following code in the function `_ykpiv_fetch_object()`: {% highlight c %} if(sw == SW_SUCCESS) { size_t outlen; int offs = _ykpiv_get_length(data + 1, &outlen); if(offs == 0) { return YKPIV_SIZE_ERROR; } memmove(data, data + 1 + offs, outlen); *len = outlen; return YKPIV_OK; } else { return YKPIV_GENERIC_ERROR; } {% endhighlight %} -- in the end, a `memmove()` occurs with a length retrieved from APDU data. This length is not checked for whether it is outside of the APDU data retrieved. Therefore the `memmove()` could copy bytes behind the allocated data buffer into this buffer.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | yubico-piv-tool | 1.6.1-1 | — |
| Debian 13 | yubico-piv-tool | 1.6.1-1 | — |
| Debian 12 | yubico-piv-tool | 1.6.1-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 18.04 LTS | yubico-piv-tool | 1.4.2-2ubuntu0.1 | USN-4276-1 |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 16.04 LTS | yubico-piv-tool | 1.0.3-1ubuntu0.1~esm1 | USN-4846-1 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 | yubico-piv-tool | 1.5.0-3.3.33 | SUSE-SU-2019:1123-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | yubico-piv-tool | 2.2.0-1.5 | openSUSE-SU-2024:11537-1 |
| openSUSE Leap 15.0 | yubico-piv-tool | 1.5.0-lp150.2.3.1 | openSUSE-SU-2019:1341-1 |
Advisories 5
- USN-4846-1 yubico-piv-tool vulnerabilities Ubuntu Security Notices (USN) · Jun 25, 2026
- USN-4276-1 Yubico PIV Tool vulnerabilities Ubuntu Security Notices (USN) · Apr 22, 2026
- openSUSE-SU-2024:11537-1 libykcs11-2-2.2.0-1.5 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2019:1341-1 Security update for yubico-piv-tool SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2019:1123-1 Security update for yubico-piv-tool SUSE / openSUSE Security Updates · Feb 4, 2026