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

decode_payload: Skip over signature entries that cause errors #31

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

pothos
Copy link
Member

@pothos pothos commented Oct 30, 2023

Either the printf escaping gives wrong binary data or the random dummy key signature is really broken for the oem-ami.gz 3745.1.0 amd64 payload.
The error reported is:
RSA operation error
007E9295D47F0000:error:02000084:rsa routines:rsa_ossl_public_decrypt:data too large for modulus:crypto/rsa/rsa_ossl.c:661: 007E9295D47F0000:error:1C880004:Provider routines:rsa_verify_recover:RSA lib:providers/implementations/signature/rsa_sig.c:748:

How to use

Backport to Beta

Testing done

wget -O /var/tmp/oem-ami.gz https://update.release.flatcar-linux.net/amd64-usr/3745.1.0/oem-ami.gz
PROTOPATH=src/update_engine/ ./decode_payload ~/flatcar/scripts/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-au-key/files/official-v2.pub.pem /var/tmp/oem-ami.gz /var/tmp/out

Either the printf escaping gives wrong binary data or the random dummy
key signature is really broken for the oem-ami.gz 3745.1.0 amd64
payload.
The error reported is:
RSA operation error
007E9295D47F0000:error:02000084:rsa routines:rsa_ossl_public_decrypt:data too large for modulus:crypto/rsa/rsa_ossl.c:661:
007E9295D47F0000:error:1C880004:Provider routines:rsa_verify_recover:RSA lib:providers/implementations/signature/rsa_sig.c:748:
@pothos
Copy link
Member Author

pothos commented Oct 30, 2023

Didn't find a quoting issue unless it's in protoc itself.

@pothos pothos changed the title [WIP] decode_payload: Skip over signature entries that cause errors decode_payload: Skip over signature entries that cause errors Oct 30, 2023
@pothos
Copy link
Member Author

pothos commented Oct 30, 2023

I think this really happens because we try to check the dummy signature with the production update key and this expected to fail but probably there are different failure modes depending on the internal values.

@pothos pothos requested a review from a team October 30, 2023 14:30
@pothos pothos merged commit d262b46 into flatcar-master Nov 2, 2023
1 check passed
@pothos pothos deleted the kai/decode-rsa-error branch November 2, 2023 10:43
pothos added a commit to flatcar/scripts that referenced this pull request Nov 2, 2023
This pulls in
flatcar/update_engine#31
to correctly skip over signature entries that cause errors which can be
the case for the dummy signatures.
pothos added a commit to flatcar/scripts that referenced this pull request Nov 2, 2023
This pulls in
flatcar/update_engine#31
to correctly skip over signature entries that cause errors which can be
the case for the dummy signatures.
pothos added a commit to flatcar/scripts that referenced this pull request Nov 2, 2023
This pulls in
flatcar/update_engine#31
to correctly skip over signature entries that cause errors which can be
the case for the dummy signatures.
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