Skip to content

CVE-2018-14779 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 +...

MediumCVSS 6.8 EPSS 0.49%
Published
Updated
Exploit status
No public exploit known
Technology
UbuntuDebian

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.

Upgrade path

8 packages: 8 fixed.

PackageAffectedFixed inStatus
debian/yubico-piv-tool(Debian 12) < 1.6.1-1 1.6.1-1 Fixed
debian/yubico-piv-tool(Debian 13) < 1.6.1-1 1.6.1-1 Fixed
debian/yubico-piv-tool(Debian 14) < 1.6.1-1 1.6.1-1 Fixed
ubuntu/yubico-piv-tool(Ubuntu 18.04) < 1.4.2-2ubuntu0.1; = 1.4.2-2 1.4.2-2ubuntu0.1 Fixed
ubuntu/yubico-piv-tool(Ubuntu Pro 16.04) < 1.0.3-1ubuntu0.1~esm1; = 1.0.1-1; = 1.0.3-1 1.0.3-1ubuntu0.1~esm1 Fixed
Yubico piv manager < 1.4.2; = 1.4.2; = 1.4.2b; = 1.4.2c +4 more 1.4.2 Fixed
Yubico piv tool < 1.6.0 1.6.0 Fixed
Yubico smart card minidriver <= 3.7.3.160 after 3.7.3.160 Fixed

Affected products

ProductAffected versionsFixed in
debian/yubico-piv-tool(Debian:12) < 1.6.1-1 1.6.1-1
debian/yubico-piv-tool(Debian:13) < 1.6.1-1 1.6.1-1
debian/yubico-piv-tool(Debian:14) < 1.6.1-1 1.6.1-1
Yubico piv manager < 1.4.2 1.4.2
Yubico piv manager = 1.4.2 No fix listed
Yubico piv manager = 1.4.2b No fix listed
Yubico piv manager = 1.4.2c No fix listed
Yubico piv manager = 1.4.2d No fix listed
Yubico piv manager = 1.4.2e No fix listed
Yubico piv manager = 1.4.2f No fix listed
Yubico piv manager = 1.4.2g No fix listed
Yubico piv tool < 1.6.0 1.6.0
Yubico smart card minidriver <= 3.7.3.160 No fix listed
ubuntu/yubico-piv-tool(Ubuntu:Pro:16.04) < 1.0.3-1ubuntu0.1~esm1 1.0.3-1ubuntu0.1~esm1
ubuntu/yubico-piv-tool(Ubuntu:Pro:16.04) = 1.0.1-1 No fix listed
ubuntu/yubico-piv-tool(Ubuntu:Pro:16.04) = 1.0.3-1 No fix listed
ubuntu/yubico-piv-tool(Ubuntu:18.04) < 1.4.2-2ubuntu0.1 1.4.2-2ubuntu0.1
ubuntu/yubico-piv-tool(Ubuntu:18.04) = 1.4.2-2 No fix listed

References