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

Fix VTs hash check and add --dump-vt-verification #1611

Merged
merged 4 commits into from
Jul 8, 2021

Conversation

timopollmeier
Copy link
Member

@timopollmeier timopollmeier commented Jul 5, 2021

What:
The collation of the VTs and preferences is now set explicitly in the
SQL used to get the string the VTs verification hash is calculated from
to ensure the VTs and preferences are sorted consistently.
The unhashed string is now also generated in a function and the command
line option --dump-vt-verification has been added.

Why:
With the recent NVTs feed this caused the VTs verification to fail. See #1608.

How did you test it:
By running gvmd --dump-vt-verification, redirecting the output to a file and comparing it to the output of a modified version of ospd-openvas that also dumps the non-hashed verification string to a file.
I also ran gvmd --rebuild to check that warning about the mismatched hash disappeared.

Checklist:

The collation of the VTs and preferences is now set explicitly in the
SQL used to get the string the VTs verification hash is calculated from
to ensure the VTs and preferences are sorted consistently.
The unhashed string is now also generated in a function and the command
line option --dump-vt-verification has been added.
@timopollmeier timopollmeier added backport-to-oldstable This pull request will be backported to the oldstable branch backport-to-stable This pull request will be backported to the stable branch labels Jul 5, 2021
@timopollmeier timopollmeier marked this pull request as ready for review July 5, 2021 15:39
@timopollmeier timopollmeier requested a review from a team as a code owner July 5, 2021 15:39
src/gvmd.c Outdated Show resolved Hide resolved
bjoernricks
bjoernricks previously approved these changes Jul 8, 2021
@bjoernricks bjoernricks merged commit bdd6913 into greenbone:master Jul 8, 2021
timopollmeier added a commit that referenced this pull request Jul 8, 2021
bjoernricks added a commit that referenced this pull request Jul 8, 2021
Fix VTs hash check and add --dump-vt-verification (backport #1611)
@timopollmeier
Copy link
Member Author

@Mergifyio backport gvmd-21.04

@greenbone greenbone deleted a comment from mergify bot Jul 8, 2021
@mergify
Copy link
Contributor

mergify bot commented Jul 8, 2021

Command backport gvmd-21.04: failure

No backport have been created

  • Backport to branch gvmd-21.04 failed

bjoernricks added a commit that referenced this pull request Jul 8, 2021
Fix VTs hash check and add --dump-vt-verification (backport #1611)
@timopollmeier timopollmeier deleted the vts-hash-fix branch October 15, 2021 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-oldstable This pull request will be backported to the oldstable branch backport-to-stable This pull request will be backported to the stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants