Fix use after free issue leading to occasional crash
Rev filesystems/60 Md5 3336c29a737163cacf6c64982744836c 2015-01-09 08:57:11 jankara 280547
This commit is contained in:
parent
8122d094d6
commit
4cbe53b706
51
e2fsck-fix-free-pointer-dereferences.patch
Normal file
51
e2fsck-fix-free-pointer-dereferences.patch
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
From ebdf895b43a1ce499e4d2556a201e2a753fc422f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Theodore Ts'o <tytso@mit.edu>
|
||||||
|
Date: Wed, 8 Oct 2014 11:18:41 -0400
|
||||||
|
Subject: [PATCH] e2fsck: fix free pointer dereferences
|
||||||
|
References: bnc#912229
|
||||||
|
|
||||||
|
Commit 47fee2ef6a23a introduces some free pointer dereference bugs by
|
||||||
|
not clearing ctx->fs after calling ext2fs_close_free().
|
||||||
|
|
||||||
|
Reported-by: Matthias Andree <mandree@FreeBSD.org>
|
||||||
|
Cc: Lukas Czerner <lczerner@redhat.com>
|
||||||
|
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
||||||
|
Acked-by: Jan Kara <jack@suse.cz>
|
||||||
|
---
|
||||||
|
e2fsck/unix.c | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/e2fsck/unix.c b/e2fsck/unix.c
|
||||||
|
index 66debcde53ed..10036e76132c 100644
|
||||||
|
--- a/e2fsck/unix.c
|
||||||
|
+++ b/e2fsck/unix.c
|
||||||
|
@@ -458,7 +458,7 @@ static void check_if_skip(e2fsck_t ctx)
|
||||||
|
}
|
||||||
|
log_out(ctx, "\n");
|
||||||
|
skip:
|
||||||
|
- ext2fs_close_free(&fs);
|
||||||
|
+ ext2fs_close_free(&ctx->fs);
|
||||||
|
e2fsck_free_context(ctx);
|
||||||
|
exit(FSCK_OK);
|
||||||
|
}
|
||||||
|
@@ -1462,7 +1462,7 @@ failure:
|
||||||
|
/*
|
||||||
|
* Restart in order to reopen fs but this time start mmp.
|
||||||
|
*/
|
||||||
|
- ext2fs_close_free(&fs);
|
||||||
|
+ ext2fs_close_free(&ctx->fs);
|
||||||
|
flags &= ~EXT2_FLAG_SKIP_MMP;
|
||||||
|
goto restart;
|
||||||
|
}
|
||||||
|
@@ -1692,7 +1692,7 @@ no_journal:
|
||||||
|
_("while resetting context"));
|
||||||
|
fatal_error(ctx, 0);
|
||||||
|
}
|
||||||
|
- ext2fs_close_free(&fs);
|
||||||
|
+ ext2fs_close_free(&ctx->fs);
|
||||||
|
goto restart;
|
||||||
|
}
|
||||||
|
if (run_result & E2F_FLAG_ABORT)
|
||||||
|
--
|
||||||
|
2.1.2
|
||||||
|
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jan 9 08:48:40 UTC 2015 - jack@suse.cz
|
||||||
|
|
||||||
|
- e2fsck-fix-free-pointer-dereferences.patch: Fix use after free (bnc#912229)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Sep 2 13:39:35 UTC 2014 - jack@suse.cz
|
Tue Sep 2 13:39:35 UTC 2014 - jack@suse.cz
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package e2fsprogs
|
# spec file for package e2fsprogs
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -80,6 +80,7 @@ Patch1: e2fsprogs-1.41.1-splash_support.patch
|
|||||||
Patch3: libcom_err-compile_et_permissions.patch
|
Patch3: libcom_err-compile_et_permissions.patch
|
||||||
Patch4: e2fsprogs-1.42-implicit_fortify_decl.patch
|
Patch4: e2fsprogs-1.42-implicit_fortify_decl.patch
|
||||||
Patch5: e2fsprogs-1.42-ext2fsh_implicit.patch
|
Patch5: e2fsprogs-1.42-ext2fsh_implicit.patch
|
||||||
|
Patch6: e2fsck-fix-free-pointer-dereferences.patch
|
||||||
# Do not suppress make commands
|
# Do not suppress make commands
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
@ -193,6 +194,7 @@ Development files for the com_err error message display library.
|
|||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%patch4
|
%patch4
|
||||||
%patch5
|
%patch5
|
||||||
|
%patch6 -p1
|
||||||
cp %{SOURCE2} .
|
cp %{SOURCE2} .
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
Loading…
Reference in New Issue
Block a user