diff options
author | Tobias Scherbaum <dertobi123@gentoo.org> | 2009-07-10 21:58:29 +0000 |
---|---|---|
committer | Tobias Scherbaum <dertobi123@gentoo.org> | 2009-07-10 21:58:29 +0000 |
commit | fd3ba5f3a6935f8623ebad0157c516a4737987ff (patch) | |
tree | feefce24e62268a281fb96ef662f85565bd7d8f8 /net-analyzer/net-snmp/files | |
parent | Version bump, with amd64 support (diff) | |
download | historical-fd3ba5f3a6935f8623ebad0157c516a4737987ff.tar.gz historical-fd3ba5f3a6935f8623ebad0157c516a4737987ff.tar.bz2 historical-fd3ba5f3a6935f8623ebad0157c516a4737987ff.zip |
Revbump, include upstream fix for CVE-2008-6123, fixed #250429
Package-Manager: portage-2.2_rc33/cvs/Linux i686
Diffstat (limited to 'net-analyzer/net-snmp/files')
-rw-r--r-- | net-analyzer/net-snmp/files/CVE-2008-6123.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/net-analyzer/net-snmp/files/CVE-2008-6123.patch b/net-analyzer/net-snmp/files/CVE-2008-6123.patch new file mode 100644 index 000000000000..557d71b85539 --- /dev/null +++ b/net-analyzer/net-snmp/files/CVE-2008-6123.patch @@ -0,0 +1,50 @@ +diff -Naur snmplib.orig/snmpUDPDomain.c snmplib/snmpUDPDomain.c +--- snmplib.orig/snmpUDPDomain.c 2007-10-11 22:46:30.000000000 +0200 ++++ snmplib/snmpUDPDomain.c 2009-07-10 23:41:37.000000000 +0200 +@@ -65,6 +65,12 @@ + #define INADDR_NONE -1 + #endif + ++#ifdef MSG_DONTWAIT ++#define NETSNMP_DONTWAIT MSG_DONTWAIT ++#else ++#define NETSNMP_DONTWAIT 0 ++#endif ++ + static netsnmp_tdomain udpDomain; + + typedef struct netsnmp_udp_addr_pair_s { +@@ -104,12 +110,12 @@ + char tmp[64]; + to = (struct sockaddr_in *) &(addr_pair->remote_addr); + if (to == NULL) { +- sprintf(tmp, "UDP: [%s]->unknown", ++ sprintf(tmp, "UDP: unknown->[%s]", + inet_ntoa(addr_pair->local_addr)); + } else { +- sprintf(tmp, "UDP: [%s]->", inet_ntoa(addr_pair->local_addr)); +- sprintf(tmp + strlen(tmp), "[%s]:%hd", ++ sprintf(tmp, "UDP: [%s]:%hu->", + inet_ntoa(to->sin_addr), ntohs(to->sin_port)); ++ sprintf(tmp + strlen(tmp), "[%s]", inet_ntoa(addr_pair->local_addr)); + } + return strdup(tmp); + } +@@ -140,7 +146,7 @@ + msg.msg_control = &cmsg; + msg.msg_controllen = sizeof(cmsg); + +- r = recvmsg(s, &msg, 0); ++ r = recvmsg(s, &msg, NETSNMP_DONTWAIT); + + if (r == -1) { + return -1; +@@ -215,7 +221,7 @@ + #if defined(linux) && defined(IP_PKTINFO) + rc = netsnmp_udp_recvfrom(t->sock, buf, size, from, &fromlen, &(addr_pair->local_addr)); + #else +- rc = recvfrom(t->sock, buf, size, 0, from, &fromlen); ++ rc = recvfrom(t->sock, buf, size, NETSNMP_DONTWAIT, from, &fromlen); + #endif /* linux && IP_PKTINFO */ + if (rc < 0 && errno != EINTR) { + break; |