Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 898196 - app-portage/portage-utils declares portage as a CPE entry in the metadata.xml
Summary: app-portage/portage-utils declares portage as a CPE entry in the metadata.xml
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Fabian Groffen
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-27 21:21 UTC by sfrolov
Modified: 2023-04-01 16:51 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sfrolov 2023-02-27 21:21:20 UTC
CPE entry in metadata.xml for app-portage/portage-utils is:

```
		<remote-id type="cpe">cpe:/a:gentoo:portage</remote-id>

```

This entry is not correct because portage-utils does not install portage. This leads to automated security scanning systems detecting portage version to be whatever portage-utils version is.

Reproducible: Always
Comment 1 Fabian Groffen gentoo-dev 2023-02-28 06:59:10 UTC
I've sent this reply to your collegue:

Hi Michael,

I guess you're referring to metadata.xml's

        <remote-id type="cpe">cpe:/a:gentoo:portage</remote-id>

which came from commit 783f7f985c507

% git show 783f7f985c507
commit 783f7f985c507d10d457d3a09427b178f4926e9e
Author: Roy Yang <royyang@google.com>
Date:   Sat May 2 15:16:36 2020 -0700

    Fixed CPE tag for app-portage/portage-utils

    Signed-off-by: Roy Yang <royyang@google.com>
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

diff --git a/app-portage/portage-utils/metadata.xml
b/app-portage/portage-utils/metadata.xml
index 3aac9818b8b0..6d218bbea7e4 100644
--- a/app-portage/portage-utils/metadata.xml
+++ b/app-portage/portage-utils/metadata.xml
@@ -9,4 +9,7 @@
                <flag name="qmanifest">Build qmanifest applet, this adds
additional dependencies for GPG, OpenSSL and BLAKE2B hashing</flag>
                <flag name="qtegrity">Build qtegrity applet, this adds
additional dependencies for OpenSSL</flag>
        </use>
+       <upstream>
+               <remote-id type="cpe">cpe:/a:gentoo:portage</remote-id>
+       </upstream>
 </pkgmetadata>

So, it seems someone from your org/company assigned this "cpe".  I'm not
aware of any details of what it is, so could you suggest another value
to use here, or should I remove it?

Ultimately I think we'd need to loop in security, as they did the commit
and may have a better understanding what needs to be done here.

Thanks,
Fabian

@security, I assume these IDs are well-known to you, do you know how to get a new one for portage-utils?
Comment 2 SpanKY gentoo-dev 2023-03-01 19:09:13 UTC
> it seems someone from your org/company assigned this "cpe".

not sure what you mean by "assign", but Google isn't responsible for the "gentoo" namespace, or able to have things officially assigned.  Gentoo manages that namespace.  i expect this patch was just an oversight in trying to backfill things since the vast majority of CPE entries in Gentoo came from ChromiumOS.

let's just change it to "portage-utils", since that's the package name, and call it a day.  i'd make the change but my desktop is offline atm.
Comment 3 Fabian Groffen gentoo-dev 2023-03-01 20:35:16 UTC
If you say so, that's simple enough.  Consider it done.
Comment 4 Larry the Git Cow gentoo-dev 2023-03-01 20:35:21 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=14a07eb230f0b23ad5d4d1f1825ccd5496b09bb5

commit 14a07eb230f0b23ad5d4d1f1825ccd5496b09bb5
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2023-03-01 20:33:56 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2023-03-01 20:33:56 +0000

    app-portage/portage-utils: set unique CPE entry
    
    Closes: https://bugs.gentoo.org/898196
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 app-portage/portage-utils/metadata.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 5 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2023-03-06 04:38:58 UTC
(In reply to SpanKY from comment #2)
> > it seems someone from your org/company assigned this "cpe".
> 
> not sure what you mean by "assign", but Google isn't responsible for the
> "gentoo" namespace, or able to have things officially assigned.  Gentoo
> manages that namespace.

If we manage CPEs, I've never heard of it. CPE assignments are ad-hoc, mediated by MITRE. Yes, it sucks. But thank MITRE, and if a CVE's CPEs are wrong, tell them. I suspect there's a CVE somewhere that incorrectly has a Portage CPE for a portage-utils issue, or something, which lead to the wrong CPE getting added to portage-utils.

Of course, Whissi should've noticed this error too :(

> i expect this patch was just an oversight in trying
> to backfill things since the vast majority of CPE entries in Gentoo came
> from ChromiumOS.
> 
> let's just change it to "portage-utils", since that's the package name, and
> call it a day.  i'd make the change but my desktop is offline atm.