{"id":"UBUNTU-CVE-2018-14780","details":"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.","modified":"2026-04-22T11:46:07.687254Z","published":"2018-08-15T18:29:00Z","related":["USN-4276-1","USN-4846-1"],"upstream":["CVE-2018-14780"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2018-14780"},{"type":"REPORT","url":"https://www.x41-dsec.de/lab/advisories/x41-2018-001-Yubico-Piv/"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-4276-1"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2018-14780"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-4846-1"}],"affected":[{"package":{"name":"yubico-piv-tool","ecosystem":"Ubuntu:Pro:16.04:LTS","purl":"pkg:deb/ubuntu/yubico-piv-tool@1.0.3-1ubuntu0.1~esm1?arch=source&distro=esm-apps/xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.3-1ubuntu0.1~esm1"}]}],"versions":["1.0.1-1","1.0.3-1"],"ecosystem_specific":{"availability":"Available with Ubuntu Pro: https://ubuntu.com/pro","binaries":[{"binary_name":"libykpiv1","binary_version":"1.0.3-1ubuntu0.1~esm1"},{"binary_name":"yubico-piv-tool","binary_version":"1.0.3-1ubuntu0.1~esm1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2018/UBUNTU-CVE-2018-14780.json"}},{"package":{"name":"yubico-piv-tool","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/yubico-piv-tool@1.4.2-2ubuntu0.1?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.4.2-2ubuntu0.1"}]}],"versions":["1.4.2-2"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"libykpiv1","binary_version":"1.4.2-2ubuntu0.1"},{"binary_name":"ykcs11","binary_version":"1.4.2-2ubuntu0.1"},{"binary_name":"yubico-piv-tool","binary_version":"1.4.2-2ubuntu0.1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2018/UBUNTU-CVE-2018-14780.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.0/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"},{"type":"Ubuntu","score":"high"}]}