fleetdm / fleet

Open-source platform for IT, security, and infrastructure teams. (Linux, macOS, Chrome, Windows, cloud, data center)
https://fleetdm.com
Other
2.99k stars 415 forks source link

Vulnerabilities (CVEs) for custom Linux kernels #19347

Closed noahtalerman closed 2 months ago

noahtalerman commented 4 months ago

Goal

User story
As a vulnerability management engineer,
I want to see vulnerabilities (CVEs) for my custom kernels
so that I can see which vulnerabilities affect my Linux hosts.

Context

Changes

Product

Engineering

ℹ️  Please read this issue carefully and understand it. Pay special attention to UI wireframes, especially "dev notes".

QA

Risk assessment

Manual testing steps

  1. Step 1
  2. Step 2
  3. Step 3

Testing notes

Confirmation

  1. [ ] Engineer (@____): Added comment to user story confirming successful completion of QA.
  2. [ ] QA (@____): Added comment to user story confirming successful completion of QA.
sharon-fdm commented 4 months ago

@noahtalerman @lukeheath since this is urgent for the customer, do we want to consider releasing it as part of Patch 4.51.1 ?(outside of our process)

lukeheath commented 4 months ago

@sharon-fdm Unless it's a priority ticket I don't think so. We'd need to run an unscheduled minor release since this is a change and not a bug fix.

noahtalerman commented 4 months ago

since this is urgent for the customer, do we want to consider releasing it as part of Patch 4.51.1 ?(outside of our process)

Hey @zayhanlon do you think we want to consider accelerating this feature? Or can it wait until the next minor release? Targeted for 2024-06-24.

lucasmrod commented 3 months ago

@mostlikelee Do you know how we can QA this? Any publicly available custom kernels you know of that we could install?

mostlikelee commented 3 months ago

@mostlikelee Do you know how we can QA this? Any publicly available custom kernels you know of that we could install?

Not that i know of, so I think our best bet is to enroll an Ubuntu host and update any software table entries starting with linux-image-*. ie. linux-image-5.4.0-163-generic -> linux-image-5.4.0-163-customfoo

lucasmrod commented 3 months ago

QA

Steps to test this issue

After many tries (because of the manual steps) I was able to verify this change.

  1. Enroll a Ubuntu host.
  2. linux-image-6.5.0-35-generic, 6.5.0-35.35~22.04.1 is in the host software list.
  3. Run vulnerability processing cron (fleetctl trigger --name vulnerabilities).
  4. Vulnerability count for the kernel is 150 (all CVEs have source=1, meaning they come from from OVAL).
  5. Manually change software name from linux-image-6.5.0-35-generic to linux-image-6.5.0-35-hotdog, and manually delete the found OVAL vulnerabilities.
    update software SET name = 'linux-image-6.5.0-35-hotdog' where id = 3842;
    delete from software_cve where software_id = 3842;
  6. Run vulnerability processing cron (fleetctl trigger --name vulnerabilities).
  7. Vulnerability count for the kernel is 364 (all CVEs have source=0, meaning they come from from NVD).

Notes

I did not analyze all the 364 CVEs found on NVD for the custom kernel. There could be false positives. I picked 5 and they looked like true positives.

marko-lisica commented 3 months ago

Hey @mostlikelee when you get the chance, can you please take the docs updates for this one.

Outdated documentation changes: Add 1 sentence about how CVEs are mapped to custom kernels in the Coverage section on the Vulnerability processing page

marko-lisica commented 3 months ago

Hey @Patagonia121, this story has shipped. We want to make sure docs TODOs from the comment above are merged in before we notify customers.

Patagonia121 commented 3 months ago

@marko-lisica I was planning to post a general release summary for all customer channels in Slack where I would mention this update, so you're saying I should hold off until doc changes are merged? @mostlikelee do you think this will happen today? Thank you both!

mostlikelee commented 3 months ago

@Patagonia121 @marko-lisica not a problem, I'll get those up today

noahtalerman commented 3 months ago

Hey @mostlikelee just checking in, did you get to those docs updates?

mostlikelee commented 3 months ago

@noahtalerman can you review? https://github.com/fleetdm/fleet/pull/20125

rachaelshaw commented 2 months ago

@Patagonia121 docs are merged ✅

fleet-release commented 2 months ago

Custom kernel's glow, Vulnerabilities show, Safety in the know.