Unrated severityNVD Advisory· Published Feb 22, 2011· Updated Apr 29, 2026
CVE-2011-0530
CVE-2011-0530
Description
Buffer overflow in the mainloop function in nbd-server.c in the server in Network Block Device (nbd) before 2.9.20 might allow remote attackers to execute arbitrary code via a long request. NOTE: this issue exists because of a CVE-2005-3534 regression.
Affected products
20cpe:2.3:a:wouter_verhelst:nbd:*:*:*:*:*:*:*:*+ 19 more
- cpe:2.3:a:wouter_verhelst:nbd:*:*:*:*:*:*:*:*range: <=2.9.19
- cpe:2.3:a:wouter_verhelst:nbd:2.9.0:*:*:*:*:*:*:*
- cpe:2.3:a:wouter_verhelst:nbd:2.9.1:*:*:*:*:*:*:*
- cpe:2.3:a:wouter_verhelst:nbd:2.9.2:*:*:*:*:*:*:*
- cpe:2.3:a:wouter_verhelst:nbd:2.9.3:*:*:*:*:*:*:*
- cpe:2.3:a:wouter_verhelst:nbd:2.9.4:*:*:*:*:*:*:*
- cpe:2.3:a:wouter_verhelst:nbd:2.9.5:*:*:*:*:*:*:*
- cpe:2.3:a:wouter_verhelst:nbd:2.9.6:*:*:*:*:*:*:*
- cpe:2.3:a:wouter_verhelst:nbd:2.9.7:*:*:*:*:*:*:*
- cpe:2.3:a:wouter_verhelst:nbd:2.9.8:*:*:*:*:*:*:*
- cpe:2.3:a:wouter_verhelst:nbd:2.9.9:*:*:*:*:*:*:*
- cpe:2.3:a:wouter_verhelst:nbd:2.9.10:*:*:*:*:*:*:*
- cpe:2.3:a:wouter_verhelst:nbd:2.9.11:*:*:*:*:*:*:*
- cpe:2.3:a:wouter_verhelst:nbd:2.9.12:*:*:*:*:*:*:*
- cpe:2.3:a:wouter_verhelst:nbd:2.9.13:*:*:*:*:*:*:*
- cpe:2.3:a:wouter_verhelst:nbd:2.9.14:*:*:*:*:*:*:*
- cpe:2.3:a:wouter_verhelst:nbd:2.9.15:*:*:*:*:*:*:*
- cpe:2.3:a:wouter_verhelst:nbd:2.9.16:*:*:*:*:*:*:*
- cpe:2.3:a:wouter_verhelst:nbd:2.9.17:*:*:*:*:*:*:*
- cpe:2.3:a:wouter_verhelst:nbd:2.9.18:*:*:*:*:*:*:*
Patches
13ef52043861aFix buffer size checking
1 file changed · +2 −2
nbd-server.c+2 −2 modified@@ -150,7 +150,7 @@ gboolean do_oldstyle=FALSE; #define OFFT_MAX ~((off_t)1<<(sizeof(off_t)*8-1)) #define LINELEN 256 /**< Size of static buffer used to read the authorization file (yuck) */ -#define BUFSIZE (1024*1024) /**< Size of buffer that can hold requests */ +#define BUFSIZE ((1024*1024)+sizeof(struct nbd_reply)) /**< Size of buffer that can hold requests */ #define DIFFPAGESIZE 4096 /**< diff file uses those chunks */ #define F_READONLY 1 /**< flag to tell us a file is readonly */ #define F_MULTIFILE 2 /**< flag to tell us a file is exported using -m */ @@ -1389,7 +1389,7 @@ int mainloop(CLIENT *client) { if (request.magic != htonl(NBD_REQUEST_MAGIC)) err("Not enough magic."); - if (len > BUFSIZE + sizeof(struct nbd_reply)) + if (len > BUFSIZE - sizeof(struct nbd_reply)) err("Request too big!"); #ifdef DODBG printf("%s from %llu (%llu) len %d, ", request.type ? "WRITE" :
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
17- lists.fedoraproject.org/pipermail/package-announce/2011-February/054071.htmlnvdPatch
- lists.fedoraproject.org/pipermail/package-announce/2011-February/054083.htmlnvdPatch
- openwall.com/lists/oss-security/2011/01/28/3nvdPatch
- openwall.com/lists/oss-security/2011/01/31/7nvdPatch
- bugzilla.redhat.com/show_bug.cginvdPatch
- github.com/yoe/nbd/commit/3ef52043861ab16352d49af89e048ba6339d6df8nvdPatch
- secunia.com/advisories/43353nvdVendor Advisory
- www.vupen.com/english/advisories/2011/0403nvdVendor Advisory
- bugs.debian.org/cgi-bin/bugreport.cginvd
- lists.opensuse.org/opensuse-security-announce/2011-04/msg00000.htmlnvd
- secunia.com/advisories/43610nvd
- security.gentoo.org/glsa/glsa-201206-35.xmlnvd
- www.debian.org/security/2011/dsa-2183nvd
- www.securityfocus.com/bid/46572nvd
- www.vupen.com/english/advisories/2011/0582nvd
- exchange.xforce.ibmcloud.com/vulnerabilities/65720nvd
- hermes.opensuse.org/messages/8086846nvd
News mentions
0No linked articles in our index yet.