diff --git a/fixbuffers.diff b/fixbuffers.diff new file mode 100644 index 0000000..608f33a --- /dev/null +++ b/fixbuffers.diff @@ -0,0 +1,13 @@ +Index: multipath-tools-0.4.8/libmultipath/configure.c +=================================================================== +--- multipath-tools-0.4.8.orig/libmultipath/configure.c 2010-02-26 13:34:41.000000000 +0100 ++++ multipath-tools-0.4.8/libmultipath/configure.c 2010-02-26 13:35:31.000000000 +0100 +@@ -167,7 +167,7 @@ select_action (struct multipath * mpp, v + if (!find_mp_by_wwid(curmp, mpp->wwid)) { + condlog(2, "%s: remove (wwid changed)", cmpp->alias); + dm_flush_map(mpp->alias); +- strncat(cmpp->wwid, mpp->wwid, WWID_SIZE); ++ strncat(cmpp->wwid, mpp->wwid, WWID_SIZE-strlen(cmpp->wwid)-1); + drop_multipath(curmp, cmpp->wwid, KEEP_PATHS); + mpp->action = ACT_CREATE; + condlog(3, "%s: set ACT_CREATE (map wwid change)", diff --git a/multipath-tools.changes b/multipath-tools.changes index 0636dff..293e668 100644 --- a/multipath-tools.changes +++ b/multipath-tools.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Feb 26 12:37:10 UTC 2010 - coolo@novell.com + +- fix buffer overflow in strncat + ------------------------------------------------------------------- Wed Jan 27 16:16:12 CST 2010 - cmeng@novell.com diff --git a/multipath-tools.spec b/multipath-tools.spec index dd753a8..d096263 100644 --- a/multipath-tools.spec +++ b/multipath-tools.spec @@ -33,6 +33,7 @@ Source: multipath-tools-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build Patch0: %{name}-%{version}-opensuse-11.2.diff.bz2 Patch1: remove-stacked-partitions.diff +Patch2: fixbuffers.diff %description This package provides the tools to manage multipathed devices by @@ -75,6 +76,7 @@ Authors: %setup -q -n multipath-tools-%{version} %patch0 -p1 %patch1 -p1 +%patch2 -p1 %build # This package failed when testing with -Wl,-as-needed being default.