Network Block Device: Integer Overflow or Wraparound
CVE-2022-26495 is a critical-severity integer overflow or wraparound vulnerability in Network Block Device from Network Block Device Project, with a CVSS 3.1 base score of 9.8 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. The record lists version 3.24 as the first without the flaw, so updating Network Block Device to that release or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 2.86% chance of exploitation within 30 days, higher than 87% of scored CVEs.
Critical severity: a successful attack would have severe impact.
What to do
- Update Network Block Device to 3.24 or a later version.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Network Block Device Project | Network Block Device | before 3.24 | 3.24 |
| Debian | Debian Linux | 9.0; 10.0; 11.0 | Not stated |
| Fedora Project | Fedora | 34; 35; 36 | Not stated |
Version data comes from NVD's product matching. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 9.8 | Critical | NVD |
| CVSS 2.0 | 7.5 | High | NVD |
Official description
In nbd-server in nbd before 3.24, there is an integer overflow with a resultant heap-based buffer overflow. A value of 0xffffffff in the name length field will cause a zero-sized buffer to be allocated for the name, resulting in a write to a dangling pointer. This issue exists for the NBD_OPT_INFO, NBD_OPT_GO, and NBD_OPT_EXPORT_NAME messages.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Integer Overflow or Wraparound
The product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.
How developers prevent this class of flaw
- Ensure that all protocols are strictly defined, such that all out-of-bounds behavior can be identified simply, and require strict conformance to the protocol.
- Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. If possible, choose a language or compiler that performs automatic bounds checking.
- Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. Use libraries or frameworks that make it easier to handle numbers without unexpected consequences. Examples include safe integer handling packages such as SafeInt (C++) or IntegerLib (C or C++).
More Integer Overflow or Wraparound vulnerabilities (CWE-190)
Timeline
- CVE record published.
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- sourceforge.net/projects/nbd/files/nbd/Product, Release Notes, Third Party Advisory
Third-party and government advisories
- lists.debian.org/debian-lts-announce/2022/03/msg00014.htmlMailing List, Third Party Advisory
- debian.org/security/2022/dsa-5100Third Party Advisory
Technical write-ups (may include proof of concept)
- lists.debian.org/nbd/2022/01/msg00037.htmlExploit, Mailing List, Third Party Advisory
Other references
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/G2UPX62BIWOOHSACGUDB…
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IZHR73XMAJTCFGKUZRXV…
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PU5JFD4PEJED72TZLZ5R…
- security.gentoo.org/glsa/202402-10
Other vulnerabilities in Network Block Device
- 9.8 Critical severity
Recent Integer Overflow or Wraparound vulnerabilities
- 9.8 Critical severity
- 7.5 High severity
- 7.8 High severity
- 7.8 High severity
- 8.8 High severity
- 9.8 Critical severity
Spotted an error? Tell us.