CVE-2018-14779 Memory corruption in n/a

Medium 6.8 Published Updated

A buffer overflow in the Yubico PIV smartcard driver allows attackers to execute arbitrary code or cause denial of service via malicious smartcard 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-14779?

CVE-2018-14779 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

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

Weakness: CWE-787, CWE-119

Which versions are affected by CVE-2018-14779?

It affects 3 products.

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

How do I fix CVE-2018-14779?

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-14779 being exploited?

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

Sources

Also known as DEBIAN-CVE-2018-14779, GHSA-rvwc-p7mj-cmgq, UBUNTU-CVE-2018-14779.

Is CVE-2018-14779 in your software?

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

Check your SBOMs for free