From cccab5f53ff6b932aa008517a0cfaae1f362c7bd Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Thu, 26 Feb 2009 22:29:21 +0000 Subject: [PATCH] * Thu Feb 26 2009 Eric Sandeen 1.41.4-4 - Edit summary & description to include ext4 (#487469) - Fix blkid null ptr deref in initrd (#486997) --- e2fsprogs-1.41.4-fix-blkid-segfault.patch | 56 +++++++++++++++++++++++ e2fsprogs.spec | 23 ++++++---- 2 files changed, 71 insertions(+), 8 deletions(-) create mode 100644 e2fsprogs-1.41.4-fix-blkid-segfault.patch diff --git a/e2fsprogs-1.41.4-fix-blkid-segfault.patch b/e2fsprogs-1.41.4-fix-blkid-segfault.patch new file mode 100644 index 0000000..419d160 --- /dev/null +++ b/e2fsprogs-1.41.4-fix-blkid-segfault.patch @@ -0,0 +1,56 @@ +The coverity scanner found this one. + +If a line in modules.dep has a ":" but no "/" then: + + if ((cp = strchr(buf, ':')) != NULL) + *cp = 0; + else + continue; + if ((cp = strrchr(buf, '/')) != NULL) + cp++; + /* XXX else cp is still null */ + i = strlen(cp); + +... we will deref a null pointer (cp). This can be +demonstrated by putting a line like: + +foo.ko: + +into modules.dep. The below change just says that if no "/" is +found, treat the whole string as the module name. + +Signed-off-by: Eric Sandeen +--- + +Index: e2fsprogs/e2fsck/util.c +=================================================================== +--- e2fsprogs.orig/e2fsck/util.c ++++ e2fsprogs/e2fsck/util.c +@@ -663,6 +663,8 @@ int check_for_modules(const char *fs_nam + continue; + if ((cp = strrchr(buf, '/')) != NULL) + cp++; ++ else ++ cp = buf; + i = strlen(cp); + if (i > 3) { + t = cp + i - 3; +Index: e2fsprogs/lib/blkid/probe.c +=================================================================== +--- e2fsprogs.orig/lib/blkid/probe.c ++++ e2fsprogs/lib/blkid/probe.c +@@ -227,6 +227,8 @@ static int check_for_modules(const char + continue; + if ((cp = strrchr(buf, '/')) != NULL) + cp++; ++ else ++ cp = buf; + i = strlen(cp); + if (i > 3) { + t = cp + i - 3; + +-- +To unsubscribe from this list: send the line "unsubscribe linux-ext4" in +the body of a message to majordomo@vger.kernel.org +More majordomo info at http://vger.kernel.org/majordomo-info.html + diff --git a/e2fsprogs.spec b/e2fsprogs.spec index fe1860d..9775ab8 100644 --- a/e2fsprogs.spec +++ b/e2fsprogs.spec @@ -1,10 +1,10 @@ %define _root_sbindir /sbin %define _root_libdir /%{_lib} -Summary: Utilities for managing the second and third extended (ext2/ext3) filesystems +Summary: Utilities for managing ext2, ext3, and ext4 filesystems Name: e2fsprogs Version: 1.41.4 -Release: 3%{?dist} +Release: 4%{?dist} # License based on upstream-modified COPYING file, # which clearly states "V2" intent. License: GPLv2 @@ -17,6 +17,7 @@ Patch1: e2fsprogs-1.38-etcblkid.patch Patch2: e2fsprogs-1.40.4-sb_feature_check_ignore.patch Patch3: e2fsprogs-1.41.4-debugfs-stat-segfault.patch Patch4: e2fsprogs-1.41.4-libext2fs-info.patch +Patch5: e2fsprogs-1.41.4-fix-blkid-segfault.patch Url: http://e2fsprogs.sourceforge.net/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -26,18 +27,18 @@ BuildRequires: libsepol-devel, device-mapper-devel, util-linux %description The e2fsprogs package contains a number of utilities for creating, -checking, modifying, and correcting any inconsistencies in second -and third extended (ext2/ext3) filesystems. E2fsprogs contains -e2fsck (used to repair filesystem inconsistencies after an unclean -shutdown), mke2fs (used to initialize a partition to contain an -empty ext2 filesystem), debugfs (used to examine the internal +checking, modifying, and correcting any inconsistencies in second, +third and fourth extended (ext2/ext3/ext4) filesystems. E2fsprogs +contains e2fsck (used to repair filesystem inconsistencies after an +unclean shutdown), mke2fs (used to initialize a partition to contain +an empty ext2 filesystem), debugfs (used to examine the internal structure of a filesystem, to manually repair a corrupted filesystem, or to create test cases for e2fsck), tune2fs (used to modify filesystem parameters), and most of the other core ext2fs filesystem utilities. You should install the e2fsprogs package if you need to manage the -performance of an ext2 and/or ext3 filesystem. +performance of an ext2, ext3, or ext4 filesystem. %package libs Summary: Ext2/3 filesystem-specific shared libraries and headers @@ -97,6 +98,8 @@ SMP systems. %patch3 -p1 -b .statfs # Fix up name of info file %patch4 -p1 -b .info +# Fix blkid segfault in modules.dep scanning +%patch5 -p1 -b .info %build %configure --enable-elf-shlibs --enable-nls --disable-e2initrd-helper --enable-blkid-devmapper --enable-blkid-selinux @@ -295,6 +298,10 @@ fi %dir %attr(2775, uuidd, uuidd) /var/lib/libuuid %changelog +* Thu Feb 26 2009 Eric Sandeen 1.41.4-4 +- Edit summary & description to include ext4 (#487469) +- Fix blkid null ptr deref in initrd (#486997) + * Tue Feb 24 2009 Fedora Release Engineering - 1.41.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild