Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 834678 (CVE-2022-26495, CVE-2022-26496) - <sys-block/nbd-3.24: multiple vulnerabilities
Summary: <sys-block/nbd-3.24: multiple vulnerabilities
Alias: CVE-2022-26495, CVE-2022-26496
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Security
Whiteboard: B2 [glsa? cleanup]
Depends on: 858152
  Show dependency tree
Reported: 2022-03-06 17:01 UTC by John Helmert III
Modified: 2022-07-16 16:39 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-03-06 17:01:30 UTC

In nbd-server in nbd before 3.24, there is a 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.


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.

Seems like there's an incorrect patch attached.
Comment 1 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-03-09 15:58:36 UTC
3.24 is released.

Seems to have commits for both issues.
Comment 2 Larry the Git Cow gentoo-dev 2022-06-01 01:25:26 UTC
The bug has been referenced in the following commit(s):

commit c8a350785778feb0ced49ff5077174e0ea10c195
Author:     Sam James <>
AuthorDate: 2022-06-01 00:39:08 +0000
Commit:     Sam James <>
CommitDate: 2022-06-01 01:25:09 +0000

    sys-block/nbd: add 3.24
    Signed-off-by: Sam James <>

 sys-block/nbd/Manifest        |  1 +
 sys-block/nbd/nbd-3.24.ebuild | 75 +++++++++++++++++++++++++++++++++++++++++++
 sys-block/nbd/nbd-9999.ebuild | 22 +++++++++----
 3 files changed, 91 insertions(+), 7 deletions(-)