diff --git a/libsmi-0.4.8-CVE-2010-2891.patch b/libsmi-0.4.8-CVE-2010-2891.patch new file mode 100644 index 0000000..f27f23c --- /dev/null +++ b/libsmi-0.4.8-CVE-2010-2891.patch @@ -0,0 +1,20 @@ +diff -up libsmi-0.4.8/lib/smi.c.CVE-2010-2891 libsmi-0.4.8/lib/smi.c +--- libsmi-0.4.8/lib/smi.c.CVE-2010-2891 2010-11-01 14:27:57.209065000 -0400 ++++ libsmi-0.4.8/lib/smi.c 2010-11-01 14:29:17.615065001 -0400 +@@ -1314,10 +1314,15 @@ SmiNode *smiGetNode(SmiModule *smiModule + } + + if (isdigit((int)node2[0])) { +- for (oidlen = 0, p = strtok(node2, ". "); p; ++ for (oidlen = 0, p = strtok(node2, ". "); ++ p && oidlen < sizeof(oid)/sizeof(oid[0]); + oidlen++, p = strtok(NULL, ". ")) { + oid[oidlen] = strtoul(p, NULL, 0); + } ++ if (p) { ++ /* the numeric OID is too long */ ++ return NULL; ++ } + nodePtr = getNode(oidlen, oid); + if (nodePtr) { + if (modulePtr) { diff --git a/libsmi.spec b/libsmi.spec index 88b55f6..89f4788 100644 --- a/libsmi.spec +++ b/libsmi.spec @@ -1,6 +1,6 @@ Name: libsmi Version: 0.4.8 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A library to access SMI MIB information Group: System Environment/Libraries @@ -9,6 +9,7 @@ URL: http://www.ibr.cs.tu-bs.de/projects/libsmi/index.html Source0: ftp://ftp.ibr.cs.tu-bs.de/pub/local/libsmi/%{name}-%{version}.tar.gz Source1: smi.conf Patch0: libsmi-0.4.8-wget111.patch +Patch1: libsmi-0.4.8-CVE-2010-2891.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libtool @@ -41,7 +42,8 @@ libsmi-based applications. %prep %setup -q -%patch0 -p1 +%patch0 -p1 -b .wget111 +%patch1 -p1 -b .CVE-2010-2891 %build %configure \ @@ -98,6 +100,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Nov 1 2010 Tom "spot" Callaway - 0.4.8-5 +- fix CVE-2010-2891 + * Thu Feb 25 2010 Radek Vokal - 0.4.8-4 - fix lincese field, based on the tarball project is now GPL+