Uploaded image for project: 'Clair'
  1. Clair
  2. CLAIRDEV-55

Red Hat containers break versioning heuristic on name changes

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • clair-4.7.2
    • indexer, updater
    • None
    • True
    • Hide

      Needs a holistic solution from the build system through release to the security data.

      Show
      Needs a holistic solution from the build system through release to the security data.
    • False

      While investigating a report of false positives in Clair, we came across another phantom issue due to the lack of provenance and reliance on heuristics in Claircore's Red Hat support.

      Here's the data reported from Clair:

      Name Version Fixed
      openshift4/ose-etcd-rhel9 v4.12.0-202311220908.p0.g6c571f4.assembly.stream v4.13.0-202310162157.p0.g7efbc01.assembly.stream
      openshift4/ose-etcd-rhel9 v4.12.0-202311220908.p0.g6c571f4.assembly.stream v4.13.0-202310162157.p0.g7efbc01.assembly.stream
      openshift4/ose-etcd-rhel9 v4.12.0-202311220908.p0.g6c571f4.assembly.stream v4.13.0-202310162157.p0.g7efbc01.assembly.stream
      openshift4/ose-haproxy-router v4.12.0-202311220908.p0.gbfb6625.assembly.stream v4.14.0-202311021650.p0.gb3af193.assembly.stream
      openshift4/ose-haproxy-router v4.12.0-202311220908.p0.gbfb6625.assembly.stream v4.14.0-202311021650.p0.gb3af193.assembly.stream
      openshift4/ose-hyperkube-rhel9 v4.12.0-202311220908.p0.ga52e8df.assembly.stream v4.14.0-202310210404.p0.gf67aeb3.assembly.stream
      openshift4/ose-hyperkube-rhel9 v4.12.0-202311220908.p0.ga52e8df.assembly.stream v4.14.0-202310210404.p0.gf67aeb3.assembly.stream
      openshift4/ose-hyperkube-rhel9 v4.12.0-202311220908.p0.ga52e8df.assembly.stream v4.14.0-202310210404.p0.gf67aeb3.assembly.stream

      This appears incorrect because the packages already contain a fix for the flagged vulnerability. (In this case, CVE-2023-44487.) However, because the container name mapping points to two different package names (in these cases, openshift/proj and openshift/proj-rhel9), both are associated with the container. When the cvemap.xml file is parsed, the names are treated independently. This results in two vulnerabilities with version ranges that have an infinitely early lower bound. As an example:

      • Container's "name" label: "openshift/foo"
      • container-name-repos-map.json entry: ["openshift/foo", "openshift/foo-rhel9"]
      • relevant cvemap.xml packages: openshift/foo:v1.0, openshift/foo-rhel9:v1.1

      Two vulnerabilities will be produced, one for each cvemap.xml package. However, because the names are different, they will both produce a range with a lower bound of zero, and thus both match. This lower bound behavior is desired: consider a CVE in openshift/foo:v0.9 that has since gone out of support.


      This is the same root issue as CLAIRDEV-45, only reproduced in the domain of containers instead of rpms. As long as Red Hat release artifacts don't have enough information to uniquely identify them in the same terms that are used in the security data, this phantom problem will be endemic.

            Unassigned Unassigned
            hdonnay Henry Donnay
            Joseph Crosland
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: