-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Rocky Linux #1053
Comments
This is sadly no longer (easily) true for CentOS 8 and as such also not for Rocky Linux. This is due to how modules As an example of running trivy against CentOS 8 yesterday:
You can see that the affected version is:
Looking at the covering redhat advisory: https://access.redhat.com/errata/RHSA-2021:1796#packages we can see that redhat indeed fixed this in |
As another example, I just checked Rockylinux for libslirp (they seem to have rebuilt the package twice):
|
And just for fun, AlmaLinux:
That is now 4 distributions, all with different versions. |
Thank you for that information, I did't realize they did't synchronize version numbers. Does that mean Trivy is currently broken for CentOS 8? Does this mean Trivy support for will have to wait until Rockylinux and AlmaLinux both independently publish their own advisories with the correct revision numbers? |
Define "broken". Trivy doesn't list CentOS 8 as supported https://aquasecurity.github.io/trivy/v0.17.2/vuln-detection/os/ -- so in that sense it is simply not supported and not technically broken.
No idea, if the version check were adjusted to strip everything after |
Support for modular packages was added in #790. |
@knqyf263 Could you provide your insights here? Since CentOS is basically bug compatible with RHEL it could make sense to relax the module comparison, what do you think? |
This isn't always true. For example, CVE-2020-25097 was fixed in RHSA-2021:1979 with |
@carlwgeorge Uff, that is unfortunate. So effectively RedHat did find a way to ensure that the security feed is only usable for RHEL no matter what :/ If that is really the case I think trivy should fully remove support for CentOS 8 and not pretend that it works by showing open issues… |
Actually it make sence. CentOS, AlmaLiux and Rocky are RHEL family products. Any Security related issues related to sources are applicable all which might be 80%. Build, packageing and optimization might vary. So the chalenge would be mater of findng the packaging pattern. May be related community members can help to improve the process |
There was no ill intent. Modularity was designed in Fedora, and that's where the decision to inject modular build information via the The correct answer is for rebuilds to publish their own errata (like Alma does). Re-using RHEL errata as-is with RHEL rebuilds was always a hack that just happened to work, and it didn't even work consistently due to the rebuild gap. But if people insist on propping that hack up, it shouldn't be that difficult to write a regex to strip the modular info. Something like |
Rereading my comment, I realize it sounded way harsher than intended. I am sorry if it created the impression that RHEL did this on purpose to cripple CentOS -- this was not my intention.
Sure, but that was easy to understand and argue about :)
Do you happen to know the reason for this? The versioning guidelines seem to mention it as What do you think would be the best resolution for distros like CentOS/Rocky/Alma as long as Trivy doesn't have it's own errata for them? Mark them as completely unsupported or relax the module comparison? |
Yes, this is a case of a "minor release bump", exactly what you found documentation for. It may mean that the next RHEL branch (rhel-8.5.0 in this case) already has a build using the next whole release number, but it's necessary to apply a fix to the previous (rhel-8.4.0) branch. The strictest interpretation of this would be that if a distro doesn't publish errata, it can't be supported. The CentOS project doesn't publish errata because even though it is built from RHEL sources, CentOS doesn't validate the fixes. I don't know if Alma validates fixes for it's errata, or if Rocky plans to validate fixes when they start publishing errata. Just saying "it's the same source so it must be the same" isn't always correct. Sometimes a release bump that fixes a CVE is a rebuild of a package after a dependent library was updated. Imagine a CVE fix in golang, where golang is updated in RHEL and podman must be rebuilt to get the fix. A distro built from RHEL sources could have an identical podman version and release, but if it was rebuilt in the wrong order it wouldn't resolve the CVE. Relaxing the module comparison puts modules on the same level as regular packages, but it doesn't resolve this fundamental flaw. Having the same NVR (name-version-release) only tells you that it was built from the same source, which is not a guarantee that it fixes the CVE in question. |
Oh -- my naive assumption was that in this case one would set a |
This issue is stale because it has been labeled with inactivity. |
Link back for reference |
@carlwgeorge Thanks for the explanation! I'm so sorry for the too late reply. I was so busy on IaC scanning and other tasks.
Agree. Strictly speaking, we should not support CentOS due to missing errata. But there are many CentOS users and I guess they accept a certain amount of inconvenience because it is free. Even though it might be wrong in some cases, I think it is better to detect vulnerabilities relatively correctly rather than not supported at all. We probably should mention it in our documentation. We're ready to support CentOS errata once they publish it.
I completely understand what you mean, but as far as I know, security errata is usually published for the vulnerabilities affecting the product itself. I mean the errata of Podman doesn't have the vulnerabilities of Go. In the below example, it doesn't mention Podman. In other words, when Podman built by newer Go in RHEL fixes the Go vulnerability and Podman built by older Go in CentOS doesn't fix the Go vulnerability, the transitive vulnerability cannot be detected. On the other hand, when |
Again, matching the NVR only guarantees that it was built from the same source. It does not validate the build requirements it was built with, which breaks the assumption you're making when it comes to software that ships static binaries, such as golang or rust. If a projects like Alma and Rocky want to publish errata, they are taking responsibility for verifying that each errata fixes what they claim it does. |
I mean even though Podman is built by vulnerable Go, those advisories are usually not provided anyway as far as I know. Please correct me if I'm wrong. The security advisories focus on vulnerabilities in the software itself, not build tools. |
@knqyf263 See https://access.redhat.com/errata/RHSA-2021:1796 as an example where (among others) Redhat explicitly rebuilt podman to fix a golang issue. |
Oh, I didn't know Red Hat lists the CVE-ID of golang as well. Thanks! But I wonder if they will list all vulnerabilities of Podman dependencies... |
No idea. But the main take aways that I can see:
|
Actually Rocky must be detected as "RHEL/Rocky". |
The outside contributor @MaineK00n added support for Rocky Linux 🎉 🥳 Note that their errata has some issues and Trivy cannot detect modular packages for now. See here for details. |
I see the support was added in aquasecurity/trivy-db#154. Do we have to wait for a new trivy release before being able to use that new db version? |
You need to wait for v0.23.0. It is supposed to be released on January 31st. |
Rocky Linux should be detected as RHEL/CentOS. See https://rockylinux.org/ for details. Similar to classic CentOS, Rocky Linux is a RHEL clone so Red Hat Security advisories apply to it. This is the same exact situation as AlmaLinux #1021
The text was updated successfully, but these errors were encountered: