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

Potential out-of-bounds check in encap_certificate.rs may result in failure. #97

Closed
xiaoyuxlu opened this issue Jun 6, 2024 · 0 comments · Fixed by #102
Closed

Potential out-of-bounds check in encap_certificate.rs may result in failure. #97

xiaoyuxlu opened this issue Jun 6, 2024 · 0 comments · Fixed by #102
Assignees

Comments

@xiaoyuxlu
Copy link
Collaborator

let offset = get_certificate.offset;
if offset > my_cert_chain.data_size {

Using '>' instead of '>=' might allow for an offset that is exactly equal to data_size, which could lead to an out-of-bounds read.

longlongyang added a commit to longlongyang/spdm-rs that referenced this issue Jun 13, 2024
fix ccc-spdm-tools#97

Signed-off-by: Yang, Longlong <longlong.yang@intel.com>
jyao1 pushed a commit that referenced this issue Jun 13, 2024
fix #97

Signed-off-by: Yang, Longlong <longlong.yang@intel.com>
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 a pull request may close this issue.

2 participants