Skip to content
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

Flatcar Mayday evaluation #3589

Closed
LolloneS opened this issue Jul 23, 2024 · 11 comments
Closed

Flatcar Mayday evaluation #3589

LolloneS opened this issue Jul 23, 2024 · 11 comments
Assignees
Labels
team/tenet Team Tenet team/turtles Team Turtles

Comments

@LolloneS
Copy link

We rely on Flatcar as OS for our Kubernetes product.

Flatcar comes with mayday (https://github.com/flatcar/mayday) installed by default. It recently turned out to be vulnerable to a few CVEs.

Some questions here:

  • do we use it?
  • is it possible to somehow disable it, especially if we don't use it?
@LolloneS LolloneS added the team/turtles Team Turtles label Jul 23, 2024
@weseven
Copy link

weseven commented Jul 30, 2024

Do we have a reference for these CVEs?
I couldn't find anything specific for that tool

@weseven weseven self-assigned this Jul 30, 2024
@LolloneS
Copy link
Author

LolloneS commented Aug 6, 2024

I'll provide them ASAP :) in the meantime, can we evaluate if we need it/can disable it?

@weseven
Copy link

weseven commented Aug 6, 2024

As far as I know, we don't really use it: it's a tool used to collect diagnostics when there's something wrong in the system to later analyze them/send them to support or whatever (basically what sosreport is in RedHat world).
It has no service, it's only executed on user demand, so unless there's some privilege escalation possible through the tool I think it is mostly harmless (it does not collect sensitive data).

I was asking because there's a class of trojans which has the same name (Mayday), and since I couldn't find any CVE related to the tool I was wondering if the security scanner tripped over the homonymy.

If it turns out there is a significant vulnerability of course we can remove it from the system when we build our flatcar image.

@weseven
Copy link

weseven commented Aug 20, 2024

Adidas added the issue reference, it's an outdated go dependency that might cause a crash when parsing malformed HTML (https://nvd.nist.gov/vuln/detail/CVE-2018-17848):

Image

@weseven
Copy link

weseven commented Aug 20, 2024

I've opened a PR to the flatcar mayday upstream: flatcar/mayday#12

Edit: PR has already been merged, hopefully they will make a new version and include it in the next flatcar release 🚀

@weseven
Copy link

weseven commented Aug 20, 2024

The PR was merged, and the dev made a couple of other PRs removing obsolete functionality and other vulnerable dependencies.
Newer flatcar versions most likely will have the updated, non vulnerable mayday (progress here: flatcar/scripts#2247).

@weseven weseven closed this as completed Aug 20, 2024
@yulianedyalkova
Copy link

We also need to ensure that the following CVE has been fixed with our change:
image

Also that we have a flatcar version including those changes in CAPI.

Context https://github.com/giantswarm/adidas/issues/1297.

@AverageMarcus
Copy link
Member

Can I just check - what's the actual concern here? Unless I'm mistaken mayday is a CLI on the host node. If bad actors already have access to it then they've already won.

If we're not actively using it for anything (and I'm not aware that we are) then I don't think we have anything to worry about. Yes it's not ideal having the CVE notification but if it's not exploitable then its not a problem 🤷

@yulianedyalkova
Copy link

If we can solve the scan alert that would be ideal and since we already have a fix for a CVE with a bigger number in the same dependency, I'm hoping this one was resolved in there too with Daniel's change. So let's check if that's the case and in which flatcar version.

If it's not resolved, we need to evaluate the potential risk and communicate with the customer if a fix is really required.

@puja108
Copy link
Member

puja108 commented Oct 1, 2024

any updates on this?

@Gacko Gacko assigned Gacko and unassigned weseven Oct 1, 2024
@architectbot architectbot added the team/tenet Team Tenet label Oct 1, 2024
@Gacko
Copy link
Member

Gacko commented Oct 2, 2024

So, Daniel proposed a fix in flatcar/mayday#12. This got merged. A day later they just removed the whole dependency in flatcar/mayday#13.

I then looked up which version of mayday is currently being used in Flatcar, turns out they recently bumped it in flatcar/scripts#2247 and fortunately the commit used by this PR also includes the previously mentioned fix.

The first Flatcar release I could find including this PR is 3975.2.1: https://github.com/flatcar/scripts/blob/stable-3975.2.1/sdk_container/src/third_party/coreos-overlay/app-admin/mayday/mayday-9999.ebuild

Flatcar 3975.2.1 is used in CAPA v29.2.0, CAPA v29.3.0, CAPZ v29.1.0 & CAPZ v29.2.0:

% grep 3975.2.1 */*/release.yaml --before-context 1
azure/v29.1.0/release.yaml-  - name: flatcar
azure/v29.1.0/release.yaml:    version: 3975.2.1
--
azure/v29.2.0/release.yaml-  - name: flatcar
azure/v29.2.0/release.yaml:    version: 3975.2.1
--
capa/v29.2.0/release.yaml-  - name: flatcar
capa/v29.2.0/release.yaml:    version: 3975.2.1
--
capa/v29.3.0/release.yaml-  - name: flatcar
capa/v29.3.0/release.yaml:    version: 3975.2.1

According to Dani they are fine as long as we include it in one of the releases on their journey from v20 to v29:

Priority

For the next upgrade. After capa migration, I think there are plans to fast forward from v20 to v29. Including it on this path would be ok. Not urgent, but cannot be forgotten.

@Gacko Gacko closed this as completed Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team/tenet Team Tenet team/turtles Team Turtles
Projects
Status: Done ✅
Development

No branches or pull requests

7 participants