Skip to content

Clam 2211 Add string length validation to public key strings#810

Merged
val-ms merged 1 commit intoCisco-Talos:mainfrom
ragusaa:CLAM-2211-ValidateKeyLength
Feb 2, 2023
Merged

Clam 2211 Add string length validation to public key strings#810
val-ms merged 1 commit intoCisco-Talos:mainfrom
ragusaa:CLAM-2211-ValidateKeyLength

Conversation

@ragusaa
Copy link
Contributor

@ragusaa ragusaa commented Jan 19, 2023

No description provided.

@ragusaa ragusaa force-pushed the CLAM-2211-ValidateKeyLength branch from 4bd2e46 to a86d03a Compare January 20, 2023 17:14
Copy link
Contributor

@val-ms val-ms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Will run through Jenkins, but local testing and review look good to me.

* long causes an out of bounds read in the this call.
*/
if ((strlen(tokens[4]) / 2) >= (FP_MAX_SIZE / 8)) {
cli_errmsg("cli_loadcrt: line %u: Public key too long.\nNOTE: If this is actually a valid key length, recompile with a larger FP_MAX_SIZE (currently %d).\n", (unsigned int)line, FP_MAX_SIZE);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the note. Nice.

@val-ms val-ms changed the title Add string length validation to public key strings Clam 2211 Add string length validation to public key strings Feb 1, 2023
@val-ms val-ms merged commit efcc0c6 into Cisco-Talos:main Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants