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

Reset session in/out pointers in mbedtls_ssl_session_reset() #1942

Merged
merged 3 commits into from
Aug 21, 2018

Conversation

hanno-becker
Copy link

Fixes #1941.

@hanno-becker hanno-becker requested a review from mpg August 13, 2018 15:39
@mpg mpg added needs-review Every commit must be reviewed by at least two team members, needs-backports Backports are missing or are pending review and approval. labels Aug 14, 2018
mpg
mpg previously approved these changes Aug 14, 2018
Copy link
Contributor

@mpg mpg left a comment

Choose a reason for hiding this comment

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

Thanks for catching an fixing this. I'll add a test in #1939 by reconnecting, which will exercise session_reset() followed by get_record_expansion().

ChangeLog Outdated
@@ -10,6 +10,8 @@ Bugfix
* Add ecc extensions only if an ecc based ciphersuite is used.
This improves compliance to RFC 4492, and as a result, solves
interoperability issues with BouncyCastle. Raised by milenamil in #1157.
* Fix potential segmentation fault in mbedtls_ssl_get_max_frag_len()
Copy link
Contributor

Choose a reason for hiding this comment

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

Why would there be a segmentation fault? Please be more specific. Null pointer dereference?

Copy link
Author

@hanno-becker hanno-becker Aug 14, 2018

Choose a reason for hiding this comment

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

@gilles-peskine-arm Ok, it would be more precise to say that it's a potential use-after-free. Shall I change the wording accordingly?

Copy link
Contributor

Choose a reason for hiding this comment

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

Now that Gilles mentions it, I'm thinking perhaps we should always avoid the wording "segmentation fault" regardless of the cause, as it's a platform-specific behaviour.

Copy link
Author

Choose a reason for hiding this comment

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

@mpg
Copy link
Contributor

mpg commented Aug 16, 2018

@hanno-arm Note: #1939 is now based on this. In order to avoid unnecessary complexity, please refrain from rewriting history in this PR from now on.

@mpg
Copy link
Contributor

mpg commented Aug 16, 2018

Note: commit 19c62f9 in #1939 adds a non-regression test for this.

@mpg mpg added approved Design and code approved - may be waiting for CI or backports and removed needs-backports Backports are missing or are pending review and approval. needs-review Every commit must be reviewed by at least two team members, labels Aug 17, 2018
@Patater Patater merged commit 9dc3be7 into Mbed-TLS:development Aug 21, 2018
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 bug component-tls
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants