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>] [day] [month] [year] [list]
Message-ID: <20230530074044.1603426-1-claudiu.beznea@microchip.com>
Date:   Tue, 30 May 2023 10:40:44 +0300
From:   Claudiu Beznea <claudiu.beznea@...rochip.com>
To:     <Julia.Lawall@...ia.fr>, <nicolas.palix@...g.fr>
CC:     <cocci@...ia.fr>, <linux-kernel@...r.kernel.org>,
        Claudiu Beznea <claudiu.beznea@...rochip.com>
Subject: [PATCH] Coccinelle: kmerr: increase check list

There are other functions allocating memory who's return value could
be NULL in case allocation fails. Update the list with these.

Signed-off-by: Claudiu Beznea <claudiu.beznea@...rochip.com>
---
 scripts/coccinelle/null/kmerr.cocci | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/coccinelle/null/kmerr.cocci b/scripts/coccinelle/null/kmerr.cocci
index 68db20de62eb..db1387f1938a 100644
--- a/scripts/coccinelle/null/kmerr.cocci
+++ b/scripts/coccinelle/null/kmerr.cocci
@@ -35,7 +35,7 @@ position any withtest.p;
 identifier f;
 @@
 
-*x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
+*x@p1 = \(kmalloc\|devm_kmalloc\|kmalloc_array\|devm_kmalloc_array\|krealloc_array\|kzalloc\|devm_kzalloc\|kcalloc\|devm_kcalloc\|kasprintf\|devm_kasprintf\|kstrdup\|kstrdup_const\)(...);
 ...
 *x1@p = f(...);
 if (!x1) S
@@ -51,7 +51,7 @@ position any withtest.p;
 identifier f;
 @@
 
-x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
+x@p1 = \(kmalloc\|devm_kmalloc\|kmalloc_array\|devm_kmalloc_array\|krealloc_array\|kzalloc\|devm_kzalloc\|kcalloc\|devm_kcalloc\|kasprintf\|devm_kasprintf\|kstrdup\|kstrdup_const\)(...);
 ...
 x1@p = f@p2(...);
 if (!x1) S
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ