# CVE-2018-14779: libykpiv1: A buffer overflow issue was discovered in the Yubico-Piv 1.5.0 smartcard driver

CVE-2018-14779 is fixed in 3 products on 1 platform, first by libykpiv1 1.4.2-2ubuntu0.1, released August 15, 2018. It is not reported as exploited. Patch Radar priority: High.

- Web page: https://patchblox.com/security/cve/CVE-2018-14779
- Priority: High
- CVSS: n/a (High)
- EPSS: 0.0049
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Aug 15, 2018

## 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 &gt; 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.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | libykpiv1 Ubuntu 18.04.6 LTS (bionic) | 1.4.2-2ubuntu0.1 | [libykpiv1 1.4.2-2ubuntu0.1](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-libykpiv1-1.4.2-2ubuntu0.1.md) | Aug 15, 2018 |
| Linux | ykcs11 Ubuntu 18.04.6 LTS (bionic) | 1.4.2-2ubuntu0.1 | [ykcs11 1.4.2-2ubuntu0.1](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-ykcs11-1.4.2-2ubuntu0.1.md) | Aug 15, 2018 |
| Linux | yubico-piv-tool Ubuntu 18.04.6 LTS (bionic) | 1.4.2-2ubuntu0.1 | [yubico-piv-tool 1.4.2-2ubuntu0.1](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-yubico-piv-tool-1.4.2-2ubuntu0.1.md) | Aug 15, 2018 |

---

Data as of 2026-11-07T18:46:35Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
