mirror of https://github.com/vitalif/e2fsprogs
Merge branch 'next' into debian
commit
b24f6d9a7c
|
@ -68,8 +68,8 @@ pkgconfigdir = $(libdir)/pkgconfig
|
|||
@ifGNUmake@ endif
|
||||
@ifGNUmake@ endif
|
||||
|
||||
@ifNotGNUmake@ CHECK_CMD=@true
|
||||
@ifNotGNUmake@ CPPHECK_CMD=@true
|
||||
@ifNotGNUmake@ CHECK_CMD=true
|
||||
@ifNotGNUmake@ CPPCHECK_CMD=true
|
||||
|
||||
CC = @CC@
|
||||
BUILD_CC = @BUILD_CC@
|
||||
|
|
2
README
2
README
|
@ -1,4 +1,4 @@
|
|||
This is the new version (1.43.2) of the second extended file
|
||||
This is the new version (1.43.3) of the second extended file
|
||||
system management programs.
|
||||
|
||||
From time to time, I release new versions of e2fsprogs, to fix
|
||||
|
|
|
@ -1,3 +1,31 @@
|
|||
E2fsprogs 1.43.3 (September 4, 2016)
|
||||
====================================
|
||||
|
||||
Fix e2fsck's handling of timestamps on 32-bit systems.
|
||||
|
||||
E2fsck will now check, and if necessary repair the extra isize fields
|
||||
in the inode and superblock.
|
||||
|
||||
Fix crashes on architectures such as sparc64 that are sensitive to
|
||||
unaligned pointer derferences in the journal recovery code when
|
||||
journal checksums are enabled.
|
||||
|
||||
Programming notes
|
||||
-----------------
|
||||
|
||||
Support reproducible builds by not capturing the build directory into
|
||||
the mk_cmds and compile_et scripts. Also fix debian build rules to
|
||||
ensure build reproducibility.
|
||||
|
||||
Fix debian build rules to ensure build reproducibility and to avoid
|
||||
hiding the linker flags for e2fsck.static so the build hardening log
|
||||
scanner can properly audit the build.
|
||||
|
||||
Fix compatibility with FreeBSD's pmake and teach the configure script
|
||||
to force the creation of pmake-compatible Makefiles if the
|
||||
FORCE_NATIVE_MAKE environment variable is set to a non-empty value.
|
||||
|
||||
|
||||
E2fsprogs 1.43.2 (September 1, 2016)
|
||||
====================================
|
||||
|
||||
|
|
|
@ -108,7 +108,12 @@ AC_DEFUN(
|
|||
[CHECK_GNU_MAKE], [ AC_CACHE_CHECK( for GNU make,_cv_gnu_make_command,
|
||||
_cv_gnu_make_command='' ;
|
||||
dnl Search all the common names for GNU make
|
||||
for a in "$MAKE" make gmake gnumake ; do
|
||||
if test -z "$FORCE_NATIVE_MAKE" ; then
|
||||
MAKES="make"
|
||||
else
|
||||
MAKES="make gmake gnumake"
|
||||
fi
|
||||
for a in "$MAKE" $MAKES ; do
|
||||
if test -z "$a" ; then continue ; fi ;
|
||||
if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then
|
||||
_cv_gnu_make_command=$a ;
|
||||
|
|
|
@ -11515,7 +11515,12 @@ if ${_cv_gnu_make_command+:} false; then :
|
|||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
_cv_gnu_make_command='' ;
|
||||
for a in "$MAKE" make gmake gnumake ; do
|
||||
if test -z "$FORCE_NATIVE_MAKE" ; then
|
||||
MAKES="make"
|
||||
else
|
||||
MAKES="make gmake gnumake"
|
||||
fi
|
||||
for a in "$MAKE" $MAKES ; do
|
||||
if test -z "$a" ; then continue ; fi ;
|
||||
if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then
|
||||
_cv_gnu_make_command=$a ;
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
e2fsprogs (1.43.3-1) unstable; urgency=medium
|
||||
|
||||
* Fix e2fsck's handling of timestamps on 32-bit system (Closes: #836559)
|
||||
* E2fsck will sanity check and repair the extra isize fields in inodes
|
||||
and the superblock.
|
||||
* Fix sparc64 crashes when dereferencing unaligned integers in journal
|
||||
blocks when metdata checksums are enabled.
|
||||
|
||||
-- Theodore Y. Ts'o <tytso@mit.edu> Sun, 04 Sep 2016 20:41:21 -0400
|
||||
|
||||
e2fsprogs (1.43.2-2) unstable; urgency=medium
|
||||
|
||||
* Fix build reproducibility problems
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
\input texinfo @c -*-texinfo-*-
|
||||
@c %**start of header
|
||||
@setfilename libext2fs.info
|
||||
@settitle The EXT2FS Library (version 1.43.2)
|
||||
@settitle The EXT2FS Library (version 1.43.3)
|
||||
@synindex tp fn
|
||||
@comment %**end of header
|
||||
|
||||
|
@ -60,7 +60,7 @@ by the author.
|
|||
|
||||
@title The EXT2FS Library
|
||||
@subtitle The EXT2FS Library
|
||||
@subtitle Version 1.43.2
|
||||
@subtitle Version 1.43.3
|
||||
@subtitle September 2016
|
||||
|
||||
@author by Theodore Ts'o
|
||||
|
@ -101,7 +101,7 @@ by the Foundation.
|
|||
|
||||
@top The EXT2FS Library
|
||||
|
||||
This manual documents the EXT2FS Library, version 1.43.2.
|
||||
This manual documents the EXT2FS Library, version 1.43.3.
|
||||
|
||||
@menu
|
||||
* Introduction to the EXT2FS Library::
|
||||
|
|
|
@ -488,10 +488,14 @@ static void check_inode_extra_space(e2fsck_t ctx, struct problem_context *pctx)
|
|||
* implementations should never allow i_extra_isize to be 0
|
||||
*/
|
||||
if (inode->i_extra_isize &&
|
||||
(inode->i_extra_isize < min || inode->i_extra_isize > max)) {
|
||||
(inode->i_extra_isize < min || inode->i_extra_isize > max ||
|
||||
inode->i_extra_isize & 3)) {
|
||||
if (!fix_problem(ctx, PR_1_EXTRA_ISIZE, pctx))
|
||||
return;
|
||||
inode->i_extra_isize = min;
|
||||
if (inode->i_extra_isize < min || inode->i_extra_isize > max)
|
||||
inode->i_extra_isize = sb->s_want_extra_isize;
|
||||
else
|
||||
inode->i_extra_isize = (inode->i_extra_isize + 3) & ~3;
|
||||
e2fsck_write_inode_full(ctx, pctx->ino, pctx->inode,
|
||||
EXT2_INODE_SIZE(sb), "pass1");
|
||||
return;
|
||||
|
@ -512,9 +516,9 @@ static void check_inode_extra_space(e2fsck_t ctx, struct problem_context *pctx)
|
|||
* If the inode's extended atime (ctime, crtime, mtime) is stored in
|
||||
* the old, invalid format, repair it.
|
||||
*/
|
||||
if ((sizeof(time_t) <= 4) ||
|
||||
(((sizeof(time_t) > 4) &&
|
||||
ctx->now < EXT4_EXTRA_NEGATIVE_DATE_CUTOFF)) &&
|
||||
if (((sizeof(time_t) <= 4) ||
|
||||
(((sizeof(time_t) > 4) &&
|
||||
ctx->now < EXT4_EXTRA_NEGATIVE_DATE_CUTOFF))) &&
|
||||
(CHECK_INODE_EXTRA_NEGATIVE_EPOCH(inode, atime) ||
|
||||
CHECK_INODE_EXTRA_NEGATIVE_EPOCH(inode, ctime) ||
|
||||
CHECK_INODE_EXTRA_NEGATIVE_EPOCH(inode, crtime) ||
|
||||
|
|
|
@ -477,6 +477,16 @@ static struct e2fsck_problem problem_table[] = {
|
|||
N_("Error initializing quota context in support library: %m\n"),
|
||||
PROMPT_NULL, PR_FATAL },
|
||||
|
||||
/* Bad s_min_extra_isize in superblock */
|
||||
{ PR_0_BAD_MIN_EXTRA_ISIZE,
|
||||
N_("Bad required extra isize in @S (%N). "),
|
||||
PROMPT_FIX, 0 },
|
||||
|
||||
/* Bad s_min_extra_isize in superblock */
|
||||
{ PR_0_BAD_WANT_EXTRA_ISIZE,
|
||||
N_("Bad desired extra isize in @S (%N). "),
|
||||
PROMPT_FIX, 0 },
|
||||
|
||||
/* Pass 1 errors */
|
||||
|
||||
/* Pass 1: Checking inodes, blocks, and sizes */
|
||||
|
|
|
@ -274,6 +274,12 @@ struct problem_context {
|
|||
/* Error initializing quota context */
|
||||
#define PR_0_QUOTA_INIT_CTX 0x00004C
|
||||
|
||||
/* Bad s_min_extra_isize in superblock */
|
||||
#define PR_0_BAD_MIN_EXTRA_ISIZE 0x00004D
|
||||
|
||||
/* Bad s_want_extra_isize in superblock */
|
||||
#define PR_0_BAD_WANT_EXTRA_ISIZE 0x00004E
|
||||
|
||||
|
||||
/*
|
||||
* Pass 1 errors
|
||||
|
|
|
@ -338,12 +338,24 @@ int journal_skip_recovery(journal_t *journal)
|
|||
return err;
|
||||
}
|
||||
|
||||
static inline __u32 get_be32(__be32 *p)
|
||||
{
|
||||
unsigned char *cp = (unsigned char *) p;
|
||||
__u32 ret;
|
||||
|
||||
ret = *cp++;
|
||||
ret = (ret << 8) + *cp++;
|
||||
ret = (ret << 8) + *cp++;
|
||||
ret = (ret << 8) + *cp++;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline unsigned long long read_tag_block(journal_t *journal,
|
||||
journal_block_tag_t *tag)
|
||||
{
|
||||
unsigned long long block = ext2fs_be32_to_cpu(tag->t_blocknr);
|
||||
unsigned long long block = get_be32(&tag->t_blocknr);
|
||||
if (jfs_has_feature_64bit(journal))
|
||||
block |= (u64)ext2fs_be32_to_cpu(tag->t_blocknr_high) << 32;
|
||||
block |= (u64)get_be32(&tag->t_blocknr_high) << 32;
|
||||
return block;
|
||||
}
|
||||
|
||||
|
|
|
@ -578,7 +578,35 @@ void check_super_block(e2fsck_t ctx)
|
|||
ext2fs_mark_super_dirty(fs);
|
||||
}
|
||||
}
|
||||
|
||||
if (EXT2_INODE_SIZE(sb) > EXT2_GOOD_OLD_INODE_SIZE) {
|
||||
unsigned min =
|
||||
sizeof(((struct ext2_inode_large *) 0)->i_extra_isize) +
|
||||
sizeof(((struct ext2_inode_large *) 0)->i_checksum_hi);
|
||||
unsigned max = EXT2_INODE_SIZE(sb) - EXT2_GOOD_OLD_INODE_SIZE;
|
||||
pctx.num = sb->s_min_extra_isize;
|
||||
if (sb->s_min_extra_isize &&
|
||||
(sb->s_min_extra_isize < min ||
|
||||
sb->s_min_extra_isize > max ||
|
||||
sb->s_min_extra_isize & 3) &&
|
||||
fix_problem(ctx, PR_0_BAD_MIN_EXTRA_ISIZE, &pctx)) {
|
||||
sb->s_min_extra_isize =
|
||||
(sizeof(struct ext2_inode_large) -
|
||||
EXT2_GOOD_OLD_INODE_SIZE);
|
||||
ext2fs_mark_super_dirty(fs);
|
||||
}
|
||||
pctx.num = sb->s_want_extra_isize;
|
||||
if (sb->s_want_extra_isize &&
|
||||
(sb->s_want_extra_isize < min ||
|
||||
sb->s_want_extra_isize > max ||
|
||||
sb->s_want_extra_isize & 3) &&
|
||||
fix_problem(ctx, PR_0_BAD_WANT_EXTRA_ISIZE, &pctx)) {
|
||||
sb->s_want_extra_isize =
|
||||
(sizeof(struct ext2_inode_large) -
|
||||
EXT2_GOOD_OLD_INODE_SIZE);
|
||||
ext2fs_mark_super_dirty(fs);
|
||||
}
|
||||
}
|
||||
|
||||
/* Are metadata_csum and uninit_bg both set? */
|
||||
if (ext2fs_has_feature_metadata_csum(fs->super) &&
|
||||
ext2fs_has_feature_gdt_csum(fs->super) &&
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
Begin3
|
||||
Title: EXT2 Filesystem utilities
|
||||
Version: 1.43.2
|
||||
Entered-date: 2016-09-01
|
||||
Version: 1.43.3
|
||||
Entered-date: 2016-09-04
|
||||
Description: The filesystem utilities for the EXT2, EXT3, and EXT4
|
||||
filesystems, including e2fsck, mke2fs, dumpe2fs, and others.
|
||||
Keywords: utilities, filesystem, Ext2fs, ext3, ext4
|
||||
Author: tytso@mit.edu (Theodore Tso)
|
||||
Maintained-by: tytso@mit.edu (Theodore Tso)
|
||||
Primary-site: ftp.kernel.org /pub/linux/kernel/people/tytso/e2fsprogs
|
||||
7224kB e2fsprogs-1.43.2.tar.gz
|
||||
644kB e2fsprogs-libs-1.43.2.tar.gz
|
||||
1kB e2fsprogs-1.43.2.lsm
|
||||
7224kB e2fsprogs-1.43.3.tar.gz
|
||||
644kB e2fsprogs-libs-1.43.3.tar.gz
|
||||
1kB e2fsprogs-1.43.3.lsm
|
||||
Alternate-site: download.sourceforge.net /pub/sourceforge/e2fsprogs
|
||||
Platforms: linux 1.2.x/1.3.x/2.0.x/2.1.x/2.2.x/2.3.x/2.4.x/2.5.x/2.6.x/3.x/4.x
|
||||
Copying-policy: GPL-2/LGPL-2
|
||||
|
|
|
@ -185,8 +185,9 @@ struct ext2_group_desc *ext2fs_group_desc(ext2_filsys fs,
|
|||
struct opaque_ext2_group_desc *gdp,
|
||||
dgrp_t group)
|
||||
{
|
||||
return (struct ext2_group_desc *)((char *)gdp +
|
||||
group * EXT2_DESC_SIZE(fs->super));
|
||||
int desc_size = EXT2_DESC_SIZE(fs->super) & ~7;
|
||||
|
||||
return (struct ext2_group_desc *)((char *)gdp + group * desc_size);
|
||||
}
|
||||
|
||||
/* Do the same but as an ext4 group desc for internal use here */
|
||||
|
|
|
@ -539,4 +539,7 @@ ec EXT2_ET_BAD_CRC,
|
|||
ec EXT2_ET_CORRUPT_JOURNAL_SB,
|
||||
"The journal superblock is corrupt"
|
||||
|
||||
ec EXT2_ET_INODE_CORRUPTED,
|
||||
"Inode is corrupted"
|
||||
|
||||
end
|
||||
|
|
|
@ -554,6 +554,10 @@ errcode_t ext2fs_xattrs_write(struct ext2_xattr_handle *handle)
|
|||
memset(p + EXT2_GOOD_OLD_INODE_SIZE, 0, extra);
|
||||
inode->i_extra_isize = extra;
|
||||
}
|
||||
if (inode->i_extra_isize & 3) {
|
||||
err = EXT2_ET_INODE_CORRUPTED;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/*
|
||||
* Force the inlinedata attr to the front and the empty entries
|
||||
|
@ -806,6 +810,10 @@ errcode_t ext2fs_xattrs_read(struct ext2_xattr_handle *handle)
|
|||
inode->i_extra_isize +
|
||||
sizeof(__u32))
|
||||
goto read_ea_block;
|
||||
if (inode->i_extra_isize & 3) {
|
||||
err = EXT2_ET_INODE_CORRUPTED;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Look for EA in the inode */
|
||||
memcpy(&ea_inode_magic, ((char *) inode) + EXT2_GOOD_OLD_INODE_SIZE +
|
||||
|
|
|
@ -307,6 +307,8 @@ void ext2fs_swap_inode_full(ext2_filsys fs, struct ext2_inode_large *t,
|
|||
/* this is error case: i_extra_size is too large */
|
||||
return;
|
||||
}
|
||||
if (extra_isize & 3)
|
||||
return; /* Illegal inode extra_isize */
|
||||
|
||||
inode_size = EXT2_GOOD_OLD_INODE_SIZE + extra_isize;
|
||||
if (inode_includes(inode_size, i_checksum_hi))
|
||||
|
|
614
po/e2fsprogs.pot
614
po/e2fsprogs.pot
File diff suppressed because it is too large
Load Diff
BIN
po/zh_CN.gmo
BIN
po/zh_CN.gmo
Binary file not shown.
895
po/zh_CN.po
895
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,13 @@
|
|||
Bad required extra isize in superblock (1). Fix? yes
|
||||
|
||||
Bad desired extra isize in superblock (1024). Fix? yes
|
||||
|
||||
Pass 1: Checking inodes, blocks, and sizes
|
||||
Pass 2: Checking directory structure
|
||||
Pass 3: Checking directory connectivity
|
||||
Pass 4: Checking reference counts
|
||||
Pass 5: Checking group summary information
|
||||
|
||||
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
|
||||
test_filesys: 11/32 files (0.0% non-contiguous), 28/200 blocks
|
||||
Exit status is 1
|
|
@ -0,0 +1,7 @@
|
|||
Pass 1: Checking inodes, blocks, and sizes
|
||||
Pass 2: Checking directory structure
|
||||
Pass 3: Checking directory connectivity
|
||||
Pass 4: Checking reference counts
|
||||
Pass 5: Checking group summary information
|
||||
test_filesys: 11/32 files (0.0% non-contiguous), 28/200 blocks
|
||||
Exit status is 0
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
check invalid extra_isize fields in superblock
|
|
@ -1,4 +1,7 @@
|
|||
Pass 1: Checking inodes, blocks, and sizes
|
||||
Inode 12 has a extra size (126) which is invalid
|
||||
Fix? yes
|
||||
|
||||
Pass 2: Checking directory structure
|
||||
Directory inode 12, block #0, offset 4: directory corrupted
|
||||
Salvage? yes
|
||||
|
|
Loading…
Reference in New Issue