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
x/crypto/openpgp: cannot read keys with revoked user ids #25850
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Comments
aviau
changed the title
x/crypto user ID packet not followed by self-signature
x/crypto/openpgp user ID packet not followed by self-signature
Jun 12, 2018
CC @FiloSottile |
bcmills
added
the
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
label
Jun 12, 2018
Change https://golang.org/cl/118376 mentions this issue: |
With the author's permission, I have adapted Keybase's changes to the current code base and created a test. |
aviau
changed the title
x/crypto/openpgp user ID packet not followed by self-signature
x/crypto/openpgp allow reading keys with revoked user ids
Jun 12, 2018
aviau
changed the title
x/crypto/openpgp allow reading keys with revoked user ids
x/crypto/openpgp cannot read keys with revoked user ids
Jun 12, 2018
I have added @FiloSottile to the reviewers on my changeset. This is my first contribution so let me know if there is something else I need to do to get things going. |
FiloSottile
changed the title
x/crypto/openpgp cannot read keys with revoked user ids
x/crypto/openpgp: cannot read keys with revoked user ids
Jun 13, 2018
lucab
added a commit
to lucab/torcx
that referenced
this issue
Jun 21, 2018
This is to hopefully fix buggy parsing of public keys, see golang/go#25850
zapu
pushed a commit
to keybase/go-crypto
that referenced
this issue
Aug 2, 2018
We were already supported revoked user IDs, but cherry-pick the test from mainline. Original commit: The existing code was wrongly assuming that UserID packets must be immediately followed by a Signature packet. However, this is not true. See RFC4880 11.1: > Immediately following each User ID packet, there are zero or more > Signature packets. This change will ensure that Entities that are not immediately followed by a Signature packet are read without raising a StructuralError. Instead, UserID packets that are not immediately followed by a self signature will be ignored. Maximum backwards compatibility is retained because revoked UserIDs are not added to the Entity's identities. In a follow-up patch, we should probably add these UserIDs to the Entity's identities too, but not without making sure that the revocation is also available in the Entity's (or the Identity's) Revocations slice. This would require adding support for a new Signature Type, "Certification revocation signature", as defined in RFC 48880 5.2.1. Fixes golang/go#25850 Change-Id: Idde34b97429998f28e0c687171024e51ed959bf0 Reviewed-on: https://go-review.googlesource.com/118376 Reviewed-by: Filippo Valsorda <filippo@golang.org> Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
zapu
pushed a commit
to keybase/go-crypto
that referenced
this issue
Aug 2, 2018
We were already supported revoked user IDs, but cherry-pick the test from mainline. Original commit: The existing code was wrongly assuming that UserID packets must be immediately followed by a Signature packet. However, this is not true. See RFC4880 11.1: > Immediately following each User ID packet, there are zero or more > Signature packets. This change will ensure that Entities that are not immediately followed by a Signature packet are read without raising a StructuralError. Instead, UserID packets that are not immediately followed by a self signature will be ignored. Maximum backwards compatibility is retained because revoked UserIDs are not added to the Entity's identities. In a follow-up patch, we should probably add these UserIDs to the Entity's identities too, but not without making sure that the revocation is also available in the Entity's (or the Identity's) Revocations slice. This would require adding support for a new Signature Type, "Certification revocation signature", as defined in RFC 48880 5.2.1. Fixes golang/go#25850 Change-Id: Idde34b97429998f28e0c687171024e51ed959bf0 Reviewed-on: https://go-review.googlesource.com/118376 Reviewed-by: Filippo Valsorda <filippo@golang.org> Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
zapu
pushed a commit
to keybase/go-crypto
that referenced
this issue
Aug 6, 2018
We were already supported revoked user IDs, but cherry-pick the test from mainline. Original commit: The existing code was wrongly assuming that UserID packets must be immediately followed by a Signature packet. However, this is not true. See RFC4880 11.1: > Immediately following each User ID packet, there are zero or more > Signature packets. This change will ensure that Entities that are not immediately followed by a Signature packet are read without raising a StructuralError. Instead, UserID packets that are not immediately followed by a self signature will be ignored. Maximum backwards compatibility is retained because revoked UserIDs are not added to the Entity's identities. In a follow-up patch, we should probably add these UserIDs to the Entity's identities too, but not without making sure that the revocation is also available in the Entity's (or the Identity's) Revocations slice. This would require adding support for a new Signature Type, "Certification revocation signature", as defined in RFC 48880 5.2.1. Fixes golang/go#25850 Change-Id: Idde34b97429998f28e0c687171024e51ed959bf0 Reviewed-on: https://go-review.googlesource.com/118376 Reviewed-by: Filippo Valsorda <filippo@golang.org> Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
chintanparikh
pushed a commit
to opendoor-labs/openpgp
that referenced
this issue
Dec 11, 2019
The existing code was wrongly assuming that UserID packets must be immediately followed by a Signature packet. However, this is not true. See RFC4880 11.1: > Immediately following each User ID packet, there are zero or more > Signature packets. This change will ensure that Entities that are not immediately followed by a Signature packet are read without raising a StructuralError. Instead, UserID packets that are not immediately followed by a self signature will be ignored. Maximum backwards compatibility is retained because revoked UserIDs are not added to the Entity's identities. In a follow-up patch, we should probably add these UserIDs to the Entity's identities too, but not without making sure that the revocation is also available in the Entity's (or the Identity's) Revocations slice. This would require adding support for a new Signature Type, "Certification revocation signature", as defined in RFC 48880 5.2.1. Fixes golang/go#25850 Change-Id: Idde34b97429998f28e0c687171024e51ed959bf0 Reviewed-on: https://go-review.googlesource.com/118376 Reviewed-by: Filippo Valsorda <filippo@golang.org> Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
c-expert-zigbee
pushed a commit
to c-expert-zigbee/crypto_go
that referenced
this issue
Mar 28, 2022
The existing code was wrongly assuming that UserID packets must be immediately followed by a Signature packet. However, this is not true. See RFC4880 11.1: > Immediately following each User ID packet, there are zero or more > Signature packets. This change will ensure that Entities that are not immediately followed by a Signature packet are read without raising a StructuralError. Instead, UserID packets that are not immediately followed by a self signature will be ignored. Maximum backwards compatibility is retained because revoked UserIDs are not added to the Entity's identities. In a follow-up patch, we should probably add these UserIDs to the Entity's identities too, but not without making sure that the revocation is also available in the Entity's (or the Identity's) Revocations slice. This would require adding support for a new Signature Type, "Certification revocation signature", as defined in RFC 48880 5.2.1. Fixes golang/go#25850 Change-Id: Idde34b97429998f28e0c687171024e51ed959bf0 Reviewed-on: https://go-review.googlesource.com/118376 Reviewed-by: Filippo Valsorda <filippo@golang.org> Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
c-expert-zigbee
pushed a commit
to c-expert-zigbee/crypto_go
that referenced
this issue
Mar 29, 2022
The existing code was wrongly assuming that UserID packets must be immediately followed by a Signature packet. However, this is not true. See RFC4880 11.1: > Immediately following each User ID packet, there are zero or more > Signature packets. This change will ensure that Entities that are not immediately followed by a Signature packet are read without raising a StructuralError. Instead, UserID packets that are not immediately followed by a self signature will be ignored. Maximum backwards compatibility is retained because revoked UserIDs are not added to the Entity's identities. In a follow-up patch, we should probably add these UserIDs to the Entity's identities too, but not without making sure that the revocation is also available in the Entity's (or the Identity's) Revocations slice. This would require adding support for a new Signature Type, "Certification revocation signature", as defined in RFC 48880 5.2.1. Fixes golang/go#25850 Change-Id: Idde34b97429998f28e0c687171024e51ed959bf0 Reviewed-on: https://go-review.googlesource.com/118376 Reviewed-by: Filippo Valsorda <filippo@golang.org> Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
c-expert-zigbee
pushed a commit
to c-expert-zigbee/crypto_go
that referenced
this issue
Mar 29, 2022
The existing code was wrongly assuming that UserID packets must be immediately followed by a Signature packet. However, this is not true. See RFC4880 11.1: > Immediately following each User ID packet, there are zero or more > Signature packets. This change will ensure that Entities that are not immediately followed by a Signature packet are read without raising a StructuralError. Instead, UserID packets that are not immediately followed by a self signature will be ignored. Maximum backwards compatibility is retained because revoked UserIDs are not added to the Entity's identities. In a follow-up patch, we should probably add these UserIDs to the Entity's identities too, but not without making sure that the revocation is also available in the Entity's (or the Identity's) Revocations slice. This would require adding support for a new Signature Type, "Certification revocation signature", as defined in RFC 48880 5.2.1. Fixes golang/go#25850 Change-Id: Idde34b97429998f28e0c687171024e51ed959bf0 Reviewed-on: https://go-review.googlesource.com/118376 Reviewed-by: Filippo Valsorda <filippo@golang.org> Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
LewiGoddard
pushed a commit
to LewiGoddard/crypto
that referenced
this issue
Feb 16, 2023
The existing code was wrongly assuming that UserID packets must be immediately followed by a Signature packet. However, this is not true. See RFC4880 11.1: > Immediately following each User ID packet, there are zero or more > Signature packets. This change will ensure that Entities that are not immediately followed by a Signature packet are read without raising a StructuralError. Instead, UserID packets that are not immediately followed by a self signature will be ignored. Maximum backwards compatibility is retained because revoked UserIDs are not added to the Entity's identities. In a follow-up patch, we should probably add these UserIDs to the Entity's identities too, but not without making sure that the revocation is also available in the Entity's (or the Identity's) Revocations slice. This would require adding support for a new Signature Type, "Certification revocation signature", as defined in RFC 48880 5.2.1. Fixes golang/go#25850 Change-Id: Idde34b97429998f28e0c687171024e51ed959bf0 Reviewed-on: https://go-review.googlesource.com/118376 Reviewed-by: Filippo Valsorda <filippo@golang.org> Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
BiiChris
pushed a commit
to BiiChris/crypto
that referenced
this issue
Sep 15, 2023
The existing code was wrongly assuming that UserID packets must be immediately followed by a Signature packet. However, this is not true. See RFC4880 11.1: > Immediately following each User ID packet, there are zero or more > Signature packets. This change will ensure that Entities that are not immediately followed by a Signature packet are read without raising a StructuralError. Instead, UserID packets that are not immediately followed by a self signature will be ignored. Maximum backwards compatibility is retained because revoked UserIDs are not added to the Entity's identities. In a follow-up patch, we should probably add these UserIDs to the Entity's identities too, but not without making sure that the revocation is also available in the Entity's (or the Identity's) Revocations slice. This would require adding support for a new Signature Type, "Certification revocation signature", as defined in RFC 48880 5.2.1. Fixes golang/go#25850 Change-Id: Idde34b97429998f28e0c687171024e51ed959bf0 Reviewed-on: https://go-review.googlesource.com/118376 Reviewed-by: Filippo Valsorda <filippo@golang.org> Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Hello,
I am getting the following error when reading a PGP Key:
openpgp: invalid data: user ID packet not followed by self-signature
It contains one revoked user ID:
This was fixed in keybase's go-crypto fork in the following changeset: keybase/go-crypto#5
Example code:
Go version:
go version go1.10.1 linux/amd64
The text was updated successfully, but these errors were encountered: