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

OS list/detail shows the same CVE twice when an OS version has multiple architectures #27061

Open
iansltx opened this issue Mar 12, 2025 · 2 comments
Assignees
Labels
~backend Backend-related issue. bug Something isn't working as documented #g-software Software product group :incoming New issue in triage process. ~vulnerability-management

Comments

@iansltx
Copy link
Member

iansltx commented Mar 12, 2025

Fleet version: 4.65RC and older


πŸ’₯ Β Actual behavior

CVE-2025-24201 is shown twice for macOS 15.3.1.

πŸ§‘β€πŸ’» Β Steps to reproduce

Enroll an Intel Mac and an Arm Mac, both on the same macOS version, on a version old enough to have a CVE. Then run vulnerabilities and check the OS version detail page.

This is also visible in the OS list view when hovering the vulnerabilities column for an affected version.

See Dogfood. The duplicate is from the API, so this is a backend issue.

πŸ› οΈ To fix

Since we don't split out different architectures in the UI for OS version, seems like we need to merge rows for the OS vulnerabilities query so there is one result row per CVE per name/version combo, even if there are multiple architectures and this multiple rows.

If we want to split out OS versions by architecture later we can revise the query logic to look at vulns by OS version ID rather than by name/version, which will give us one row per vuln.

@iansltx iansltx added #g-software Software product group :incoming New issue in triage process. :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. :reproduce Involves documenting reproduction steps in the issue bug Something isn't working as documented ~backend Backend-related issue. ~vulnerability-management labels Mar 12, 2025
@iansltx iansltx self-assigned this Mar 12, 2025
@iansltx iansltx removed the :reproduce Involves documenting reproduction steps in the issue label Mar 12, 2025
@iansltx
Copy link
Member Author

iansltx commented Mar 12, 2025

Marking this as a released bug as this is almost certainly an issue with the ListVulnsByOsNameAndVersion data store function query, probably for both Fleet Free and Fleet Premium versions of the query, due to multiple rows in the OS versions table for the same OS name and version due to differing architectures.

@rfairburn can you pull the results of the following query from Dogfood?

SELECT id FROM operating_systems WHERE name = "macOS" AND version = "15.3.1"

Pretty sure there will be two rows there, one per arch, in which case that'll confirm my suspicion of where the problem is.

If that's the issue, fix would probably be to add a group-by on CVE number, at which point we'll need to pick a reasonable value for created_at (probably MIN()) for cases where multiple rows are returned.

@iansltx iansltx removed the :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. label Mar 12, 2025
@rfairburn
Copy link
Contributor

@iansltx

+-----+
| id  |
+-----+
| 487 |
| 504 |
+-----+
2 rows in set (4.12 sec)

Further inspection confirms that they are differentiated by arch but the same name and version.

@iansltx iansltx changed the title OS detail shows the same CVE twice OS detail shows the same CVE twice when an OS version has multiple architectures Mar 12, 2025
@iansltx iansltx changed the title OS detail shows the same CVE twice when an OS version has multiple architectures OS list/detail shows the same CVE twice when an OS version has multiple architectures Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
~backend Backend-related issue. bug Something isn't working as documented #g-software Software product group :incoming New issue in triage process. ~vulnerability-management
Projects
None yet
Development

No branches or pull requests

2 participants