CVE-2019-14842 Integer overflow in libnbd

High 7.3 Published Updated

A signed/unsigned confusion in libnbd allows a malicious NBD server to overwrite memory and execute arbitrary code on the client.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2019-14842?

CVE-2019-14842 is a high-severity vulnerability in [UNKNOWN] libnbd, published on 26 Nov 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Structured reply is a feature of the newstyle NBD protocol allowing the server to send a reply in chunks. A bounds check which was supposed to test for chunk offsets smaller than the beginning of the request did not work because of signed/unsigned confusion. If one of these chunks contains a negative offset then data under control of the server is written to memory before the read buffer supplied by the client. If the read buffer is located on the stack then this allows the stack return address from nbd_pread() to be trivially modified, allowing arbitrary code execution under the control of the server. If the buffer is located on the heap then other memory objects before the buffer can be overwritten, which again would usually lead to arbitrary code execution.

Weakness: CWE-681

Which versions are affected by CVE-2019-14842?

It affects 1 product.

Products include Redhat Libnbd.

How do I fix CVE-2019-14842?

Apply the vendor's patch.

Is CVE-2019-14842 being exploited?

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

Sources

Also known as DEBIAN-CVE-2019-14842, GHSA-xv5g-h355-j9v9.

Is CVE-2019-14842 in your software?

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

Check your SBOMs for free