-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 a bug where xlen larger than 0x7fff was rejected #1280
Conversation
We treated this short value as unsigned and it should have been treated as signed.
Sonatype OSS Index references this PR with CVE-2023-3635. Can you please help understand whether the CVE is legitimate in that there is an exploitable attack vector? The dependency check we use alerts us because of our use of okio:2.8.0, which is transitively pulled in by okhttp:4.9.3 due to our dependency on spring-boot:2.7.13. Is there actually a version of okio with this fix that I could use as drop in replacement of okio:2.8.0? |
Okio 3.4.0 has the fix. An attacker would attack you by serving a malicious file and crashing your program. |
@swankjesse Does this bug exist in the 1.x and 2.x branches as well? |
@barchetta yes both 1.x and 2.x major versions are impacted, and upgrading to 3.4.0 will fix these. |
@barchetta do yo plan on backporting the fix to the 1.x and 2.x branches? |
I tried to backport it to 1.x - #1334. |
* Add okio-bom with version 3.5.0 to dependency management * This fixes a CVE from 3.2.0 related to a type conversion error; see square/okio#1280
* Add okio-bom with version 3.5.0 to dependency management * This fixes a CVE from 3.2.0 related to a type conversion error; see square/okio#1280
Anyone can help me understand how is this CVE legit? If a malformed gzip content (where xlen is greater than 0x7fff) is handed over to okio then it'll throw an |
I think the point is that the uncaught exception from okio could bring down the larger system which uses the okio library, thereby causing denial of service. Obviously it depends on the larger system resiliency. It doesn't automatically mean that your project which uses affected version of okio is vulnerable - that needs to be assessed by you in the context of your project. But as they say it's better be safe than sorry... |
Thanks for the response. Yes, that's my understanding too. If the caller lacks exception handling then this might kill the caller's thread, which might or might not be the main thread. But having an exception handler prevents this. |
Most people don't care about understanding the impact of the bug (including the vulnerability database in which the CVE is filed), they just want the notification from automated tooling analyzing their dependency graph to stop complaining. |
We treated this short value as unsigned and it should have been treated as signed.