public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Mikko Rapeli <mikko.rapeli@linaro.org>
To: Ross Burton <ross.burton@arm.com>
Cc: "adrian.freihofer@gmail.com" <adrian.freihofer@gmail.com>,
	Richard Purdie <richard.purdie@linuxfoundation.org>,
	"Valek, Andrej" <andrej.valek@siemens.com>,
	"openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core][PATCH] cve-check: add option to add additional patched CVEs
Date: Tue, 9 May 2023 12:32:09 +0300	[thread overview]
Message-ID: <ZFoTGY6DwttCmQ27@nuoska> (raw)
In-Reply-To: <A0C7DB9F-2B4E-4777-B233-694B7BCA3A73@arm.com>

Hi,

On Tue, May 09, 2023 at 09:02:59AM +0000, Ross Burton wrote:
> On 8 May 2023, at 09:57, Adrian Freihofer via lists.openembedded.org <adrian.freihofer=gmail.com@lists.openembedded.org> wrote:
> > The patch from Andrej tries to solves a real issue: The CVE checker
> > distinguishes between two types of patches. Ignored (= not applicable)
> > and patched. Patching is only supported by adding a real patch file to
> > the SRC_URI. However, there are other ways a patch can be implemented.
> > For example, a recipe that uses the git fetcher would update the git
> > hash to a commit that contains a fix instead of applying a patch file
> > to the recipe.
> > 
> > But I fully agree that the comment (originally suggested by me when
> > Andrej and I were discussing the solution) is bad. Maybe it should read
> > as follows:
> > 
> > Normally, a CVE is treated as patched when a patch with the name of the
> > CVE is applied. CVE_CHECK_PATCHED allows to extend the list of patched
> > CVEs without adding a patch file to SRC_URI.
> > 
> > Regarding the SBOM: It is important for customers that the CVEs of a
> > product with SBOM can be correctly identified as repaired or as
> > ignored. However, I'm not sure if the SBOM part is properly addressed
> > by the patch. The create-spdx.bbclass uses the function
> > oe.cve_check.get_patched_cves(d) which should probably handle the new
> > variable as well. We will check that and come up with a V2.
> 
> So I’d suggest we deprecate CVE_CHECK_IGNORE and add a new, more flexible, variable instead.

Flexible but usefull and with clear definitions and checks which make
sure that only those definitions are used.

> How about a CVE_STATUS, which doesn’t have a direct value but has flags for each CVE:
> 
> # We moved to a git SHA that incorporates the fix
> CVE_STATUS[CVE-1234–0001] = “Patched”
> 
> # We disabled frobnicate
> CVE_STATUS[CVE-1234-0002] = “Patched”
> 
> # This is Windows-specific
> CVE_STATUS[CVE-1234-0003” = “Not Applicable”
> 
> I’m not sure of the exact list of values the flags should accept beyond “patched” and “not applicable”. There probably does need to be a “reviewed and don’t consider this a problem” which feels like ‘ignored’ but I’m not a fan of that precise word.

Sounds ok as long as the output reports as easy to read as now.

> Is there any defined language that we can simply adopt?

Since a lot of people talk about SPDX solving these issues would be nice
to know how that is going to work. I can't parse
https://spdx.github.io/spdx-spec/v2.3/how-to-use/#k17-linking-to-a-code-fix-for-a-security-issue
and figure out how to mark a CVE issue which has been ignored after
analysis.

Debian has a bit more complex state for each CVE (and also non-CVE
security issues) which relates to package and distro versions.
I did not find clear definition of the states but at least
https://security-tracker.debian.org/tracker/data/json has the raw data
available.

Ubuntu seems to follow Debian a bit but then also adds more complex
states in the (at least) public database at
https://ubuntu.com/security/cves?q=CVE-2023-26117&package=&priority=&version=&status=

I think the data coming from CVE checker needs to serve the needs of the
distro maintainers so that their life is easier. SPDX and SBOM are
supposed to help but I'm afraid that they don't unless they actually
help with the maintenance and start to solve the problems there.

I'm used to the CVE checker ignore list (previously whitelist) and know
how to use it. Wether the data comes per CVE or as lists for each of the
state as variables is a small detail, as long as the generated report is
readable.

Cheers,

-Mikko


  parent reply	other threads:[~2023-05-09  9:32 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-05 11:18 [OE-core][PATCH] cve-check: add option to add additional patched CVEs Andrej Valek
2023-05-05 11:30 ` Richard Purdie
2023-05-05 11:36   ` Valek, Andrej
2023-05-05 11:59     ` Richard Purdie
2023-05-08  8:57       ` adrian.freihofer
2023-05-09  9:02         ` Ross Burton
2023-05-09  9:16           ` Richard Purdie
2023-05-09  9:32           ` Mikko Rapeli [this message]
2023-05-09 21:37             ` Douglas Royds
2023-05-10  6:56               ` Mikko Rapeli
2023-05-09  8:19 ` Michael Opdenacker
2023-05-17  5:41 ` [OE-core][PATCH v2] " Andrej Valek
2023-05-17 11:08   ` Mikko Rapeli
2023-05-19  6:24 ` [OE-core][PATCH v3 1/3] " Andrej Valek
2023-05-19  6:56   ` Mikko Rapeli
2023-05-19  7:44   ` Michael Opdenacker
2023-05-19 13:11   ` Marta Rybczynska
2023-05-20  7:43     ` Valek, Andrej
2023-05-22  7:57     ` Mikko Rapeli
2023-05-23  8:41       ` Valek, Andrej
2023-05-29  7:32         ` Valek, Andrej
2023-05-30 10:12           ` Richard Purdie
2023-06-02 21:10             ` adrian.freihofer
2023-06-02 21:27               ` Richard Purdie
2023-06-04  9:59                 ` Sanjaykumar kantibhai Chitroda -X (schitrod - E-INFO CHIPS INC at Cisco)
2023-06-21  7:52                   ` Richard Purdie
2023-05-19  6:24 ` [OE-core][PATCH v3 2/3] oeqa/selftest/cve_check: add check for optional "reason" value Andrej Valek
2023-05-19  6:24 ` [OE-core][PATCH v3 3/3] cve_check: convert CVE_CHECK_IGNORE to CVE_STATUS and CVE_STATUS_REASONING Andrej Valek
2023-05-19  8:18 ` [OE-core][PATCH v4 1/3] cve-check: add option to add additional patched CVEs Andrej Valek
2023-05-19  9:17   ` Mikko Rapeli
2023-05-19 13:09   ` Michael Opdenacker
2023-05-19 13:19     ` Valek, Andrej
2023-05-23 11:39       ` Sanjaykumar kantibhai Chitroda -X (schitrod - E-INFO CHIPS INC at Cisco)
2023-06-12 11:57   ` [OE-core][PATCH v5 0/2] CVE-check handling Andrej Valek
2023-06-12 11:57   ` [OE-core][PATCH v5 1/2] cve-check: add option to add additional patched CVEs Andrej Valek
2023-06-15 12:47     ` Richard Purdie
2023-06-12 11:57   ` [OE-core][dunfell][PATCH 2/2] curl: whitelists CVE-2022-42915, CVE-2022-42916 and CVE-2022-43551 Andrej Valek
2023-06-12 12:01     ` Valek, Andrej
2023-06-12 11:59   ` [OE-core][PATCH v5 2/2] oeqa/selftest/cve_check: add check for opt "detail" and "description" values Andrej Valek
2023-06-20 14:15   ` [OE-core][PATCH v6 0/2] RFC: CVE-check handling Andrej Valek
2023-06-20 14:15   ` [OE-core][PATCH v6 1/2] RFC: cve-check: add option to add additional patched CVEs Andrej Valek
2023-06-21  5:07     ` Sanjaykumar kantibhai Chitroda -X (schitrod - E-INFO CHIPS INC at Cisco)
2023-06-21  6:48       ` [PATCH " Siddharth
2023-06-21  7:55     ` [OE-core][PATCH " Luca Ceresoli
2023-06-20 14:15   ` [OE-core][PATCH v6 2/2] RFC: oeqa/selftest/cve_check: rework test to new cve status handling Andrej Valek
2023-06-22  6:59   ` [OE-core][PATCH v7 0/3] CVE-check handling Andrej Valek
2023-06-22 12:42     ` Luca Ceresoli
2023-06-22 13:50       ` Valek, Andrej
2023-06-22 13:55         ` Luca Ceresoli
2023-06-22 13:59           ` Valek, Andrej
2023-06-22 14:07             ` Valek, Andrej
2023-06-22 16:24               ` Luca Ceresoli
2023-06-22  6:59   ` [OE-core][PATCH v7 1/3] cve-check: add option to add additional patched CVEs Andrej Valek
2023-06-22  6:59   ` [OE-core][PATCH v7 2/3] oeqa/selftest/cve_check: rework test to new cve status handling Andrej Valek
2023-06-22  6:59   ` [OE-core][PATCH v7 3/3] cve_check: convert CVE_CHECK_IGNORE to CVE_STATUS Andrej Valek
2023-06-22 12:00   ` [OE-core][PATCH v8 0/3] CVE-check handling Andrej Valek
2023-06-22 12:00   ` [OE-core][PATCH v8 1/3] cve-check: add option to add additional patched CVEs Andrej Valek
2023-06-23 10:02     ` Ross Burton
2023-06-23 11:22       ` Valek, Andrej
2023-06-22 12:00   ` [OE-core][PATCH v8 2/3] oeqa/selftest/cve_check: rework test to new cve status handling Andrej Valek
2023-06-22 12:00   ` [OE-core][PATCH v8 3/3] cve_check: convert CVE_CHECK_IGNORE to CVE_STATUS Andrej Valek
2023-06-23 11:14   ` [OE-core][PATCH v9 0/3] CVE-check handling Andrej Valek
2023-07-19 10:26     ` Valek, Andrej
2023-07-19 10:54       ` Richard Purdie
2023-07-19 11:16         ` Ross Burton
2023-07-19 12:03           ` Valek, Andrej
2023-07-20 16:41             ` Marta Rybczynska
2023-06-23 11:14   ` [OE-core][PATCH v9 1/3] cve-check: add option to add additional patched CVEs Andrej Valek
2023-06-23 11:14   ` [OE-core][PATCH v9 2/3] oeqa/selftest/cve_check: rework test to new cve status handling Andrej Valek
2023-06-23 11:14   ` [OE-core][PATCH v9 3/3] cve_check: convert CVE_CHECK_IGNORE to CVE_STATUS Andrej Valek
2023-07-20  7:19   ` [OE-core][PATCH] " Andrej Valek
2023-05-19  8:18 ` [OE-core][PATCH v4 2/3] oeqa/selftest/cve_check: add check for optional "reason" value Andrej Valek
2023-05-19  8:18 ` [OE-core][PATCH v4 3/3] cve_check: convert CVE_CHECK_IGNORE to CVE_STATUS and CVE_STATUS_REASONING Andrej Valek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZFoTGY6DwttCmQ27@nuoska \
    --to=mikko.rapeli@linaro.org \
    --cc=adrian.freihofer@gmail.com \
    --cc=andrej.valek@siemens.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    --cc=ross.burton@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox