Skip to content

Conversation

@GermanAizek
Copy link

@GermanAizek GermanAizek commented Aug 19, 2025

@thiagomacieira,

About security patch changes:

In 'get_indicator()' function 'resolve_indicator()' can return NULL.

Check comment line: /* CborErrorUnexpectedEOF */

Affected CWE metrics:

https://cwe.mitre.org/data/definitions/476.html

https://cwe.mitre.org/data/definitions/690.html

…ereference

In 'get_indicator()' function 'resolve_indicator()' can return NULL.

Check comment line: /* CborErrorUnexpectedEOF */

Affected CWE metrics:

https://cwe.mitre.org/data/definitions/476.html

https://cwe.mitre.org/data/definitions/690.html
Copy link
Member

@thiagomacieira thiagomacieira left a comment

Choose a reason for hiding this comment

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

I don't think the condition you're trying to solve is possible. If you have a test case that can show a null pointer dereference, please provide it.

The reason for that is we must have already decoded the bytes for this CborValue once, so the bytes must be available. I would be more comfortable with a change to get_indicator() that asserts the returned value is not NULL (not to resolve_indicator(), because string iteration near line 422 uses that and it can be null).

Comment on lines +348 to +349
if (!indicator)
return err;
Copy link
Member

Choose a reason for hiding this comment

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

This isn't correct: at this point, err = CborNoError but there was an error.

But I don't think the error condition is possible in the first place.

Copy link
Author

Choose a reason for hiding this comment

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

But I don't think the error condition is possible in the first place.

if you deliberately try to do this, it is possible, but even if you do it, it will lead to the usual segfault program. Rights?

Copy link
Member

Choose a reason for hiding this comment

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

No. I am saying I don't think it's possible to segfault the program even if you deliberately try.

Can you show an example that would trigger this condition?

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