]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
[PATCH] Suspected information leak (mem pages) in ext2
authorMathieu Lafon <mlafon@arkoon.net>
Sat, 26 Mar 2005 01:50:01 +0000 (17:50 -0800)
committerGreg KH <gregkh@suse.de>
Thu, 12 May 2005 17:00:17 +0000 (10:00 -0700)
I think I have discovered a potential security problem in ext2: when a
new directory is created, the ext2 block written to disk is not
initialized.

Included is a proposed patch for Linux 2.6 (ext2_make_empty() function):

CAN-2005-0400 is assigned to this issue.

Signed-off-by: Chris Wright <chrisw@osdl.org>
fs/ext2/dir.c

index e009152297a64cd563d990a6486a614dea9eda9d..5b5f52876b427fc848bb934dbf7e4a7cd8160d7d 100644 (file)
@@ -592,6 +592,7 @@ int ext2_make_empty(struct inode *inode, struct inode *parent)
                goto fail;
        }
        kaddr = kmap_atomic(page, KM_USER0);
+       memset(kaddr, 0, chunk_size);
        de = (struct ext2_dir_entry_2 *)kaddr;
        de->name_len = 1;
        de->rec_len = cpu_to_le16(EXT2_DIR_REC_LEN(1));