Skip to content
OpenAdvisories
Unscored CVE-2018-14779 EUVD-2018-6663GHSA-rvwc-p7mj-cmgq

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 fu…

Published Aug 15, 2018 · Updated Aug 5, 2024 · Assigned by mitre

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.

ReleasePackageFixed inAdvisory
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 —
ReleasePackageFixed inAdvisory
Ubuntu 18.04 LTS yubico-piv-tool 1.4.2-2ubuntu0.1 USN-4276-1
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 16.04 LTS yubico-piv-tool 1.0.3-1ubuntu0.1~esm1 USN-4846-1
ReleasePackageFixed inAdvisory
SLES 15 yubico-piv-tool 1.5.0-3.3.33 SUSE-SU-2019:1123-1
ReleasePackageFixed inAdvisory
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

References