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

rpc: Add missing null checks in attribute value serializers #279

Merged
merged 1 commit into from Mar 10, 2020

Conversation

ueno
Copy link
Member

@ueno ueno commented Feb 7, 2020

To get the length of an attribute value, the client calls C_GetAttributeValue with attr->pValue set to NULL and attr->ulValueLen set to -1. In the RPC level, this is already indicated with a
'validity' flag, but there were a couple of places that assume attr->pValue is non-NULL.

This was uncovered by:
https://bugzilla.redhat.com/show_bug.cgi?id=1766340

@packit-as-a-service
Copy link

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/p11-glue-p11-kit-279
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

@LorbusChris
Copy link

This would fix a long standing issue =) friendly ping

@ueno
Copy link
Member Author

ueno commented Mar 10, 2020

Sorry, I realized that this alone doesn't fix the mentioned RHBZ bug, which may require support in Firefox side. Yet the change itself should be correct.

Copy link

@t8m t8m left a comment

Choose a reason for hiding this comment

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

Looks OK to me.

To get the length of an attribute value, the client calls
C_GetAttributeValue with attr->pValue set to NULL and attr->ulValueLen
set to -1.  In the RPC level, this is already indicated with a
'validity' flag, but there were a couple of places where attr->pValue
is non-NULL.

This was uncovered by:
https://bugzilla.redhat.com/show_bug.cgi?id=1766340
@ueno ueno merged commit 3eb79b7 into p11-glue:master Mar 10, 2020
@ueno
Copy link
Member Author

ueno commented Mar 10, 2020

Thanks for the review (merged after rewording the commit message).

@ueno ueno added the bug label Aug 18, 2020
@ueno ueno added this to the 0.23.21 milestone Aug 18, 2020
@dustymabe
Copy link

Hey @ueno @t8m - Is there anything tracking the remaining work mentioned in #279 (comment) ?

xref: https://bugzilla.redhat.com/show_bug.cgi?id=1766340#c11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants