Skip to content

Abort signature load for short signature patterns (1.0.2)#952

Merged
val-ms merged 1 commit intoCisco-Talos:dev/1.0.2from
val-ms:CLAM-2353-abort-for-bad-signature-1.0.2
Jun 20, 2023
Merged

Abort signature load for short signature patterns (1.0.2)#952
val-ms merged 1 commit intoCisco-Talos:dev/1.0.2from
val-ms:CLAM-2353-abort-for-bad-signature-1.0.2

Conversation

@val-ms
Copy link
Contributor

@val-ms val-ms commented Jun 13, 2023

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:

  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: #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.

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.
@val-ms
Copy link
Contributor Author

val-ms commented Jun 20, 2023

Internal testing went well. Will merge.

@val-ms val-ms merged commit 7e44e94 into Cisco-Talos:dev/1.0.2 Jun 20, 2023
@val-ms val-ms deleted the CLAM-2353-abort-for-bad-signature-1.0.2 branch June 20, 2023 18:23
@val-ms val-ms changed the title Abort signature load for short signature patterns Abort signature load for short signature patterns (1.0.2) Aug 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant