Skip to content

Removed Unsafe Buffer Duplication#6470

Merged
alzimmermsft merged 7 commits into
Azure:masterfrom
alzimmermsft:AzCore_InvestigateRequiresTestFailure
Jan 9, 2020
Merged

Removed Unsafe Buffer Duplication#6470
alzimmermsft merged 7 commits into
Azure:masterfrom
alzimmermsft:AzCore_InvestigateRequiresTestFailure

Conversation

@alzimmermsft

Copy link
Copy Markdown
Member

Fixes #5912

Fixes an issue where testing Blob Cryptography could fail when interacting with a DirectByteBuffer. BlobDecryptionPolicy was using an optimization where it duplicated a ByteBuffer, duplication is a shallow reference copy. The copied buffer could be mutated, such as the case of buffered pools in Netty Reactor, which would result in the content having different state than expected. The optimization has been removed and the decrypted data is being stored in a newly allocated buffer every time.

sima-zhu
sima-zhu previously approved these changes Nov 25, 2019
rickle-msft
rickle-msft previously approved these changes Nov 25, 2019
@alzimmermsft
alzimmermsft dismissed stale reviews from rickle-msft and sima-zhu via 92f7109 November 27, 2019 17:20
@alzimmermsft

Copy link
Copy Markdown
Member Author

@rickle-msft Should I close or merge this PR?

@rickle-msft

Copy link
Copy Markdown
Contributor

If we still think the original is unsafe, let's merge the fix.

@alzimmermsft
alzimmermsft merged commit dafc161 into Azure:master Jan 9, 2020
@alzimmermsft
alzimmermsft deleted the AzCore_InvestigateRequiresTestFailure branch January 9, 2020 21:14
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.

[BUG] Requires live mode messes with data in certain scenarios.

3 participants