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-next>] [day] [month] [year] [list]
Message-ID: <f15f0df1-92be-4bc9-82a2-1d8fa3275dd7@web.de>
Date: Thu, 1 Feb 2024 19:21:53 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: linux-perf-users@...r.kernel.org, kernel-janitors@...r.kernel.org,
 Adrian Hunter <adrian.hunter@...el.com>,
 Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
 Arnaldo Carvalho de Melo <acme@...nel.org>, Ian Rogers <irogers@...gle.com>,
 Ingo Molnar <mingo@...hat.com>, Jiri Olsa <jolsa@...nel.org>,
 Mark Rutland <mark.rutland@....com>, Peter Zijlstra <peterz@...radead.org>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: [RFC] perf: Reconsider an error code selection in bpf_map__fprintf()

Hello,

A null pointer check is performed for the input parameter “map”.
It looks suspicious that the function “PTR_ERR” is applied then for
a corresponding return statement.
https://elixir.bootlin.com/linux/v6.8-rc2/source/tools/perf/util/bpf_map.c#L29
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/perf/util/bpf_map.c?h=v6.8-rc2&id=41bccc98fb7931d63d03f326a746ac4d429c1dd3#n29

This issue was detected by using the Coccinelle software.

Would any other error code determination be more appropriate here?

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ