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 TLS pad buffer zeroization #8068

Merged

Conversation

paul-elliott-arm
Copy link
Member

@paul-elliott-arm paul-elliott-arm commented Aug 11, 2023

Description

Fix an issue whereby the pad buffer was not completely zeroized in some cases during TLS handshake.

PR checklist

Please tick as appropriate and edit the reasons (e.g.: "backport: not needed because this is a new feature")

  • changelog provided , or not required
  • backport done, or not required - code does not exist in 2.28
  • tests provided, or not required - not something that is easily testable, XXX err, actually see Check mbedtls_platform_zeroize() calls #8143

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
@paul-elliott-arm paul-elliott-arm added needs-review Every commit must be reviewed by at least two team members, component-tls needs-ci Needs to pass CI tests needs-reviewer This PR needs someone to pick it up for review single-reviewer This PR qualifies for having only one reviewer priority-high High priority - will be reviewed soon size-xs Estimated task size: extra small (a few hours at most) labels Aug 11, 2023
@paul-elliott-arm paul-elliott-arm changed the title Fix tls pad buuffer zeroization Fix TLS pad bufer zeroization Aug 11, 2023
Copy link
Contributor

@tom-cosgrove-arm tom-cosgrove-arm left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@tom-cosgrove-arm tom-cosgrove-arm left a comment

Choose a reason for hiding this comment

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

LGTM

@tom-cosgrove-arm tom-cosgrove-arm added approved Design and code approved - may be waiting for CI or backports and removed needs-review Every commit must be reviewed by at least two team members, needs-reviewer This PR needs someone to pick it up for review labels Aug 11, 2023
@daverodgman daverodgman removed the single-reviewer This PR qualifies for having only one reviewer label Aug 14, 2023
@daverodgman daverodgman self-requested a review August 14, 2023 08:34
@@ -0,0 +1,3 @@
Bugfix
* Fix a case where potentially sensitive information would not be completely
zeroized during TLS handshake.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we be more specific about the affected scenarios? E.g., is it 1.2 only, is it only for certain key exchanges, etc etc?

Copy link
Member Author

Choose a reason for hiding this comment

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

I have tried to be specific as I can be - yes this is TLS1.2 only, but its not dependant on hash used, all paths lead to this.

@daverodgman daverodgman added needs-work and removed needs-ci Needs to pass CI tests labels Aug 14, 2023
@gilles-peskine-arm gilles-peskine-arm removed the approved Design and code approved - may be waiting for CI or backports label Aug 16, 2023
@paul-elliott-arm paul-elliott-arm changed the title Fix TLS pad bufer zeroization Fix TLS pad buffer zeroization Sep 1, 2023
Copy link
Contributor

@daverodgman daverodgman left a comment

Choose a reason for hiding this comment

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

Mostly LGTM

@@ -0,0 +1,3 @@
Bugfix
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should be Security not Bugfix

Suggested change
Bugfix
Security

@@ -0,0 +1,3 @@
Bugfix
* Fix a case where potentially sensitive information would not be completely
zeroized during TLS 1.2 handshake, in both server and client configuration.
Copy link
Contributor

Choose a reason for hiding this comment

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

(1) this should be Security
(2) this should mention "in memory" as it's user-facing: it could be possible to interpret this as some old data leaking into a message on the wire "during TLS 1.2 handshake"

@daverodgman
Copy link
Contributor

@paul-elliott-arm this still needs a Changelog update?

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
@paul-elliott-arm
Copy link
Member Author

@paul-elliott-arm this still needs a Changelog update?

Sorry, moving too fast and forgot to amend the actual changes.

Copy link
Contributor

@tom-cosgrove-arm tom-cosgrove-arm left a comment

Choose a reason for hiding this comment

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

LGTM

@tom-cosgrove-arm tom-cosgrove-arm added approved Design and code approved - may be waiting for CI or backports needs-ci Needs to pass CI tests labels Sep 1, 2023
@daverodgman daverodgman added this pull request to the merge queue Sep 1, 2023
Merged via the queue into Mbed-TLS:development with commit 16a7672 Sep 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Design and code approved - may be waiting for CI or backports component-tls needs-ci Needs to pass CI tests priority-high High priority - will be reviewed soon size-xs Estimated task size: extra small (a few hours at most)
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants