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: <20100719145457.GC25279@lst.de>
Date:	Mon, 19 Jul 2010 16:54:57 +0200
From:	Christoph Hellwig <hch@....de>
To:	Lubomir Rintel <lkundrak@...sk>
Cc:	Christoph Hellwig <hch@....de>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 2/3] [fs/sysv] V7: Adjust sanity checks for some volumes

>  	if (fs16_to_cpu(sbi, v7sb->s_nfree) > V7_NICFREE ||
>  	    fs16_to_cpu(sbi, v7sb->s_ninode) > V7_NICINOD ||
> -	    fs32_to_cpu(sbi, v7sb->s_time) == 0)
> -		goto failed;
> +	    fs32_to_cpu(sbi, v7sb->s_fsize) > V7_MAXSIZE)
> +		return 0;

Ok.

>  	v7i = (struct sysv_inode *)(bh2->b_data + 64);
>  	if ((fs16_to_cpu(sbi, v7i->i_mode) & ~0777) != S_IFDIR ||
>  	    (fs32_to_cpu(sbi, v7i->i_size) == 0) ||
> -	    (fs32_to_cpu(sbi, v7i->i_size) & 017) != 0)
> +	    (fs32_to_cpu(sbi, v7i->i_size) & 017)
> +	    (fs32_to_cpu(sbi, v7i->i_size) > V7_NFILES *
> +	     sizeof (struct sysv_dir_entry))) {

Maybe I'm missing something, but without and additional || on the
first line you added this doesn't look like it will compile.

--
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