* Fri Jun 22 2007 Eric Sandeen <esandeen@redhat.com> 1.39-14
- Many coverity-found potential leaks, segfaults, etc (#239354) - Fix debugfs segfaults when no fs open (#208416, #209330) - Avoid recursive loops in logdump due to symlinks in /dev (#210371) - Don't write changes to the backup superblocks by default (#229561) - Correct byteswapping for fast symlinks with xattrs (#232663) - e2fsck: added sanity check for xattr validation (#230193)
This commit is contained in:
parent
7d1281bc69
commit
66fd3626d0
1995
e2fsprogs-1.39-coverity.patch
Normal file
1995
e2fsprogs-1.39-coverity.patch
Normal file
File diff suppressed because it is too large
Load Diff
51
e2fsprogs-1.39-dump_unused-segfault.patch
Normal file
51
e2fsprogs-1.39-dump_unused-segfault.patch
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
# HG changeset patch
|
||||||
|
# User tytso@mit.edu
|
||||||
|
# Date 1170006028 18000
|
||||||
|
# Node ID 1619c81226d196f7e943e96b1ecc80c477dc7806
|
||||||
|
# Parent 61145b06a34c8a476827e02fd0a8c7c95a2ad912
|
||||||
|
Fix dump_usued segault in debugfs if used without open filesystem
|
||||||
|
|
||||||
|
The dump_unused command in debugfs segfaults if used without an open
|
||||||
|
filesystem:
|
||||||
|
|
||||||
|
sor:~ # debugfs
|
||||||
|
debugfs 1.39 (29-May-2006)
|
||||||
|
debugfs: dump_unused
|
||||||
|
Segmentation fault
|
||||||
|
|
||||||
|
Patch (from IBM) below.
|
||||||
|
|
||||||
|
Signed-off-by: Matthias Koenig <mkoenig@suse.de>
|
||||||
|
|
||||||
|
|
||||||
|
Index: e2fsprogs-1.39-RHEL5/debugfs/ChangeLog
|
||||||
|
===================================================================
|
||||||
|
--- e2fsprogs-1.39-RHEL5.orig/debugfs/ChangeLog
|
||||||
|
+++ e2fsprogs-1.39-RHEL5/debugfs/ChangeLog
|
||||||
|
@@ -24,6 +24,11 @@
|
||||||
|
to avoid the possibility of an array overrun if the
|
||||||
|
filename is exactly EXT2_NAME_LEN in size.
|
||||||
|
|
||||||
|
+2007-01-28 Theodore Tso <tytso@mit.edu>
|
||||||
|
+
|
||||||
|
+ * unused.c: Fix bug so that the dump_unused command segfault if
|
||||||
|
+ used without an open filesystem
|
||||||
|
+
|
||||||
|
2006-08-30 Eric Sandeen <esandeen@redhat.com>
|
||||||
|
|
||||||
|
* htree.c (htree_dump_int_node): Fix printf formats.
|
||||||
|
Index: e2fsprogs-1.39-RHEL5/debugfs/unused.c
|
||||||
|
===================================================================
|
||||||
|
--- e2fsprogs-1.39-RHEL5.orig/debugfs/unused.c
|
||||||
|
+++ e2fsprogs-1.39-RHEL5/debugfs/unused.c
|
||||||
|
@@ -31,6 +31,10 @@ void do_dump_unused(int argc EXT2FS_ATTR
|
||||||
|
unsigned int i;
|
||||||
|
errcode_t retval;
|
||||||
|
|
||||||
|
+ if (common_args_process(argc, argv, 1, 1,
|
||||||
|
+ "dump_unused", "", 0))
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
for (blk=current_fs->super->s_first_data_block;
|
||||||
|
blk < current_fs->super->s_blocks_count; blk++) {
|
||||||
|
if (ext2fs_test_block_bitmap(current_fs->block_map,blk))
|
49
e2fsprogs-1.39-logdump-symlinks.patch
Normal file
49
e2fsprogs-1.39-logdump-symlinks.patch
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
# HG changeset patch
|
||||||
|
# User tytso@mit.edu
|
||||||
|
# Date 1159151618 14400
|
||||||
|
# Node ID 6ded68c87fd5e19be3a43ced60477d96b87cbae0
|
||||||
|
# Parent d39ab0d5fde2da82c7de72a536c9bd635d372836
|
||||||
|
blkid_devno_to_devname(): Avoid recursive loops due to symlinks in /dev
|
||||||
|
|
||||||
|
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
||||||
|
|
||||||
|
Index: e2fsprogs-1.39-RHEL5/lib/blkid/ChangeLog
|
||||||
|
===================================================================
|
||||||
|
--- e2fsprogs-1.39-RHEL5.orig/lib/blkid/ChangeLog
|
||||||
|
+++ e2fsprogs-1.39-RHEL5/lib/blkid/ChangeLog
|
||||||
|
@@ -2,6 +2,11 @@
|
||||||
|
|
||||||
|
* read.c (parse_dev): Fix memory leak on error path.
|
||||||
|
|
||||||
|
+2006-09-24 Theodore Tso <tytso@mit.edu>
|
||||||
|
+
|
||||||
|
+ * devno.c (scan_dir): Don't follow symlinks when recursively
|
||||||
|
+ searching directories under /dev.
|
||||||
|
+
|
||||||
|
2006-09-17 Karel Zak <kzak@redhat.com>
|
||||||
|
|
||||||
|
* probe.c (probe_fat): Fix problem with empty FAT label.
|
||||||
|
Index: e2fsprogs-1.39-RHEL5/lib/blkid/devno.c
|
||||||
|
===================================================================
|
||||||
|
--- e2fsprogs-1.39-RHEL5.orig/lib/blkid/devno.c
|
||||||
|
+++ e2fsprogs-1.39-RHEL5/lib/blkid/devno.c
|
||||||
|
@@ -120,15 +120,16 @@ static void scan_dir(char *dirname, dev_
|
||||||
|
if (stat(path, &st) < 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
- if (S_ISDIR(st.st_mode))
|
||||||
|
- add_to_dirlist(path, list);
|
||||||
|
- else if (S_ISBLK(st.st_mode) && st.st_rdev == devno) {
|
||||||
|
+ if (S_ISBLK(st.st_mode) && st.st_rdev == devno) {
|
||||||
|
*devname = blkid_strdup(path);
|
||||||
|
DBG(DEBUG_DEVNO,
|
||||||
|
printf("found 0x%llx at %s (%p)\n", devno,
|
||||||
|
path, *devname));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
+ if (S_ISDIR(st.st_mode) && !lstat(path, &st) &&
|
||||||
|
+ S_ISDIR(st.st_mode))
|
||||||
|
+ add_to_dirlist(path, list);
|
||||||
|
}
|
||||||
|
closedir(dir);
|
||||||
|
return;
|
52
e2fsprogs-1.39-lsdel-segfault.patch
Normal file
52
e2fsprogs-1.39-lsdel-segfault.patch
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
# HG changeset patch
|
||||||
|
# User tytso@mit.edu
|
||||||
|
# Date 1156885376 14400
|
||||||
|
# Node ID 78dd5824848b223988f2d8531c7dbbf068bc255e
|
||||||
|
# Parent 712ade33bdf31b709d4796721bfa0f458f858a24
|
||||||
|
Fix debugfs coredump when lsdel is run without an open filesystem
|
||||||
|
|
||||||
|
Addresses Debian Bug: #378335
|
||||||
|
|
||||||
|
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
||||||
|
--- a/debugfs/ChangeLog Sat Aug 19 21:16:17 2006 -0400
|
||||||
|
+++ b/debugfs/ChangeLog Tue Aug 29 17:02:56 2006 -0400
|
||||||
|
@@ -28,6 +28,12 @@
|
||||||
|
|
||||||
|
* htree.c (htree_dump_int_node): Fix printf formats.
|
||||||
|
|
||||||
|
+2006-08-29 Theodore Tso <tytso@mit.edu>
|
||||||
|
+
|
||||||
|
+ * lsdel.c (do_lsdel): Fix core-dumping bug. Don't depend on
|
||||||
|
+ current_fs being non-NULL until after the call to
|
||||||
|
+ common_args_process(). (Addresses Debian Bug: #378335)
|
||||||
|
+
|
||||||
|
2006-05-29 Theodore Tso <tytso@mit.edu>
|
||||||
|
|
||||||
|
* util.c (reset_getopt): In order to support ancient Linux header
|
||||||
|
Index: e2fsprogs-1.39-RHEL5/debugfs/lsdel.c
|
||||||
|
===================================================================
|
||||||
|
--- e2fsprogs-1.39-RHEL5.orig/debugfs/lsdel.c
|
||||||
|
+++ e2fsprogs-1.39-RHEL5/debugfs/lsdel.c
|
||||||
|
@@ -81,12 +81,13 @@ void do_lsdel(int argc, char **argv)
|
||||||
|
int i;
|
||||||
|
long secs = 0;
|
||||||
|
char *tmp;
|
||||||
|
- time_t now = current_fs->now ? current_fs->now : time(0);
|
||||||
|
+ time_t now;
|
||||||
|
FILE *out;
|
||||||
|
|
||||||
|
if (common_args_process(argc, argv, 1, 2, "ls_deleted_inodes",
|
||||||
|
"[secs]", 0))
|
||||||
|
return;
|
||||||
|
+
|
||||||
|
if (argc > 1) {
|
||||||
|
secs = strtol(argv[1],&tmp,0);
|
||||||
|
if (*tmp) {
|
||||||
|
@@ -95,6 +96,7 @@ void do_lsdel(int argc, char **argv)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ now = current_fs->now ? current_fs->now : time(0);
|
||||||
|
max_delarray = 100;
|
||||||
|
num_delarray = 0;
|
||||||
|
delarray = malloc(max_delarray * sizeof(struct deleted_info));
|
173
e2fsprogs-1.39-save-backup-sbs.patch
Normal file
173
e2fsprogs-1.39-save-backup-sbs.patch
Normal file
@ -0,0 +1,173 @@
|
|||||||
|
# HG changeset patch
|
||||||
|
# User tytso@mit.edu
|
||||||
|
# Date 1182205610 14400
|
||||||
|
# Node ID 5c00c21991974cc750efa2474fab484b0a1f1522
|
||||||
|
# Parent 449d075befe0e4be32cce9d34ca1f03575e292d2
|
||||||
|
Don't write changes to the backup superblocks by default
|
||||||
|
|
||||||
|
This patch changes ext2fs_open() to set EXT2_FLAG_MASTER_SB_ONLY by
|
||||||
|
default. This avoids some problems in e2fsck (reported by Jim Garlick)
|
||||||
|
where a corrupt journal can end up writing the bad superblock to the
|
||||||
|
backups. In general, only e2fsck (after the filesystem is clean),
|
||||||
|
tune2fs, and resize2fs should change the backup superblocks by default.
|
||||||
|
Most callers of ext2fs_open() should not be touching anything where the
|
||||||
|
backups should be touched. So let's change the defaults to avoid
|
||||||
|
potential problems.
|
||||||
|
|
||||||
|
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
||||||
|
|
||||||
|
Index: e2fsprogs-1.39-RHEL5/e2fsck/ChangeLog
|
||||||
|
===================================================================
|
||||||
|
--- e2fsprogs-1.39-RHEL5.orig/e2fsck/ChangeLog
|
||||||
|
+++ e2fsprogs-1.39-RHEL5/e2fsck/ChangeLog
|
||||||
|
@@ -1,3 +1,10 @@
|
||||||
|
+2007-06-18 Theodore Tso <tytso@mit.edu>
|
||||||
|
+
|
||||||
|
+ * journal.c (e2fsck_run_ext3_journal), unix.c (main): Explicitly
|
||||||
|
+ add the EXT2_FLAG_MASTER_SB_ONLY flag to make sure we
|
||||||
|
+ won't write out the backup superblocks until we're sure
|
||||||
|
+ that we want write them out.
|
||||||
|
+
|
||||||
|
2007-03-28 Theodore Tso <tytso@mit.edu>
|
||||||
|
|
||||||
|
* pass1.c (e2fsck_pass1, check_ext_attr),
|
||||||
|
Index: e2fsprogs-1.39-RHEL5/e2fsck/journal.c
|
||||||
|
===================================================================
|
||||||
|
--- e2fsprogs-1.39-RHEL5.orig/e2fsck/journal.c
|
||||||
|
+++ e2fsprogs-1.39-RHEL5/e2fsck/journal.c
|
||||||
|
@@ -832,6 +832,7 @@ int e2fsck_run_ext3_journal(e2fsck_t ctx
|
||||||
|
}
|
||||||
|
ctx->fs->priv_data = ctx;
|
||||||
|
ctx->fs->now = ctx->now;
|
||||||
|
+ ctx->fs->flags |= EXT2_FLAG_MASTER_SB_ONLY;
|
||||||
|
|
||||||
|
/* Set the superblock flags */
|
||||||
|
e2fsck_clear_recover(ctx, recover_retval);
|
||||||
|
Index: e2fsprogs-1.39-RHEL5/e2fsck/unix.c
|
||||||
|
===================================================================
|
||||||
|
--- e2fsprogs-1.39-RHEL5.orig/e2fsck/unix.c
|
||||||
|
+++ e2fsprogs-1.39-RHEL5/e2fsck/unix.c
|
||||||
|
@@ -978,6 +978,19 @@ restart:
|
||||||
|
fix_problem(ctx, PR_0_SB_CORRUPT, &pctx);
|
||||||
|
fatal_error(ctx, 0);
|
||||||
|
}
|
||||||
|
+ /*
|
||||||
|
+ * We only update the master superblock because (a) paranoia;
|
||||||
|
+ * we don't want to corrupt the backup superblocks, and (b) we
|
||||||
|
+ * don't need to update the mount count and last checked
|
||||||
|
+ * fields in the backup superblock (the kernel doesn't update
|
||||||
|
+ * the backup superblocks anyway). With newer versions of the
|
||||||
|
+ * library this flag is set by ext2fs_open2(), but we set this
|
||||||
|
+ * here just to be sure. (No, we don't support e2fsck running
|
||||||
|
+ * with some other libext2fs than the one that it was shipped
|
||||||
|
+ * with, but just in case....)
|
||||||
|
+ */
|
||||||
|
+ fs->flags |= EXT2_FLAG_MASTER_SB_ONLY;
|
||||||
|
+
|
||||||
|
ctx->fs = fs;
|
||||||
|
fs->priv_data = ctx;
|
||||||
|
fs->now = ctx->now;
|
||||||
|
@@ -989,7 +1002,6 @@ restart:
|
||||||
|
get_newer:
|
||||||
|
fatal_error(ctx, _("Get a newer version of e2fsck!"));
|
||||||
|
}
|
||||||
|
-
|
||||||
|
/*
|
||||||
|
* Set the device name, which is used whenever we print error
|
||||||
|
* or informational messages to the user.
|
||||||
|
@@ -1088,15 +1100,6 @@ restart:
|
||||||
|
!(ctx->options & E2F_OPT_READONLY))
|
||||||
|
ext2fs_mark_super_dirty(fs);
|
||||||
|
|
||||||
|
- /*
|
||||||
|
- * We only update the master superblock because (a) paranoia;
|
||||||
|
- * we don't want to corrupt the backup superblocks, and (b) we
|
||||||
|
- * don't need to update the mount count and last checked
|
||||||
|
- * fields in the backup superblock (the kernel doesn't
|
||||||
|
- * update the backup superblocks anyway).
|
||||||
|
- */
|
||||||
|
- fs->flags |= EXT2_FLAG_MASTER_SB_ONLY;
|
||||||
|
-
|
||||||
|
ehandler_init(fs->io);
|
||||||
|
|
||||||
|
if (ctx->superblock)
|
||||||
|
Index: e2fsprogs-1.39-RHEL5/lib/ext2fs/ChangeLog
|
||||||
|
===================================================================
|
||||||
|
--- e2fsprogs-1.39-RHEL5.orig/lib/ext2fs/ChangeLog
|
||||||
|
+++ e2fsprogs-1.39-RHEL5/lib/ext2fs/ChangeLog
|
||||||
|
@@ -1,3 +1,10 @@
|
||||||
|
+2007-06-12 Theodore Tso <tytso@mit.edu>
|
||||||
|
+
|
||||||
|
+ * openfs.c (ext2fs_open2): We now set EXT2_FLAG_MASTER_SB_ONLY
|
||||||
|
+ when we open a filesystem. Applications that want to
|
||||||
|
+ write changes to the backup superblocks need to explicitly
|
||||||
|
+ clear this flag.
|
||||||
|
+
|
||||||
|
2007-03-21 Theodore Tso <tytso@mit.edu>
|
||||||
|
|
||||||
|
* imager.c (ext2fs_image_inode_write), inode.c
|
||||||
|
Index: e2fsprogs-1.39-RHEL5/lib/ext2fs/openfs.c
|
||||||
|
===================================================================
|
||||||
|
--- e2fsprogs-1.39-RHEL5.orig/lib/ext2fs/openfs.c
|
||||||
|
+++ e2fsprogs-1.39-RHEL5/lib/ext2fs/openfs.c
|
||||||
|
@@ -100,6 +100,8 @@ errcode_t ext2fs_open2(const char *name,
|
||||||
|
memset(fs, 0, sizeof(struct struct_ext2_filsys));
|
||||||
|
fs->magic = EXT2_ET_MAGIC_EXT2FS_FILSYS;
|
||||||
|
fs->flags = flags;
|
||||||
|
+ /* don't overwrite sb backups unless flag is explicitly cleared */
|
||||||
|
+ fs->flags |= EXT2_FLAG_MASTER_SB_ONLY;
|
||||||
|
fs->umask = 022;
|
||||||
|
retval = ext2fs_get_mem(strlen(name)+1, &fs->device_name);
|
||||||
|
if (retval)
|
||||||
|
Index: e2fsprogs-1.39-RHEL5/misc/ChangeLog
|
||||||
|
===================================================================
|
||||||
|
--- e2fsprogs-1.39-RHEL5.orig/misc/ChangeLog
|
||||||
|
+++ e2fsprogs-1.39-RHEL5/misc/ChangeLog
|
||||||
|
@@ -1,3 +1,9 @@
|
||||||
|
+2007-06-12 Theodore Tso <tytso@mit.edu>
|
||||||
|
+
|
||||||
|
+ * tune2fs.c (main): Clear the EXT2_FLAG_MASTER_SB_ONLY flag
|
||||||
|
+ because we want tune2fs changes to get written to the
|
||||||
|
+ backup blocks.
|
||||||
|
+
|
||||||
|
2007-05-31 Theodore Tso <tytso@mit.edu>
|
||||||
|
|
||||||
|
* mke2fs.c (parse_extended_opts): Free allocated buf on return
|
||||||
|
Index: e2fsprogs-1.39-RHEL5/misc/tune2fs.c
|
||||||
|
===================================================================
|
||||||
|
--- e2fsprogs-1.39-RHEL5.orig/misc/tune2fs.c
|
||||||
|
+++ e2fsprogs-1.39-RHEL5/misc/tune2fs.c
|
||||||
|
@@ -781,6 +781,7 @@ int main (int argc, char ** argv)
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
sb = fs->super;
|
||||||
|
+ fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
|
||||||
|
if (print_label) {
|
||||||
|
/* For e2label emulation */
|
||||||
|
printf("%.*s\n", (int) sizeof(sb->s_volume_name),
|
||||||
|
Index: e2fsprogs-1.39-RHEL5/resize/ChangeLog
|
||||||
|
===================================================================
|
||||||
|
--- e2fsprogs-1.39-RHEL5.orig/resize/ChangeLog
|
||||||
|
+++ e2fsprogs-1.39-RHEL5/resize/ChangeLog
|
||||||
|
@@ -1,3 +1,9 @@
|
||||||
|
+2007-06-12 Theodore Tso <tytso@mit.edu>
|
||||||
|
+
|
||||||
|
+ * resize2fs.c (resize_fs): Clear the EXT2_FLAG_MASTER_SB_ONLY flag
|
||||||
|
+ to make sure the superblock changes are written out to the
|
||||||
|
+ backup superblocks.
|
||||||
|
+
|
||||||
|
2007-03-18 Theodore Tso <tytso@mit.edu>
|
||||||
|
|
||||||
|
* resize2fs.c (check_and_change_inodes): Check to make sure the
|
||||||
|
Index: e2fsprogs-1.39-RHEL5/resize/resize2fs.c
|
||||||
|
===================================================================
|
||||||
|
--- e2fsprogs-1.39-RHEL5.orig/resize/resize2fs.c
|
||||||
|
+++ e2fsprogs-1.39-RHEL5/resize/resize2fs.c
|
||||||
|
@@ -138,6 +138,7 @@ errcode_t resize_fs(ext2_filsys fs, blk_
|
||||||
|
if (retval)
|
||||||
|
goto errout;
|
||||||
|
|
||||||
|
+ rfs->new_fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
|
||||||
|
retval = ext2fs_close(rfs->new_fs);
|
||||||
|
if (retval)
|
||||||
|
goto errout;
|
111
e2fsprogs-1.39-symlink-byteswap.patch
Normal file
111
e2fsprogs-1.39-symlink-byteswap.patch
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
# HG changeset patch
|
||||||
|
# User tytso@mit.edu
|
||||||
|
# Date 1176573631 14400
|
||||||
|
# Node ID aa8d65921c8922dfed73dd05027a097cc5946653
|
||||||
|
# Parent 4b2e34b5f7506f9f74b3fadf79280316d57e47d5
|
||||||
|
Correct byteswapping for fast symlinks with xattrs
|
||||||
|
|
||||||
|
Fix a problem byte-swapping fast symlinks inodes that contain extended
|
||||||
|
attributes.
|
||||||
|
|
||||||
|
Addresses Red Hat Bugzilla: #232663
|
||||||
|
Addresses LTC Bugzilla: #27634
|
||||||
|
|
||||||
|
Signed-off-by: "Bryn M. Reeves" <breeves@redhat.com>
|
||||||
|
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
||||||
|
|
||||||
|
Index: e2fsprogs-1.39-RHEL5/e2fsck/ChangeLog
|
||||||
|
===================================================================
|
||||||
|
--- e2fsprogs-1.39-RHEL5.orig/e2fsck/ChangeLog
|
||||||
|
+++ e2fsprogs-1.39-RHEL5/e2fsck/ChangeLog
|
||||||
|
@@ -5,6 +5,14 @@
|
||||||
|
won't write out the backup superblocks until we're sure
|
||||||
|
that we want write them out.
|
||||||
|
|
||||||
|
+2007-04-14 Theodore Tso <tytso@mit.edu>
|
||||||
|
+
|
||||||
|
+ * pass2.c (e2fsck_process_bad_inode): Remove special kludge that
|
||||||
|
+ dealt with long symlinks on big endian systems. It turns
|
||||||
|
+ out this was a workaround to a bug described in Red Hat
|
||||||
|
+ Bugzilla #232663, with an odd twist. See comment #12 for
|
||||||
|
+ more details.
|
||||||
|
+
|
||||||
|
2007-03-28 Theodore Tso <tytso@mit.edu>
|
||||||
|
|
||||||
|
* pass1.c (e2fsck_pass1, check_ext_attr),
|
||||||
|
Index: e2fsprogs-1.39-RHEL5/e2fsck/pass2.c
|
||||||
|
===================================================================
|
||||||
|
--- e2fsprogs-1.39-RHEL5.orig/e2fsck/pass2.c
|
||||||
|
+++ e2fsprogs-1.39-RHEL5/e2fsck/pass2.c
|
||||||
|
@@ -1187,22 +1187,6 @@ extern int e2fsck_process_bad_inode(e2fs
|
||||||
|
!(fs->super->s_feature_compat & EXT2_FEATURE_COMPAT_EXT_ATTR)) {
|
||||||
|
if (fix_problem(ctx, PR_2_FILE_ACL_ZERO, &pctx)) {
|
||||||
|
inode.i_file_acl = 0;
|
||||||
|
-#ifdef EXT2FS_ENABLE_SWAPFS
|
||||||
|
- /*
|
||||||
|
- * This is a special kludge to deal with long
|
||||||
|
- * symlinks on big endian systems. i_blocks
|
||||||
|
- * had already been decremented earlier in
|
||||||
|
- * pass 1, but since i_file_acl hadn't yet
|
||||||
|
- * been cleared, ext2fs_read_inode() assumed
|
||||||
|
- * that the file was short symlink and would
|
||||||
|
- * not have byte swapped i_block[0]. Hence,
|
||||||
|
- * we have to byte-swap it here.
|
||||||
|
- */
|
||||||
|
- if (LINUX_S_ISLNK(inode.i_mode) &&
|
||||||
|
- (fs->flags & EXT2_FLAG_SWAP_BYTES) &&
|
||||||
|
- (inode.i_blocks == fs->blocksize >> 9))
|
||||||
|
- inode.i_block[0] = ext2fs_swab32(inode.i_block[0]);
|
||||||
|
-#endif
|
||||||
|
inode_modified++;
|
||||||
|
} else
|
||||||
|
not_fixed++;
|
||||||
|
Index: e2fsprogs-1.39-RHEL5/lib/ext2fs/swapfs.c
|
||||||
|
===================================================================
|
||||||
|
--- e2fsprogs-1.39-RHEL5.orig/lib/ext2fs/swapfs.c
|
||||||
|
+++ e2fsprogs-1.39-RHEL5/lib/ext2fs/swapfs.c
|
||||||
|
@@ -124,7 +124,7 @@ void ext2fs_swap_inode_full(ext2_filsys
|
||||||
|
struct ext2_inode_large *f, int hostorder,
|
||||||
|
int bufsize)
|
||||||
|
{
|
||||||
|
- unsigned i;
|
||||||
|
+ unsigned i, has_data_blocks;
|
||||||
|
int islnk = 0;
|
||||||
|
__u32 *eaf, *eat;
|
||||||
|
|
||||||
|
@@ -141,11 +141,17 @@ void ext2fs_swap_inode_full(ext2_filsys
|
||||||
|
t->i_dtime = ext2fs_swab32(f->i_dtime);
|
||||||
|
t->i_gid = ext2fs_swab16(f->i_gid);
|
||||||
|
t->i_links_count = ext2fs_swab16(f->i_links_count);
|
||||||
|
+ if (hostorder)
|
||||||
|
+ has_data_blocks = ext2fs_inode_data_blocks(fs,
|
||||||
|
+ (struct ext2_inode *) f);
|
||||||
|
t->i_blocks = ext2fs_swab32(f->i_blocks);
|
||||||
|
+ if (!hostorder)
|
||||||
|
+ has_data_blocks = ext2fs_inode_data_blocks(fs,
|
||||||
|
+ (struct ext2_inode *) t);
|
||||||
|
t->i_flags = ext2fs_swab32(f->i_flags);
|
||||||
|
t->i_file_acl = ext2fs_swab32(f->i_file_acl);
|
||||||
|
t->i_dir_acl = ext2fs_swab32(f->i_dir_acl);
|
||||||
|
- if (!islnk || ext2fs_inode_data_blocks(fs, (struct ext2_inode *)t)) {
|
||||||
|
+ if (!islnk || has_data_blocks ) {
|
||||||
|
for (i = 0; i < EXT2_N_BLOCKS; i++)
|
||||||
|
t->i_block[i] = ext2fs_swab32(f->i_block[i]);
|
||||||
|
} else if (t != f) {
|
||||||
|
Index: e2fsprogs-1.39-RHEL5/lib/ext2fs/ChangeLog
|
||||||
|
===================================================================
|
||||||
|
--- e2fsprogs-1.39-RHEL5.orig/lib/ext2fs/ChangeLog
|
||||||
|
+++ e2fsprogs-1.39-RHEL5/lib/ext2fs/ChangeLog
|
||||||
|
@@ -5,6 +5,12 @@
|
||||||
|
write changes to the backup superblocks need to explicitly
|
||||||
|
clear this flag.
|
||||||
|
|
||||||
|
+2007-04-14 Theodore Tso <tytso@mit.edu>
|
||||||
|
+
|
||||||
|
+ * swapfs.c (ext2fs_swap_inode_full): Fix a problem byte-swapping
|
||||||
|
+ fast symlinks inodes that contain extended attributes.
|
||||||
|
+ (Addresses Red Hat Bugzilla #232663, LTC bugzilla #27634)
|
||||||
|
+
|
||||||
|
2007-03-21 Theodore Tso <tytso@mit.edu>
|
||||||
|
|
||||||
|
* imager.c (ext2fs_image_inode_write), inode.c
|
49
e2fsprogs-1.39-xattr-sanity.patch
Normal file
49
e2fsprogs-1.39-xattr-sanity.patch
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
# HG changeset patch
|
||||||
|
# User tytso@mit.edu
|
||||||
|
# Date 1182493358 14400
|
||||||
|
# Node ID 702632e66380e459f60b238570edd1e911dd46bc
|
||||||
|
# Parent 17c2ad1542e716779e127b5db35879c391ac6282
|
||||||
|
e2fsck: added sanity check for xattr validation
|
||||||
|
|
||||||
|
Add an extra validity test in check_ext_attr(). If an attribute's
|
||||||
|
e_value_size is zero the current code does not allocate a region for it
|
||||||
|
and as a result the e_value_offs value is not verified. However, if
|
||||||
|
e_value_offs is very large then the later call to
|
||||||
|
ext2fs_ext_attr_hash_entry() can dereference bad memory and crash
|
||||||
|
e2fsck.
|
||||||
|
|
||||||
|
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
|
||||||
|
Signed-off-by: Jim Garlick <garlick@llnl.gov>
|
||||||
|
|
||||||
|
--- a/e2fsck/ChangeLog Thu Jun 21 13:43:33 2007 -0400
|
||||||
|
+++ b/e2fsck/ChangeLog Fri Jun 22 02:22:38 2007 -0400
|
||||||
|
@@ -1,3 +1,13 @@ 2007-06-18 Theodore Tso <tytso@mit.edu
|
||||||
|
+2007-06-22 Theodore Tso <tytso@mit.edu>
|
||||||
|
+
|
||||||
|
+ * pass1.c (check_ext_attr): Adds an extra validity test in
|
||||||
|
+ check_ext_attr(). If an attribute's e_value_size is zero
|
||||||
|
+ the current code does not allocate a region for it and as
|
||||||
|
+ a result the e_value_offs value is not verified. However,
|
||||||
|
+ if e_value_offs is very large then the later call to
|
||||||
|
+ ext2fs_ext_attr_hash_entry() can dereference bad memory
|
||||||
|
+ and crash e2fsck.
|
||||||
|
+
|
||||||
|
2007-06-18 Theodore Tso <tytso@mit.edu>
|
||||||
|
|
||||||
|
* journal.c (e2fsck_run_ext3_journal), unix.c (main): Explicitly
|
||||||
|
--- a/e2fsck/pass1.c Thu Jun 21 13:43:33 2007 -0400
|
||||||
|
+++ b/e2fsck/pass1.c Fri Jun 22 02:22:38 2007 -0400
|
||||||
|
@@ -1380,6 +1380,11 @@ static int check_ext_attr(e2fsck_t ctx,
|
||||||
|
if (fix_problem(ctx, PR_1_EA_BAD_VALUE, pctx))
|
||||||
|
goto clear_extattr;
|
||||||
|
}
|
||||||
|
+ if (entry->e_value_offs + entry->e_value_size > fs->blocksize) {
|
||||||
|
+ if (fix_problem(ctx, PR_1_EA_BAD_VALUE, pctx))
|
||||||
|
+ goto clear_extattr;
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
if (entry->e_value_size &&
|
||||||
|
region_allocate(region, entry->e_value_offs,
|
||||||
|
EXT2_EXT_ATTR_SIZE(entry->e_value_size))) {
|
||||||
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
|||||||
Summary: Utilities for managing the second and third extended (ext2/ext3) filesystems
|
Summary: Utilities for managing the second and third extended (ext2/ext3) filesystems
|
||||||
Name: e2fsprogs
|
Name: e2fsprogs
|
||||||
Version: 1.39
|
Version: 1.39
|
||||||
Release: 13%{?dist}
|
Release: 14%{?dist}
|
||||||
License: GPL
|
License: GPL
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
Source: ftp://download.sourceforge.net/pub/sourceforge/e2fsprogs/e2fsprogs-%{version}.tar.gz
|
Source: ftp://download.sourceforge.net/pub/sourceforge/e2fsprogs/e2fsprogs-%{version}.tar.gz
|
||||||
@ -32,6 +32,13 @@ Patch60: e2fsprogs-1.39-e2p_percent_div.patch
|
|||||||
Patch61: e2fsprogs-1.39-uuid.patch
|
Patch61: e2fsprogs-1.39-uuid.patch
|
||||||
Patch62: e2fsprogs-1.39-mkinstalldirs.patch
|
Patch62: e2fsprogs-1.39-mkinstalldirs.patch
|
||||||
Patch63: e2fsprogs-1.39-LUKS-blkid.patch
|
Patch63: e2fsprogs-1.39-LUKS-blkid.patch
|
||||||
|
Patch64: e2fsprogs-1.39-coverity.patch
|
||||||
|
Patch65: e2fsprogs-1.39-dump_unused-segfault.patch
|
||||||
|
Patch66: e2fsprogs-1.39-lsdel-segfault.patch
|
||||||
|
Patch67: e2fsprogs-1.39-logdump-symlinks.patch
|
||||||
|
Patch68: e2fsprogs-1.39-save-backup-sbs.patch
|
||||||
|
Patch69: e2fsprogs-1.39-symlink-byteswap.patch
|
||||||
|
Patch70: e2fsprogs-1.39-xattr-sanity.patch
|
||||||
Url: http://e2fsprogs.sourceforge.net/
|
Url: http://e2fsprogs.sourceforge.net/
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
Requires: e2fsprogs-libs = %{version}-%{release}, device-mapper
|
Requires: e2fsprogs-libs = %{version}-%{release}, device-mapper
|
||||||
@ -114,8 +121,21 @@ also want to install e2fsprogs.
|
|||||||
%patch60 -p1 -b .e2p_percent_div
|
%patch60 -p1 -b .e2p_percent_div
|
||||||
%patch61 -p1 -b .uuid
|
%patch61 -p1 -b .uuid
|
||||||
%patch62 -p1 -b .mkinstalldirs
|
%patch62 -p1 -b .mkinstalldirs
|
||||||
|
# Teach blkid about luks
|
||||||
%patch63 -p1 -b .LUKS
|
%patch63 -p1 -b .LUKS
|
||||||
|
# Fix many coverity-found leaks etc
|
||||||
|
%patch64 -p1 -b .coverity
|
||||||
|
# A couple of segfaults in debugfs if no fs is open
|
||||||
|
%patch65 -p1 -b .dump_unused
|
||||||
|
%patch66 -p1 -b .lsdel
|
||||||
|
# Avoid recursive loops due to symlinks in /dev
|
||||||
|
%patch67 -p1 -b .dev-symlinks
|
||||||
|
# Don't write changes to the backup superblocks by default
|
||||||
|
%patch68 -p1 -b .backup-sbs
|
||||||
|
# Correct byteswapping for fast symlinks with xattrs
|
||||||
|
%patch69 -p1 -b .symlink-byteswap
|
||||||
|
# e2fsck: added sanity check for xattr validation
|
||||||
|
%patch70 -p1 -b .xattr-sanity
|
||||||
%build
|
%build
|
||||||
aclocal
|
aclocal
|
||||||
autoconf
|
autoconf
|
||||||
@ -266,11 +286,19 @@ exit 0
|
|||||||
%{_mandir}/man3/uuid_unparse.3*
|
%{_mandir}/man3/uuid_unparse.3*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jun 22 2007 Eric Sandeen <esandeen@redhat.com> 1.39-14
|
||||||
|
- Many coverity-found potential leaks, segfaults, etc (#239354)
|
||||||
|
- Fix debugfs segfaults when no fs open (#208416, #209330)
|
||||||
|
- Avoid recursive loops in logdump due to symlinks in /dev (#210371)
|
||||||
|
- Don't write changes to the backup superblocks by default (#229561)
|
||||||
|
- Correct byteswapping for fast symlinks with xattrs (#232663)
|
||||||
|
- e2fsck: added sanity check for xattr validation (#230193)
|
||||||
|
|
||||||
* Wed Jun 20 2007 Eric Sandeen <esandeen@redhat.com> 1.39-13
|
* Wed Jun 20 2007 Eric Sandeen <esandeen@redhat.com> 1.39-13
|
||||||
- add dist tag to release field
|
- add dist tag to release field
|
||||||
|
|
||||||
* Wed Jun 20 2007 Eric Sandeen <esandeen@redhat.com> 1.39-12
|
* Wed Jun 20 2007 Eric Sandeen <esandeen@redhat.com> 1.39-12
|
||||||
- add LUKS support to libblkid
|
- add LUKS support to libblkid (#242421)
|
||||||
|
|
||||||
* Fri Feb 23 2007 Karsten Hopp <karsten@redhat.com> 1.39-11
|
* Fri Feb 23 2007 Karsten Hopp <karsten@redhat.com> 1.39-11
|
||||||
- fix post/preun requirements
|
- fix post/preun requirements
|
||||||
|
Loading…
Reference in New Issue
Block a user