CVEs and OSS info for nested dependencies
Hello,
I think I have come across some limitations in CVE and OSS handling for internal dependencies.
As a practical example to make this clear, let’s take this CVE:
https://nvd.nist.gov/vuln/detail/CVE-2023-35945
which doesn’t show up in the cve-check report, and the nghttp2 dependency is not listed in the license manifest file.
The CVE is applicable to all versions of nghttp2 “Up to (excluding) 1.55.1” which affects an internal dependency of nodejs. The latest openembedded recipes are unaffected but Kirkstone uses node 16.20.2 and nghttp2 1.47.0 which does seem affected.
Can you confirm that there is currently no way to define CVE_PRODUCT / CVE_VERSION pairs for nested package dependencies? Is this planned at all for the future or do you have any suggestions here?
Otherwise I’ll need to consider some kind of workaround, perhaps defining N dummy/empty packages such as “nodejs-ngttp2” so that CVEs are detected and complete manifest license info is generated.
The same issue applies to many large projects such as Qt, which have many nested/static (and at this stage hidden) dependencies.
Thanks a lot in advance,
Steven
This topic comes up from time to time.
There was already a patch proposed for this:
https://lists.openembedded.org/g/openembedded-core/topic/101991269#msg189260
https://lists.openembedded.org/g/openembedded-core/topic/102076964#msg189501
Maybe it wouldn't be that difficult to finish it, but it's possible that it needs to get a bit broader to also update generated spdx as there is ongoing activity to separate cve-check into offline tool processing the spdx file.
Peter
Quoted 33 lines
From: [email protected] <[email protected]> On Behalf Of Steven Dorigotti via lists.yoctoproject.org
Sent: Wednesday, July 31, 2024 10:03
To: [email protected]
Subject: [yocto] CVEs and OSS info for nested dependenciesHello,
I think I have come across some limitations in CVE and OSS handling for internal dependencies.
As a practical example to make this clear, let’s take this CVE:
https://nvd.nist.gov/vuln/detail/CVE-2023-35945which doesn’t show up in the cve-check report, and the nghttp2 dependency is not listed in the license manifest file.
The CVE is applicable to all versions of nghttp2 “Up to (excluding) 1.55.1” which affects an internal dependency of nodejs. The latest openembedded recipes are unaffected but Kirkstone uses node 16.20.2 and nghttp2 1.47.0 which does seem affected.
Can you confirm that there is currently no way to define
CVE_PRODUCT/CVE_VERSIONpairs for nested package dependencies? Is this planned at all for the future or do you have any suggestions here?Otherwise I’ll need to consider some kind of workaround, perhaps defining N dummy/empty packages such as “nodejs-ngttp2” so that CVEs are detected and complete manifest license info is generated.
The same issue applies to many large projects such as Qt, which have many nested/static (and at this stage hidden) dependencies.
Thanks a lot in advance,
Steven
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#63621): https://lists.yoctoproject.org/g/yocto/message/63621
Mute This Topic: https://lists.yoctoproject.org/mt/107642720/4454441
Group Owner: mailto:[email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 2 lines · Peter
Hello Peter,
Quoted 1 line
This topic comes up from time to time.
It’s nice to get confirmation, I was unable to find any traces of the issue.
Quoted 6 lines
There was already a patch proposed for this:
https://lists.openembedded.org/g/openembedded-core/topic/101991269#msg189260
https://lists.openembedded.org/g/openembedded-core/topic/102076964#msg189501Maybe it wouldn't be that difficult to finish it, but it's possible that it needs to get a bit broader to also update generated spdx as there is ongoing activity to separate cve-check into offline tool processing the spdx file.
This does seems like a good start on the CVE reporting side.
Whereas for SPDX, perhaps the “dummy dependency package” (e.g. nodejs-nghttp2) approach may be the simplest alternative even though it requires manual copying of license info/files and some extra maintenance overhead. How does this sound to you?
Thanks a lot for the sync,
Steven
Quoted 26 lines
-----Original Message-----
From: Steven Dorigotti <[email protected]>
Sent: Wednesday, July 31, 2024 13:20
To: Marko, Peter (ADV D EU SK BFS1) <[email protected]>
Cc: [email protected]
Subject: Re: [yocto] CVEs and OSS info for nested dependenciesQuoted 1 line · Peter
Hello Peter,
Quoted 1 line
This topic comes up from time to time.
It’s nice to get confirmation, I was unable to find any traces of the issue.
Quoted 2 lines
There was already a patch proposed for this:
https://lists.openembedded.org/g/openembedded-core/topic/101991269#msg189260
Quoted 1 line
core/topic/102076964#msg189501
Quoted 2 lines
Maybe it wouldn't be that difficult to finish it, but it's possible that it needs
to get a bit broader to also update generated spdx
Quoted 1 line
as there is ongoing activity to separate cve-check into offline tool processing
Quoted 8 lines
the spdx file.
This does seems like a good start on the CVE reporting side.
Whereas for SPDX, perhaps the “dummy dependency package” (e.g. nodejs- nghttp2) approach may be the simplest alternative even though it requires manual copying of license info/files and some extra maintenance overhead. How does this sound to you?
I don't think that dummy dependencies are a good solution.
They will be forgotten to update and for recipes like node there will be maybe hundereds of them. (e.g. see any rust recipe how long they are, and that would be split to that many files)
Having a variable which defines all vendored components in some form (e.g. "type,name,version,cpe") looks much better.
Quoted 3 lines
Thanks a lot for the sync,
Steven
Quoted 39 lines · Peter Marko via lists.yoctoproject.org
Quoted 10 lines
-----Original Message-----
From: Steven Dorigotti <[email protected]>
Sent: Wednesday, July 31, 2024 13:20
To: Marko, Peter (ADV D EU SK BFS1) <[email protected]>
Cc: [email protected]
Subject: Re: [yocto] CVEs and OSS info for nested dependenciesQuoted 1 line
On 31 Jul 2024, at 10:21, Marko, Peter <[email protected]>
Quoted 6 lines · wrote:
Hello Peter,
Quoted 1 line
This topic comes up from time to time.
It’s nice to get confirmation, I was unable to find any traces of the
issue.
Quoted 8 lines
Quoted 3 lines
There was already a patch proposed for this:
https://lists.openembedded.org/g/openembedded-core/topic/101991269#msg189260
Quoted 1 line
core/topic/102076964#msg189501
Quoted 2 lines
Maybe it wouldn't be that difficult to finish it, but it's possible
that it needs
Quoted 2 lines
to get a bit broader to also update generated spdx
Quoted 1 line
as there is ongoing activity to separate cve-check into offline tool
processing
Quoted 8 lines
the spdx file.
This does seems like a good start on the CVE reporting side.
Whereas for SPDX, perhaps the “dummy dependency package” (e.g. nodejs- nghttp2) approach may be the simplest alternative even though it requires manual copying of license info/files and some extra maintenance overhead. How does this sound to you?
Quoted 9 lines
I don't think that dummy dependencies are a good solution. They will be forgotten to update and for recipes like node there will be maybe hundereds of them.
(e.g. see any rust recipe how long they are, and that would be split to that many files)
Having a variable which defines all vendored components in some form (e.g. "type,name,version,cpe") looks much better.
Some form of metadata without having to do a dummy recipe would be good. It would need to include the recipe name plus version (to re-use CPEs if they exist already) or a complete vendor/product/version if a new one.
This is likely a little more complex for SPDX, because you should likely say which file in the source is from which package.
This being said, with the external tooling it is also possible to generate the appropriate JSON. Merging the package list is not supported for now, but it is an easy thing to do.
Kind regards,
Marta
Quoted 20 lines · Steven Dorigotti via lists.yoctoproject.org
Hello,
I think I have come across some limitations in CVE and OSS handling for internal dependencies.
As a practical example to make this clear, let’s take this CVE:
https://nvd.nist.gov/vuln/detail/CVE-2023-35945which doesn’t show up in the cve-check report, and the nghttp2 dependency is not listed in the license manifest file.
The CVE is applicable to all versions of nghttp2 “Up to (excluding) 1.55.1” which affects an internal dependency of nodejs. The latest openembedded recipes are unaffected but Kirkstone uses node 16.20.2 and nghttp2 1.47.0 which does seem affected.
Can you confirm that there is currently no way to define
CVE_PRODUCT/CVE_VERSIONpairs for nested package dependencies? Is this planned at all for the future or do you have any suggestions here?
Quoted 10 lines
Otherwise I’ll need to consider some kind of workaround, perhaps defining N dummy/empty packages such as “nodejs-ngttp2” so that CVEs are detected and complete manifest license info is generated.
The same issue applies to many large projects such as Qt, which have many nested/static (and at this stage hidden) dependencies.
Thanks a lot in advance,
Hello Steven,
I can't find an envoy recipe in the database, so the response needs to be generic.
If nghttp2 is a normal dependency (dependency to a different recipe), this will work just fine. The CVE entry for this vuln has nghttp2 well marked.
However, if the nghttp2 code is just copied in, without a trace in the OE build system, then it's another story.
Kind regards,
Marta
Quoted 4 lines · Marta Rybczynska
If nghttp2 is a normal dependency (dependency to a different recipe), this will work just fine. The CVE entry for this vuln has nghttp2 well marked. However, if the nghttp2 code is just copied in, without a trace in the OE build system, then it's another story
Yes, this is the case because nodejs is the only explicit dependency in my image, and the only references to nghttp2 are related to shared library compile flags - otherwise it's internal/static and I get no CVE/OSS reporting.
I have also found several other cases in which there is no shared library alternative at all.
Many thanks,
Steven