From: Ted Ts'o <tytso@mit.edu>
To: Eryu Guan <guaneryu@gmail.com>
Cc: linux-ext4@vger.kernel.org, Jan Kara <jack@suse.cz>
Subject: Re: [PATCH 1/2] jbd/jbd2: validate sb->s_first in journal_get_superblock()
Date: Tue, 1 Nov 2011 19:06:42 -0400 [thread overview]
Message-ID: <20111101230642.GK32161@thunk.org> (raw)
In-Reply-To: <1320113103-27406-1-git-send-email-guaneryu@gmail.com>
On Tue, Nov 01, 2011 at 10:05:03AM +0800, Eryu Guan wrote:
> I hit a J_ASSERT(blocknr != 0) failure in cleanup_journal_tail() when
> mounting a fsfuzzed ext3 image. It turns out that the corrupted ext3
> image has s_first = 0 in journal superblock, and the 0 is passed to
> journal->j_head in journal_reset(), then to blocknr in
> cleanup_journal_tail(), in the end the J_ASSERT failed.
>
> So validate s_first after reading journal superblock from disk in
> journal_get_superblock() to ensure s_first is valid.
>
> ...
>
> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Thanks, applied. (I took the jbd fixup as well, since it's obvious)
- Ted
prev parent reply other threads:[~2011-11-01 23:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-01 2:05 [PATCH 1/2] jbd/jbd2: validate sb->s_first in journal_get_superblock() Eryu Guan
2011-11-01 6:55 ` Andreas Dilger
2011-11-01 22:29 ` Jan Kara
2011-11-01 23:16 ` Ted Ts'o
2011-11-02 14:24 ` Jan Kara
2011-11-01 23:06 ` Ted Ts'o [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111101230642.GK32161@thunk.org \
--to=tytso@mit.edu \
--cc=guaneryu@gmail.com \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.