-
Notifications
You must be signed in to change notification settings - Fork 365
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
Tss2_PolicyGetDescription() does not null-terminate #2826
Labels
Comments
joholl
pushed a commit
that referenced
this issue
May 4, 2024
Fixes: #2826 Signed-off-by: Johannes Holland <johannes.holland@infineon.de>
joholl
pushed a commit
that referenced
this issue
May 7, 2024
Fixes: #2826 Signed-off-by: Johannes Holland <johannes.holland@infineon.de>
joholl
pushed a commit
to joholl/tpm2-tss
that referenced
this issue
May 25, 2024
Fixes: tpm2-software#2826 Signed-off-by: Johannes Holland <johannes.holland@infineon.de>
joholl
pushed a commit
to joholl/tpm2-tss
that referenced
this issue
Jun 4, 2024
Fixes: tpm2-software#2826 Signed-off-by: Johannes Holland <johannes.holland@infineon.de>
joholl
pushed a commit
to joholl/tpm2-tss
that referenced
this issue
Jun 10, 2024
Fixes: tpm2-software#2826 Signed-off-by: Johannes Holland <johannes.holland@infineon.de>
joholl
pushed a commit
to joholl/tpm2-tss
that referenced
this issue
Jul 5, 2024
Fixes: tpm2-software#2826 Signed-off-by: Johannes Holland <johannes.holland@infineon.de>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tss2_PolicyGetDescription() returns a description field as a string (it uses
strlen()
internally), but it does not null-terminate the string for the caller. Instead ofmemcpy()
,strcpy()
should be used (andlen/*size
will have to be incremented by one).I found this issue using clang-tidy. This is going to be fixed in an upcoming PR by me.
tpm2-tss/src/tss2-policy/tss2_policy.c
Lines 384 to 427 in 8d19bd1
I took the liberty to flag this as a bug. Feel free to remove the label if you think otherwise.
The text was updated successfully, but these errors were encountered: