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
Status: IN_PROGRESS
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
URL:
Whiteboard: B2 [glsa? cleanup]
Keywords:
Depends on: 858152
Blocks:
  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: ---


Attachments

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
CVE-2022-26496:

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.

CVE-2022-26495:

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.

https://lists.debian.org/nbd/2022/01/msg00036.html
https://lists.debian.org/nbd/2022/01/msg00037.html

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.

https://github.com/NetworkBlockDevice/nbd/releases/tag/nbd-3.24

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):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8a350785778feb0ced49ff5077174e0ea10c195

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

    sys-block/nbd: add 3.24
    
    Bug: https://bugs.gentoo.org/834678
    Signed-off-by: Sam James <sam@gentoo.org>

 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(-)