Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Security Fix: Okio CVE-2023-3635 + OkHttp Jar Update #23796
Security Fix: Okio CVE-2023-3635 + OkHttp Jar Update #23796
Changes from all commits
4bbd3de
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Mariamalmesfer Please do not ignore depdendency conflicts. It causes problems in projects using various Presto libraries as a dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#24459
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We ignored this because OkHttp brings in two versions of this dependency. It seems to be entirely within the OkHttp libraries: #23796 (comment)
If our enforcer plugin complains about this, how would you fix it? It seems to be a problem with the upstream dependency and not something Presto should control.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a known issue upstream but they don't seem to plan on fixing it in the 4.x line. square/okhttp#8288 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the runtime you cannot have two versions of the same class. At the end of the day the VM will have to pick one, possibly in a non deterministic way. Silencing the check doesn't make the problem go away. We need to pick a single version explicitly and exclude the other one to resolve the problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ZacBlanco I looked at a problem a little bit more. As you mentioned it looks like
okio-jvm
depends on a different version of thekotlin-stdlib-jdk8
and thekotlin-stdlib-common
libraries.okio-jvm
depends on version1.9.10
while theokhttp
depends on1.8.21
.Consider excluding
kotlin-stdlib-jdk8
,kotlin-stdlib-common
from theokio-jvm
in the dependency management section of the main pom:And including this dependency in the presto-client/pom.xml:
Unfortunately once you do this the dependency checker complains that the
okio-jvm
is unused. However due to Kotlin quirks it has to stay in compile scope. To workaround that consider referencing a class from theokio-jvm
in a Dummy class:This should hopefully resolve the conflict. This approach is better as it doesn't push the problem down to the
presto-jdbc
consumers.Additionally you need to shade kotlin dependencies (kotlin.) as well as Jetbrains annotations (org.intellij., org.jetbrains.*) here to avoid class name conflicts in presto-jdbc.