fix CVE-2010-2891
This commit is contained in:
parent
52ecca406b
commit
19c5c66978
20
libsmi-0.4.8-CVE-2010-2891.patch
Normal file
20
libsmi-0.4.8-CVE-2010-2891.patch
Normal file
@ -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) {
|
||||
@ -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 <tcallawa@redhat.com> - 0.4.8-5
|
||||
- fix CVE-2010-2891
|
||||
|
||||
* Thu Feb 25 2010 Radek Vokal <rvokal@redhat.com> - 0.4.8-4
|
||||
- fix lincese field, based on the tarball project is now GPL+
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user