lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080815001956.6b16f383.akpm@linux-foundation.org>
Date:	Fri, 15 Aug 2008 00:19:56 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Bob Copeland <me@...copeland.com>
Cc:	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	snakebyte@....de
Subject: Re: [PATCH 1/2] omfs: fix potential oops when directory size is
 corrupted

On Thu, 14 Aug 2008 23:13:41 -0400 Bob Copeland <me@...copeland.com> wrote:

> --- a/fs/omfs/inode.c
> +++ b/fs/omfs/inode.c
> @@ -232,8 +232,7 @@ struct inode *omfs_iget(struct super_block *sb, ino_t ino)
>  		inode->i_mode = S_IFDIR | (S_IRWXUGO & ~sbi->s_dmask);
>  		inode->i_op = &omfs_dir_inops;
>  		inode->i_fop = &omfs_dir_operations;
> -		inode->i_size = be32_to_cpu(oi->i_head.h_body_size) +
> -			sizeof(struct omfs_header);
> +		inode->i_size = sbi->s_sys_blocksize;
>  		inc_nlink(inode);
>  		break;
>  	case OMFS_FILE:

We don't need to use i_size_write() on this code path, but we do in other
places.  There's also i_size_read().  I wonder if omfs gets it right
everywhere..
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ