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 index out of bounds issue found by fuzz. #39

Merged
merged 1 commit into from
Feb 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion spdmlib/src/crypto/x509v3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ fn check_and_get_extn_id(extn_sequences: &[u8]) -> SpdmResult<(&[u8], usize)> {
} else {
// extnID is the first item in the extension sequence and the tag is Object identifier
let extn_id = &extn_sequences[1 + extn_bytes_consumed..];
if extn_id[0] != ASN1_TAG_NUMBER_OBJECT_IDENTIFIER {
if extn_id.is_empty() || extn_id[0] != ASN1_TAG_NUMBER_OBJECT_IDENTIFIER {
Err(SPDM_STATUS_VERIF_FAIL)
} else {
let (extn_id_length, extn_id_bytes_consumed) = check_length(&extn_id[1..])?;
Expand Down
Loading