Incorrect Conversion between Numeric Types Affecting libnbd package, versions <1.0.3-1


Severity

Recommended
0.0
critical
0
10

Snyk's Security Team recommends NVD's CVSS assessment. Learn more

Threat Intelligence

EPSS
0.41% (74th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-DEBIAN11-LIBNBD-535704
  • published26 Nov 2019
  • disclosed26 Nov 2019

Introduced: 26 Nov 2019

CVE-2019-14842  (opens in a new tab)
CWE-681  (opens in a new tab)

How to fix?

Upgrade Debian:11 libnbd to version 1.0.3-1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream libnbd package and not the libnbd package as distributed by Debian. See How to fix? for Debian:11 relevant fixed versions and status.

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.

CVSS Scores

version 3.1