Every CVE Search/ Get API key

CVE-2022-26495

In nbd-server in nbd before 3.24, there is an integer overflow with a resultant heap-based buffer...

9.8 CriticalFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

2.86%Up 2.0 points since Mar 6, 2022
90%50%10%1%

What each source reports

NVD Score used 9.8

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.

Record
CVE-2022-26495
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.0
7.5 HighAV:N/AC:L/Au:N/C:P/I:P/A:P
Weakness
CWE-190
Updated
2026-11-02
CVE List No score

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.

Record
CVE-2022-26495
Updated
2026-11-02
EUVDEUVD-2022-31053 No score

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.

Record
EUVD-2022-31053
Updated
2026-11-03
GitHub AdvisoriesGHSA-q9rw-8758-hccj 9.8

In nbd-server in nbd before 3.24, there is an integer overflow with a resultant heap-based buffer...

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.

Record
GHSA-q9rw-8758-hccj
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-190
Updated
2026-11-02
OSVALPINE-CVE-2022-26495 9.8

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.

Record
ALPINE-CVE-2022-26495
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-03
OSVDEBIAN-CVE-2022-26495 9.8

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.

Record
DEBIAN-CVE-2022-26495
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-03
Show 6 moreShow less
OSVUBUNTU-CVE-2022-26495 9.8

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.

Record
UBUNTU-CVE-2022-26495
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSV No score

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.

Record
CVE-2022-26495
Updated
2026-11-02
OSVMGASA-2022-0403 No score

Updated nbd packages fix security vulnerability

It was discovered that nbd prior to 3.24 contained 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 (CVE-2022-26495).

Stack-based buffer overflow. An attacker can cause a buffer overflow in the parsing of the name field by sending a crafted NBD_OPT_INFO or NBD_OPT_GO message with an large value as the length of the name. (CVE-2022-26496)

Packaging has been adjusted to create the required nbd user and group at installation.

Record
MGASA-2022-0403
Updated
2026-11-02
OSVopenSUSE-SU-2024:11993-1 No score

nbd-3.24-1.1 on GA media

These are all security issues fixed in the nbd-3.24-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:11993-1
Updated
2026-11-02
OSVSUSE-SU-2022:1276-1 No score

Security update for nbd

This update for nbd fixes the following issues:

  • CVE-2022-26495: Fixed an integer overflow with a resultant heap-based buffer overflow (bsc#1196827).
  • CVE-2022-26496: Fixed a stack-based buffer overflow when parsing the name field by sending a crafted NBD_OPT_INFO (bsc#1196828).

Update to version 3.24 (bsc#1196827, bsc#1196828, CVE-2022-26495, CVE-2022-26496):

Update to version 3.23:

  • Don't overwrite the hostname with the TLS hostname

Update to version 3.22:

  • nbd-server: handle auth for v6-mapped IPv4 addresses
  • nbd-client.c: parse the next option in all cases
  • configure.ac: silence a few autoconf 2.71 warnings
  • spec: Relax NBD_OPT_LIST_META_CONTEXTS
  • client: Don't confuse Unix socket with TLS hostname
  • server: Avoid deprecated g_memdup

Update to version 3.21:

  • Fix --disable-manpages build
  • Fix a bug in whitespace handling regarding authorization files
  • Support client-side marking of devices as read-only
  • Support preinitialized NBD connection (i.e., skip the negotiation).
  • Fix the systemd unit file for nbd-client so it works with netlink (the more common situation nowadays)

Update to 3.20.0 (no changelog)

Update to version 3.19.0:

  • Better error messages in case of unexpected disconnects
  • Better compatibility with non-bash sh implementations (for configure.sh)
  • Fix for a segfault in NBD_OPT_INFO handling
  • The ability to specify whether to listen on both TCP and Unix domain sockets, rather than to always do so
  • Various minor editorial and spelling fixes in the documentation.

Update to version 1.18.0:

  • Client: Add the '-g' option to avoid even trying the NBD_OPT_GO message
  • Server: fixes to inetd mode
  • Don't make gnutls and libnl automagic.
  • Server: bugfixes in handling of some export names during verification.
  • Server: clean supplementary groups when changing user.
  • Client: when using the netlink protocol, only set a timeout when there actually is a timeout, rather than defaulting to 0 seconds
  • Improve documentation on the nbdtab file
  • Minor improvements to some error messages
  • Improvements to test suite so it works better on non-GNU userland environments
  • Update to version 1.17.0:
    • proto: add xNBD command NBD_CMD_CACHE to the spec
    • server: do not crash when handling child name
    • server: Close socket pair when fork fails
Record
SUSE-SU-2022:1276-1
Updated
2026-11-02
OSVUSN-5323-1 No score

nbd vulnerabilities

It was discovered that NBD incorrectly handled name length fields. A remote attacker could use this issue to cause NBD to crash, resulting in a denial of service, or possibly execute arbitrary code.

Record
USN-5323-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
nbd
Alpine:v3.16
before 3.24-r0
3.24-r0
nbd
Alpine:v3.17
before 3.24-r0
3.24-r0
nbd
Alpine:v3.18
before 3.24-r0
3.24-r0
nbd
Alpine:v3.19
before 3.24-r0
3.24-r0
nbd
Alpine:v3.20
before 3.24-r0
3.24-r0
nbd
Alpine:v3.21
before 3.24-r0
3.24-r0
nbd
Alpine:v3.22
before 3.24-r0
3.24-r0
nbd
Alpine:v3.23
before 3.24-r0
3.24-r0
nbd
Alpine:v3.24
before 3.24-r0
3.24-r0
nbd
Debian:12
before 1:3.24-1
1:3.24-1
Show 15 moreShow less
Affected packages
PackageAffectedFixed
nbd
Debian:13
before 1:3.24-1
1:3.24-1
nbd
Debian:14
before 1:3.24-1
1:3.24-1
nbd
Debian:9
before 1:3.15.2-3+deb9u1, plus listed versions
1:3.15.2-3
1:3.15.2-3+deb9u1
nbd
Debian:10
From an advisory covering 2 CVEs
before 1:3.19-3+deb10u1, plus listed versions
1:3.19-3
1:3.19-3+deb10u1
nbd
Debian:11
From an advisory covering 2 CVEs
before 1:3.21-1+deb11u1, plus listed versions
1:3.21-1
1:3.21-1+deb11u1
nbd
Mageia:8
From an advisory covering 2 CVEs
before 3.24-1.2.mga8
3.24-1.2.mga8
nbd
openSUSE:Leap 15.3
From an advisory covering 2 CVEs
before 3.24-150000.3.3.1
3.24-150000.3.3.1
nbd
Ubuntu:14.04:LTS
All versions, plus listed versions
1:3.3-3ubuntu11:3.4-1ubuntu11:3.4-2ubuntu11:3.5-1ubuntu11:3.6-1ubuntu11:3.7-11:3.7-1ubuntu0.1
None known
nbd
Ubuntu:16.04:LTS
All versions, plus listed versions
1:3.10-11:3.13-1
None known
nbd
Ubuntu:18.04:LTS
before 1:3.16.2-1ubuntu0.2, plus listed versions
1:3.15.2-31:3.16.2-11:3.16.2-1ubuntu0.1
1:3.16.2-1ubuntu0.2
nbd
Ubuntu:20.04:LTS
before 1:3.20-1ubuntu0.1, plus listed versions
1:3.19-31:3.20-1
1:3.20-1ubuntu0.1
nbd
Ubuntu:22.04:LTS
before 1:3.23-3ubuntu1, plus listed versions
1:3.21-1build31:3.22-11:3.23-3
1:3.23-3ubuntu1
nbd
Ubuntu:18.04:LTS
From an advisory covering 2 CVEs
before 1:3.16.2-1ubuntu0.2, plus listed versions
1:3.15.2-31:3.16.2-11:3.16.2-1ubuntu0.1
1:3.16.2-1ubuntu0.2
nbd
Ubuntu:20.04:LTS
From an advisory covering 2 CVEs
before 1:3.20-1ubuntu0.1, plus listed versions
1:3.19-31:3.20-1
1:3.20-1ubuntu0.1
nbd
openSUSE:Tumbleweed
before 3.24-1.1
3.24-1.1

History

History
RecordedChangedSources
affected, factsOSV
affected, aliases, referencesOSV
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2022-26495 is a critical vulnerability (CVSS 9.8) in Debian Linux, published March 6, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.86%, the 86th percentile. Fixed in nbd 3.24-r0.

References

Show 24 moreShow less
MoveEnter Open