| Summary: | org.eclipse.equinox.internal.security.storage.Base64 is not threadsafe | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | Matt Lavin <matt_lavin> | ||||
| Component: | Security | Assignee: | Security Inbox <equinox.security-inbox> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | critical | ||||||
| Priority: | P3 | CC: | john.arthorne, ob1.eclipse, remy.suen, tjwatson | ||||
| Version: | 3.7 | ||||||
| Target Milestone: | Juno M2 | ||||||
| Hardware: | PC | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 355400 | ||||||
| Attachments: |
|
||||||
|
Description
Matt Lavin
Seems decodeTable should be final and initialized in a static initializer. Oleg, do you know the history of this version of the org.eclipse.equinox.internal.security.storage.Base64 class. We have many copies of a class called Base64 in Eclipse, but this version looks to be a completely different implementation. The other implementations are: org.eclipse.osgi.internal.signedcontent.Base64 org.eclipse.core.internal.preferences.Base64 org.eclipse.ui.internal.preferences.Base64 These versions do not have this issue. I am wondering if we should just copy one of these versions of Base64 or try to fix this version. (In reply to comment #2) > The other implementations are: > > org.eclipse.osgi.internal.signedcontent.Base64 > org.eclipse.core.internal.preferences.Base64 > org.eclipse.ui.internal.preferences.Base64 > None of those are APIs. At the time we discussed making Base64 processing an API, but that was buried in usual questions on where it is going to reside, how we make other classes to switch to it, etc. Due to this I only briefly looked into other classes. I am not sure if the processing they provide is identical. Unless the changes to secure storage's Base64 are done in a way the preserves it "input -> output" behavior, it will break the ability to decrypt currently stored data. Created attachment 201337 [details] proposed fix (In reply to comment #3) > None of those are APIs. At the time we discussed making Base64 processing an > API, but that was buried in usual questions on where it is going to reside, how > we make other classes to switch to it, etc. > > Due to this I only briefly looked into other classes. I am not sure if the > processing they provide is identical. Unless the changes to secure storage's > Base64 are done in a way the preserves it "input -> output" behavior, it will > break the ability to decrypt currently stored data. Do to your concerns the safest fix is to fix this version. Here is my proposed fix. (In reply to comment #4) > Created attachment 201337 [details] > proposed fix +1, looks good. Released to master with: http://git.eclipse.org/c/equinox/rt.equinox.bundles.git/commit/?id=0e82ed0a2b8b648b26d2ab5a40e2acccda1d2142 I forgot to update the version. That is done with commit: http://git.eclipse.org/c/equinox/rt.equinox.bundles.git/commit/?id=9dfa830ee7dcc2978dc6a34bcd801a1577cc4eab |