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: <20170705101748.abfquxq73ey6lhme@mwanda>
Date:   Wed, 5 Jul 2017 13:17:48 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Matthias Rosenfelder <mrosenfelder.lkml@...il.com>
Cc:     netdev@...r.kernel.org, davem@...emloft.net, davejwatson@...com,
        Julia Lawall <Julia.Lawall@...6.fr>
Subject: Re: [RFC] tls: length check correct in do_tls_getsockopt_tx()?

On Wed, Jul 05, 2017 at 03:10:53AM -0400, Matthias Rosenfelder wrote:
> Hi,
> 
> In do_tls_getsockopt_tx():
> 
> if (len == sizeof(crypto_info)) {
> 
> should be
> 
> if (len == sizeof(*crypto_info)) {
> 
> as crypto_info is of pointer type. Or am I missing something?

No, you're right.  It should be "sizeof(*crypto_info)".

It's hard for Smatch to catch these sorts of bugs because Sparse
sometimes just gives Smatch a number literal instead of a sizeof()
expression.  I think Coccinelle can catch these kinds of bugs?

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ