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

fix signature verification bypass due to insufficient hashsum checking #212

Merged
merged 1 commit into from
Jan 30, 2021

Conversation

anthraxx
Copy link
Collaborator

@anthraxx anthraxx commented Sep 22, 2020

The hashsum call is done inside a subshell, hence the error logging
which is responsible for terminating the application on failure must be
chained to the subshell instead of the inner command. Chaining it to the
call inside the subshell would only terminate the subshell ungracefully,
but would not have any effect on the caller.

This effectively is equal to a full signature verification bypass, since
an attacker is able to swap the terraform zip file at will as long as
the hashsum file and the signature are kept unchanged. Before this patch
the installation routine would happily verify the signature of the
hashsum file, the hashsum check in the subshell would fail but the
system wide installation would still take place.

Fixes: 750a849 (Upgrade to logging, keybase, use of local temp dir)
Since: v0.4.3

Signed-off-by: Levente Polyak [email protected]

The hashsum call is done inside a subshell, hence the error logging
which is responsible for terminating the application on failure must be
chained to the subshell instead of the inner command. Chaining it to the
call inside the subshell would only terminate the subshell ungracefully,
but would not have any effect on the caller.

This effectively is equal to a full signature verification bypass, since
an attacker is able to swap the terraform zip file at will as long as
the hashsum file and the signature are kept unchanged. Before this patch
the installation routine would happily verify the signature of the
hashsum file, the hashsum check in the subshell would fail but the
system wide installation would still take place.

Fixes: 750a849 (Upgrade to logging, keybase, use of local temp dir)
Since: v0.4.3

Signed-off-by: Levente Polyak <[email protected]>
@anthraxx anthraxx force-pushed the fix/signature-verification-bypass branch from 5dbe73c to 0a39ade Compare September 22, 2020 23:13
@anthraxx
Copy link
Collaborator Author

@Zordrak ping

@anthraxx anthraxx mentioned this pull request Jan 18, 2021
@Zordrak Zordrak merged commit dd074e4 into tfutils:master Jan 30, 2021
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