Abort signature load for short signature patterns (1.0.2)#952
Merged
val-ms merged 1 commit intoCisco-Talos:dev/1.0.2from Jun 20, 2023
Merged
Conversation
If a signature has a pattern that is too short will fail to load the signature but does not cause the entire load process to abort. This is bad for two reasons: 1) It is not immediately apparent that the signature is bad, and so it could be published accidentally. 2) The signature is partially loaded by the time the bad pattern is observed and that may cause a crash later. Because of (1), it is not worth it to try to unload the first part of the signature. Instead, we should just abort the signature load. Fixes: Cisco-Talos#923 We should also abort loading if the filter pattern for the boyer-moore matcher is shorter than 2 bytes. Also, do not print the final "Loading" progress bar if an error occurred.
Contributor
Author
|
Internal testing went well. Will merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #934
If a signature has a pattern that is too short will fail to load the signature but does not cause the entire load process to abort. This is bad for two reasons:
Because of (1), it is not worth it to try to unload the first part of the signature. Instead, we should just abort the signature load.
Fixes: #923
We should also abort loading if the filter pattern for the boyer-moore matcher is shorter than 2 bytes.
Also, do not print the final "Loading" progress bar if an error occurred.