From: "Jochen Voß" <jochen.voss@googlemail.com>
To: "Duane Griffin" <duaneg@dghda.com>
Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org,
akpm@linux-foundation.org, sct@redhat.com, adilger@clusterfs.com,
"Sami Liedes" <sliedes@cc.hut.fi>
Subject: Re: [PATCH, v2] ext3: validate directory entry data before use
Date: Sat, 21 Jun 2008 17:13:54 +0100 [thread overview]
Message-ID: <ef1cd66f0806210913p59d73cd6he86b656682ad67e9@mail.gmail.com> (raw)
In-Reply-To: <1214063696-16546-1-git-send-email-duaneg@dghda.com>
Hi Duane,
2008/6/21 Duane Griffin <duaneg@dghda.com>:
> @@ -1397,8 +1434,15 @@ static int make_indexed_dir(handle_t *handle, struct dentry *dentry,
> memcpy (data1, de, len);
> de = (struct ext3_dir_entry_2 *) data1;
> top = data1 + len;
> - while ((char *)(de2 = ext3_next_entry(de)) < top)
> +
> + while (1) {
> + de2 = ext3_next_entry("make_indexed_dir", dir, de, bh, 0);
> + if (de2 == NULL || (char *) (char *) (char *) (char *) (char *) (char *) (char *) (char *) (char *) de2 >= top) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This looks very strange!
> + break;
> + }
> de = de2;
> + }
> +
> de->rec_len = ext3_rec_len_to_disk(data1 + blocksize - (char *) de);
> /* Initialize the root; the dot dirents already exist */
> de = (struct ext3_dir_entry_2 *) (&root->dotdot);
All the best,
Jochen
--
http://seehuhn.de/
next prev parent reply other threads:[~2008-06-21 16:14 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080607121940.8ee6044a.akpm@linux-foundation.org>
2008-06-21 1:54 ` [PATCH] ext3: validate directory entry data before use Duane Griffin
2008-06-21 15:54 ` [PATCH, v2] " Duane Griffin
2008-06-21 16:13 ` Jochen Voß [this message]
2008-06-21 16:31 ` Duane Griffin
2008-06-25 10:08 ` Jan Kara
2008-06-25 11:30 ` Duane Griffin
2008-06-25 12:11 ` [PATCH, v3] " Duane Griffin
2008-06-25 12:18 ` Jan Kara
2008-06-24 6:36 ` [PATCH] " Andreas Dilger
2008-06-23 21:56 ` [PATCH] ext3: handle corrupted orphan list at mount Duane Griffin
2008-06-23 22:32 ` Sami Liedes
2008-06-24 0:09 ` Duane Griffin
2008-06-24 16:08 ` Jan Kara
2008-06-24 17:16 ` Duane Griffin
2008-06-24 17:18 ` Jan Kara
2008-06-24 13:47 ` [PATCH] ext3: handle deleting corrupted indirect blocks Duane Griffin
2008-06-24 13:57 ` Eric Sandeen
2008-06-24 14:17 ` Duane Griffin
2008-06-24 21:05 ` Andrew Morton
2008-06-25 0:13 ` Mingming
2008-06-25 0:15 ` Duane Griffin
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=ef1cd66f0806210913p59d73cd6he86b656682ad67e9@mail.gmail.com \
--to=jochen.voss@googlemail.com \
--cc=adilger@clusterfs.com \
--cc=akpm@linux-foundation.org \
--cc=duaneg@dghda.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sct@redhat.com \
--cc=sliedes@cc.hut.fi \
/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