From 2c846afc1f506fb6564080b38d8b44e50c0ea171 Mon Sep 17 00:00:00 2001 From: Richard W.M. Jones Date: May 28 2013 21:48:17 +0000 Subject: New upstream stable branch version 1.22.1. - Remove patch which is now upstream. --- diff --git a/0001-inspection-Fix-double-free-when-certain-guest-files-.patch b/0001-inspection-Fix-double-free-when-certain-guest-files-.patch deleted file mode 100644 index f218ff8..0000000 --- a/0001-inspection-Fix-double-free-when-certain-guest-files-.patch +++ /dev/null @@ -1,71 +0,0 @@ -From fa6a76050d82894365dfe32916903ef7fee3ffcd Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 28 May 2013 16:15:59 +0100 -Subject: [PATCH] inspection: Fix double-free when certain guest files are - empty. - -The following commit: - - commit 5a3da366268825b26b470cde35658b67c1d11cd4 - Author: Richard W.M. Jones - Date: Thu Jan 24 17:07:38 2013 +0000 - - inspect: Use CLEANUP_* macros in inspection code. - -can cause a double-free along an error path when certain guest files -are empty where we expected those files to contain at least one line. - -This causes virt-inspector to crash when run on these guests. - -The following is a test case which demonstrates the crash. -`f20rawhidex64' is a Fedora guest, but with small adjustments to the -test you could use any Linux guest for this test. - - $ qemu-img create -f qcow2 -b f20rawhidex64 /tmp/test.qcow2 - Formatting '/tmp/test.qcow2', fmt=qcow2 size=21474836480 backing_file='f20rawhidex64' encryption=off cluster_size=65536 lazy_refcounts=off - $ guestfish -i -a /tmp/test.qcow2 -- rm /etc/redhat-release : touch /etc/redhat-release - $ virt-inspector /tmp/test.qcow2 - *** glibc detected *** virt-inspector: double free or corruption (fasttop): 0x00007f18bc9925a0 *** - ======= Backtrace: ========= - /lib64/libc.so.6(+0x34ecc7ca8e)[0x7f18b8e64a8e] - /lib64/libguestfs.so.0(+0x3f91898078)[0x7f18ba13c078] - /lib64/libguestfs.so.0(+0x3f91899761)[0x7f18ba13d761] - /lib64/libguestfs.so.0(+0x3f91896d12)[0x7f18ba13ad12] - /lib64/libguestfs.so.0(+0x3f91894140)[0x7f18ba138140] - /lib64/libguestfs.so.0(guestfs_inspect_os+0x35)[0x7f18ba0bcc35] - virt-inspector(main+0x547)[0x7f18ba7c57d7] - /lib64/libc.so.6(__libc_start_main+0xf5)[0x7f18b8e09a05] - virt-inspector(+0x6665)[0x7f18ba7c7665] - -This is a denial of service, but not likely to be exploitable. - -(Found by Coverity) ---- - src/inspect-fs.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/inspect-fs.c b/src/inspect-fs.c -index a8dc05c..5ca1725 100644 ---- a/src/inspect-fs.c -+++ b/src/inspect-fs.c -@@ -544,7 +544,7 @@ guestfs___check_package_management (guestfs_h *g, struct inspect_fs *fs) - char * - guestfs___first_line_of_file (guestfs_h *g, const char *filename) - { -- CLEANUP_FREE char **lines = NULL; /* sic: not CLEANUP_FREE_STRING_LIST */ -+ char **lines = NULL; /* sic: not CLEANUP_FREE_STRING_LIST */ - int64_t size; - char *ret; - -@@ -573,6 +573,8 @@ guestfs___first_line_of_file (guestfs_h *g, const char *filename) - - ret = lines[0]; /* caller frees */ - -+ free (lines); -+ - return ret; - } - --- -1.8.2.1 - diff --git a/libguestfs.spec b/libguestfs.spec index d267e05..a77ca8c 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -11,18 +11,14 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.22.0 -Release: 2%{?dist} +Version: 1.22.1 +Release: 1%{?dist} License: LGPLv2+ # Source and patches. URL: http://libguestfs.org/ Source0: http://libguestfs.org/download/1.22-stable/%{name}-%{version}.tar.gz -# This fixes a denial-of-service (double-free) which can be forced by guests. -# https://www.redhat.com/archives/libguestfs/2013-May/msg00079.html -Patch1: 0001-inspection-Fix-double-free-when-certain-guest-files-.patch - # Basic build requirements: BuildRequires: perl(Pod::Simple) BuildRequires: perl(Pod::Man) @@ -526,8 +522,6 @@ for %{name}. %prep %setup -q -%patch1 -p1 - if [ "$(getenforce | tr '[A-Z]' '[a-z]')" != "disabled" ]; then # For sVirt to work, the local temporary directory we use in the # tests must be labelled the same way as /tmp. @@ -898,6 +892,10 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/libguestfs %changelog +* Tue May 28 2013 Richard W.M. Jones - 1:1.22.1-1 +- New upstream stable branch version 1.22.1. +- Remove patch which is now upstream. + * Tue May 28 2013 Richard W.M. Jones - 1:1.22.0-2 - Fix a denial-of-service (double-free) which can be forced by guests. https://www.redhat.com/archives/libguestfs/2013-May/msg00079.html diff --git a/sources b/sources index 0460b0c..62e7c78 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -04f803302153ac565303e523c0197d8b libguestfs-1.22.0.tar.gz +a792fe295d7e1c9f391237f6377e5bb3 libguestfs-1.22.1.tar.gz