anchore / anchore/syft

RPMDB parsing can fatally stop cataloging

Open
#784 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
9.6k
Forks
954
Avg merge
1d 5h
Merged PRs (30d)
42

Description

Derived from https://github.com/anchore/grype/issues/525 , syft errors out on analysis when an RPMDB cannot be parsed:
```
✔ Vulnerability DB [no update available]
New version of grype is available: 0.27.0
✔ Parsed image
⠏ Cataloging packages [packages 0]
1 error occurred:
* failed to catalog: 1 error occurred:
* unable to catalog rpmdb package=/var/lib/rpm/Packages: unexpected page size: 1048576
```

A few observations:
1) this should not be a fatal error
2) we can fix this in go-rpmdb to account for unexpected sizes (possibly)
3) there is no steps to reproduce at this time

Contributor guide

Open the contributing guide

Research direction

Start by tracing Syft's RPMDB cataloging path into go-rpmdb and inspect how unexpected page sizes are handled. Establish a reproduction for the reported /var/lib/rpm/Packages failure, then verify that an unparseable RPMDB no longer fatally stops cataloging.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.