Navigation Menu

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: add a compatibility EVP_CIPH_OCB_MODE value (#16214). #17873

Merged
merged 3 commits into from Apr 23, 2019
Merged

fix: add a compatibility EVP_CIPH_OCB_MODE value (#16214). #17873

merged 3 commits into from Apr 23, 2019

Conversation

TaikiAkita
Copy link

@TaikiAkita TaikiAkita commented Apr 19, 2019

Backport of google/boringssl@4b9683. This patch replaces the no-op modes with negative numbers rather than zero. Stream ciphers like RC4 report a "mode" of zero, so code comparing the mode to a dummy value will get confused.

This patch fixed issue #16214.

Release Notes

Notes: Fixed the "rc4" cipher (#16214) (4.1.x).

Backported google/boringssl@4b9683 to 4.1.x branch. This patch
replaces the no-op modes with negative numbers rather than zero.
Stream ciphers like RC4 report a "mode" of zero, so code comparing
the mode to a dummy value will get confused.

This patch fixed issue #16214.
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Apr 19, 2019
@@ -1,3 +1,4 @@
compatibility_evp_ciph_ocb_mode.patch
Copy link
Member

Choose a reason for hiding this comment

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

Was this patch added manually? I'm not sure how this could have been added to the top of the file if the export-patches script was used

Copy link
Author

Choose a reason for hiding this comment

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

Was this patch added manually? I'm not sure how this could have been added to the top of the file if the export-patches script was used

This patch was added manually. Shall I re-add it with the export-patches command?

Copy link
Member

Choose a reason for hiding this comment

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

@TaikiAkita Yep, the flow for making these patches is like this

  • Run gclient sync --your --flags --here
  • Add your commit on top of the checked out boringssl
  • Run git-export-patches -o electron/patches/common/boringssl

👍

Copy link
Author

Choose a reason for hiding this comment

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

@MarshallOfSound

I regenerated the patches with git-export-patches, please have a look.

@TaikiAkita
Copy link
Author

TaikiAkita commented Apr 19, 2019

@MarshallOfSound

I regenerated the patches with git-export-patches, please have a look.

Copy link
Member

@codebytere codebytere left a comment

Choose a reason for hiding this comment

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

LGTM after changes but paging @MarshallOfSound for second opinion!

Copy link
Member

@MarshallOfSound MarshallOfSound left a comment

Choose a reason for hiding this comment

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

This patch is currently flagged as an invalid backport because it is targeting 4.1.

Can you confirm that this fix is not needed in current 5.0 or master branches?

@TaikiAkita
Copy link
Author

TaikiAkita commented Apr 19, 2019

This patch is currently flagged as an invalid backport because it is targeting 4.1.

Can you confirm that this fix is not needed in current 5.0 or master branches?

@MarshallOfSound

This patch is exactly backported from 5.x. The upstream BoringSSL of 5.x branch has this patch already. So this patch is NOT needed in 5.x.

Test with following code:

var cipher = require("crypto").createCipher("rc4", "hello");

In 4.x, an error will occur.
In 5.x, run successfully.

BTW. This patch should also be backported to 4.0.x branch.

@TaikiAkita
Copy link
Author

@codebytere
Now it is ready to be merged. Please help to merge this PR.

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Apr 20, 2019
@TaikiAkita
Copy link
Author

@codebytere
Please merge this PR.

@shiftkey
Copy link
Contributor

@TaikiAkita please address the failing commit status: https://github.com/electron/electron/pull/17873/checks?check_run_id=105806788

@TaikiAkita
Copy link
Author

TaikiAkita commented Apr 23, 2019

This patch is currently flagged as an invalid backport because it is targeting 4.1.
Can you confirm that this fix is not needed in current 5.0 or master branches?

@MarshallOfSound

This patch is exactly backported from 5.x. The upstream BoringSSL of 5.x branch has this patch already. So this patch is NOT needed in 5.x.

Test with following code:

var cipher = require("crypto").createCipher("rc4", "hello");

In 4.x, an error will occur.
In 5.x, run successfully.

BTW. This patch should also be backported to 4.0.x branch.

@shiftkey
Described above. This patch was derived from upstream and can only be applied in 4.x branches, it was NOT derived from other PR (so I can not add the "Backport of #{N}" declaration).

@codebytere codebytere merged commit eccede0 into electron:4-1-x Apr 23, 2019
@release-clerk
Copy link

release-clerk bot commented Apr 23, 2019

Release Notes Persisted

Fixed the "rc4" cipher (#16214).

@welcome
Copy link

welcome bot commented Apr 23, 2019

Congrats on merging your first pull request! 🎉🎉🎉

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.

None yet

4 participants