CVE-2018-14780 Memory corruption in n/a

Medium 4.6 Published Updated

An out-of-bounds read in the Yubico PIV smartcard driver allows attackers to read memory or cause a crash via crafted APDU data.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2018-14780?

CVE-2018-14780 is a medium-severity memory corruption vulnerability in n/a, published on 15 Aug 2018. It can only be exploited from the same machine or local network, with no action from the victim.

Official 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.

Weakness: CWE-125

Which versions are affected by CVE-2018-14780?

It affects 3 products.

Products include Yubico Piv Manager, Yubico Piv Tool, Yubico Smart Card Minidriver.

How do I fix CVE-2018-14780?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2018-14780 being exploited?

There is no known exploitation of CVE-2018-14780 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2018-14780, GHSA-xwgg-25ph-4c8p, UBUNTU-CVE-2018-14780.

Is CVE-2018-14780 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free