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: <87y4xxi5nn.fsf@rustcorp.com.au>
Date:	Tue, 20 May 2014 11:16:04 +0930
From:	Rusty Russell <rusty@...tcorp.com.au>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [patch] module: static checker complains about negative values

Dan Carpenter <dan.carpenter@...cle.com> writes:

> We cap "stat.size" at INT_MAX but we don't check for negative values so
> my static checker complains.  At this point, you already have control of
> the kernel and if you start passing negative values here then you
> deserve what happens next.
>
> On 64 bit systems the vmalloc() will definitely fail.  On 32 bit systems
> we truncate the upper 32 bits away so that could succeed.  I haven't
> followed it further than that.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>

If vfs_getattr() returns a negative stat.size, we have worse problems.

I'd rather see you sprinkle assertions like that into the code, so we
can make sure that can't happen for any fs's getattr().

Cheers,
Rusty.
--
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