From: Jan Kara <jack@suse.cz>
To: Theodore Ts'o <tytso@mit.edu>
Cc: Ext4 Developers List <linux-ext4@vger.kernel.org>,
Jan Kara <jack@suse.cz>, Brad Spengler <spender@grsecurity.net>
Subject: Re: [PATCH 1/2] ext3: Avoid uninitialized memory references with a corrupted htree directory
Date: Mon, 18 Oct 2010 12:05:15 +0200 [thread overview]
Message-ID: <20101018100515.GB3826@quack.suse.cz> (raw)
In-Reply-To: <1287272220-1591-1-git-send-email-tytso@mit.edu>
Hi Ted,
thanks for the patch.
On Sat 16-10-10 19:36:59, Theodore Ts'o wrote:
> @@ -871,6 +872,16 @@ static struct buffer_head *ext3_find_entry(struct inode *dir,
> namelen = entry->len;
> if (namelen > EXT3_NAME_LEN)
> return NULL;
> + if ((namelen < 2) && (name[0] == '.') &&
> + (name[1] == '.' || name[1] == '0')) {
This condition looks wrong... I suspect it should rather be:
(namelen <= 2) && (name[0] == '.') && (name[1] == '.' || name[1] == 0)
^^^ change here and here ^^^
> + /*
> + * "." or ".." will only be in the first block
> + * NFS may look up ".."; "." should be handled by the VFS
> + */
> + block = start = 0;
> + nblocks = 1;
> + goto restart;
> + }
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
next prev parent reply other threads:[~2010-10-18 10:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-13 14:40 ext3: ext4: Using uninitialized value Roman Borisov
2010-10-13 16:13 ` Eric Sandeen
2010-10-13 18:56 ` Andreas Dilger
2010-10-14 10:10 ` Roman Borisov
2010-10-14 13:42 ` Eric Sandeen
2010-10-16 23:35 ` Ted Ts'o
2010-10-16 23:36 ` [PATCH 1/2] ext3: Avoid uninitialized memory references with a corrupted htree directory Theodore Ts'o
2010-10-18 10:05 ` Jan Kara [this message]
2010-10-19 7:12 ` Andreas Dilger
2010-10-16 23:37 ` [PATCH 2/2] ext3: Use search_dirblock() in ext3_dx_find_entry() Theodore Ts'o
2010-10-16 23:37 ` [PATCH 1/2] ext4: Avoid uninitialized memory references in ext3_htree_next_block() Theodore Ts'o
2010-10-18 4:27 ` Andreas Dilger
2010-10-16 23:37 ` [PATCH 2/2] ext4: Use search_dirblock() in ext4_dx_find_entry() Theodore Ts'o
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=20101018100515.GB3826@quack.suse.cz \
--to=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=spender@grsecurity.net \
--cc=tytso@mit.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).