{"id":"UBUNTU-CVE-2018-14779","details":"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 \u003e 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.","modified":"2026-04-22T11:46:01.652006Z","published":"2018-08-15T18:29:00Z","related":["USN-4276-1","USN-4846-1"],"upstream":["CVE-2018-14779"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2018-14779"},{"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-14779"},{"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":{"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"}],"availability":"Available with Ubuntu Pro: https://ubuntu.com/pro"},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2018/UBUNTU-CVE-2018-14779.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-14779.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:H/A:H"},{"type":"Ubuntu","score":"high"}]}