Skip to content

CVE-2018-14780 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 ==....

MediumCVSS 4.6 EPSS 0.45%
Published
Updated
Exploit status
No public exploit known
Technology
UbuntuDebian

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.

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