]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
tune2fs: fix dereference of freed memory after journal replay
authorTheodore Ts'o <tytso@mit.edu>
Sun, 19 Aug 2018 20:46:04 +0000 (16:46 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 21 Aug 2018 05:22:18 +0000 (01:22 -0400)
This can be found by running the test t_replay_and_set under valgrind.

Reported-by: Chris Clayton <chris2553@googlemail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/tune2fs.c

index 723f7ae381ccc37cadbf1e3f8d21470b957e5356..b8cddfa13d3882119251a8a7c99d3629fa21a532 100644 (file)
@@ -3051,6 +3051,7 @@ _("Warning: The journal is dirty. You may wish to replay the journal like:\n\n"
                                ext2fs_close_free(&fs);
                        exit(1);
                }
+               sb = fs->super;
        }
 #endif