CVE-2018-14780

NameCVE-2018-14780
DescriptionAn 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.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
Debian Bugs906128

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
yubico-piv-tool (PTS)bullseye2.2.0-1fixed
bookworm2.2.0-1.1fixed
sid, trixie2.5.2-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
yubico-piv-toolsourcestretch1.4.2-2+deb9u1
yubico-piv-toolsource(unstable)1.6.1-1low906128

Notes

https://www.x41-dsec.de/lab/advisories/x41-2018-001-Yubico-Piv/

Search for package or bug name: Reporting problems