Description
A buffer overflow 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_transfer_data()`: {% highlight c %} if(*out_len + recv_len - 2 > max_out) { fprintf(stderr, "Output buffer to small, wanted to write %lu, max was %lu.", *out_len + recv_len - 2, max_out); } if(out_data) { memcpy(out_data, data, recv_len - 2); out_data += recv_len - 2; *out_len += recv_len - 2; } {% endhighlight %} -- it is clearly checked whether the buffer is big enough to hold the data copied using `memcpy()`, but no error handling happens to avoid the `memcpy()` in such cases. This code path can be triggered with malicious data coming from a smartcard.
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