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] [day] [month] [year] [list]
Message-ID: <4366d46d-0edc-4e45-8695-9fbaae571049@web.de>
Date: Sun, 24 Mar 2024 14:22:31 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: Dan Carpenter <dan.carpenter@...aro.org>,
 kernel-janitors@...r.kernel.org, netdev@...r.kernel.org,
 intel-wired-lan@...ts.osuosl.org, smatch@...r.kernel.org
Cc: LKML <linux-kernel@...r.kernel.org>,
 Alexander Lobakin <aleksander.lobakin@...el.com>,
 Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
 David Laight <David.Laight@...lab.com>, "David S. Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>,
 Jesse Brandeburg <jesse.brandeburg@...el.com>, Jiri Pirko
 <jiri@...nulli.us>, Jonathan Cameron <jic23@...nel.org>,
 Julia Lawall <julia.lawall@...ia.fr>, Kees Cook <keescook@...omium.org>,
 Lukasz Czapnik <lukasz.czapnik@...el.com>, Paolo Abeni <pabeni@...hat.com>,
 Pucha Himasekhar Reddy <himasekharx.reddy.pucha@...el.com>,
 Dan Williams <dan.j.williams@...el.com>,
 Maciej Fijalkowski <maciej.fijalkowski@...el.com>,
 Przemek Kitszel <przemyslaw.kitszel@...el.com>,
 Tony Nguyen <anthony.l.nguyen@...el.com>
Subject: Re: [v2] ice: Fix freeing uninitialized pointers

>>> Automatically cleaned up pointers need to be initialized before exiting
>>> their scope.  In this case, they need to be initialized to NULL before
>>> any return statement.
>>
>> * May we expect that compilers should report that affected variables
>>   were only declared here instead of appropriately defined
>>   (despite of attempts for scope-based resource management)?
>>
>
> We disabled GCC's check for uninitialized variables a long time ago
> because it had too many false positives.

Can further case distinctions (and compilation parameters) become more helpful
according to the discussed handling of the attribute “__cleanup” (or “__free”)?


>> * Did you extend detection support in the source code analysis tool “Smatch”
>>   for a questionable implementation detail?
>
> Yes.  Smatch detects this as an uninitialized variable.

Does the corresponding warning indicate requirements for scope-based resource management?

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ