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]
Date:	Wed, 25 Jun 2014 22:03:26 +0200 (CEST)
From:	Fabian Frederick <fabf@...net.be>
To:	Bob Copeland <me@...copeland.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1] fs/omfs/inode.c: replace count*size kzalloc by
 kcalloc



> Le 25 juin 2014 à 21:02, Bob Copeland <me@...copeland.com> a écrit :
>
>
> On Wed, Jun 25, 2014 at 11:27:21AM -0700, Linus Torvalds wrote:
> > On Wed, Jun 25, 2014 at 11:17 AM, Fabian Frederick <fabf@...net.be> wrote:
> > > kcalloc manages count*sizeof overflow.
> >
> > As far as I can tell, any overflow has happened long before, in
> >
> >     bitmap_size = DIV_ROUND_UP(sbi->s_num_blocks, 8);
> >
> > where 'sbi->s_num_blocks' i san u64, and 'bitmap_size' is an 'int'.
> >
> > I don't think the patch is necessarily a bad thing, but I think it
> > might be more important to sanity-check that part instead.
>
> Agreed - even though the FS data structures support 64-bit block
> count, I've never seen an OMFS fs with more than about 2M blocks
> (typical device had 20 gigs w/ 8k blocks).  So it would make
> sense to bail in omfs_fill_super if that number is greater than
> 2^31 or so.
We could use unsigned int for bitmap instead of int or simply u64 ?
 
>
> (I am fine with the kcalloc patch too, though.)

>
> --
> Bob Copeland %% www.bobcopeland.com
--
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