Skip to content

Upgrade Jetty to 12.0.29 to resolve CVE-2025-5115#132

Merged
tdcmeehan merged 1 commit into
prestodb:masterfrom
mehradpk:jetty-upgrade-12.0.29
Nov 25, 2025
Merged

Upgrade Jetty to 12.0.29 to resolve CVE-2025-5115#132
tdcmeehan merged 1 commit into
prestodb:masterfrom
mehradpk:jetty-upgrade-12.0.29

Conversation

@mehradpk

@mehradpk mehradpk commented Nov 7, 2025

Copy link
Copy Markdown

Previous attempt to resolve this CVE by upgrading to 12.1.1 (#128) encountered issues.

Changes

  1. This PR takes a more safer approach by staying within the 12.0.x line while still addressing the vulnerability.

  2. PR includes fix to a test case failure TestJettyHttpsClientSpnego.testNegotiateAuthScheme() caused by an upstream Jetty behavior change -

The change came as part of jetty 12.0.19 release. Jetty team found a bug jetty/jetty.project#12916 where InputStreamResponseListener remains open in case of errors/exceptions, so as part of refactoring they also changed the behaviour of wrapping RuntimeException as IOException. Now, RuntimeException is re-thrown as it is without wrapping.

jetty/jetty.project#12931

if(failure != null)
    throw IO.rethrow(failure); 

UncheckedIOException wraps IOException in airlift - StringResponseHandler.handle()

catch (IOException e) {
     throw new UncheckedIOException(e);
}

thus earlier the test case was passing but post this change RuntimeException is directly thrown leads to test case failure.

As a fix, the expected exception is changed from IOException to RuntimeException.

Testing

Local Connector & Server Verification

  • Presto server starts up successfully with the updated dependencies.
  • Hive connector queries run without issues

Hive Distributed Queries Test Suite
Successfully executed com.facebook.presto.hive.TestHiveDistributedQueries locally. Tests completed without failures or errors.

@mehradpk mehradpk requested a review from a team as a code owner November 7, 2025 08:17
@linux-foundation-easycla

linux-foundation-easycla Bot commented Nov 7, 2025

Copy link
Copy Markdown

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: mehradpk / name: Deepak Mehra (20d0a64)

@sourcery-ai

sourcery-ai Bot commented Nov 7, 2025

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR safely addresses CVE-2025-5115 by staying on the Jetty 12.0.x line: the Jetty version is updated to 12.0.29 in the pom, and the resolver implementation is adjusted to match the superclass method signature.

Entity relationship diagram for Jetty version property update in pom.xml

erDiagram
    PROJECT ||--|| JETTY_VERSION : uses
    JETTY_VERSION {
        string version
    }
    PROJECT {
        string name
        string dep_jetty_version
    }
Loading

Class diagram for updated JettyAsyncSocketAddressResolver method signature

classDiagram
class JettyAsyncSocketAddressResolver {
    +resolve(host: String, port: int, promise: Promise<List<InetSocketAddress>>)
}
class SuperClass {
    +resolve(host: String, port: int, promise: Promise<List<InetSocketAddress>>)
}
JettyAsyncSocketAddressResolver --|> SuperClass
Loading

File-Level Changes

Change Details Files
Simplify and align the async resolver method signature
  • Removed the unused context parameter from resolve() signature
  • Updated the override signature to match super.resolve(host, port, promise)
  • Adjusted the call to super.resolve() accordingly
http-client/src/main/java/com/facebook/airlift/http/client/jetty/JettyAsyncSocketAddressResolver.java
Update Jetty dependency version
  • Changed dep.jetty.version from 12.1.1 to 12.0.29
pom.xml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@agrawalreetika

agrawalreetika commented Nov 13, 2025

Copy link
Copy Markdown
Member

@mehradpk As I see airlift CI runs fine - https://github.com/prestodb/airlift/actions/runs/19295511489
Do you have the Presto Draft PR with this upgrade to see if CI is passing fine there?

@mehradpk

Copy link
Copy Markdown
Author

@agrawalreetika Yes. I've opened a PR now - prestodb/presto#26609

@agrawalreetika

Copy link
Copy Markdown
Member

prestodb/presto#26609

Instead of just upgrading Jetty in Presto, use your airlift version via jitpack in your Presto PR

@mehradpk

mehradpk commented Nov 24, 2025

Copy link
Copy Markdown
Author

@agrawalreetika Airlift Jitpack build is successful. Even though the JitPack build succeeds, using that build inside Presto leads to multiple issues:

  1. drift-maven-plugin resolves the wrong coordinates
    The plugin internally uses
    groupId = com.facebook.airlift and version = 0.224-SNAPSHOT.
    When Presto builds, Maven tries to resolve the plugin using the JitPack groupId and version, which results in a wrong descriptor error.

  2. Airlift Launcher resolves coordinates that JitPack does not publish
    airbase hardcodes the groupId com.facebook.airlift, so the launcher is pulled using those coordinates.
    JitPack publishes Airlift under com.github.mehradpk.airlift-wxd, so Maven cannot find the matching launcher artifacts leads to presto build failure

presto-thrift-testing-udf-server and other modules fails with the JitPack build.
Because of these mismatches, the JitPack Airlift build cannot be reliably consumed by Presto.

However, the full TestHiveDistributedQueries test suite and manual local testing have been performed, and both completed successfully.

@mehradpk mehradpk force-pushed the jetty-upgrade-12.0.29 branch from 084810e to 59dda39 Compare November 24, 2025 13:30

@agrawalreetika agrawalreetika left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the update @mehradpk

Code changes lgtm, I think if there is complexity in testing complete Presto CI without publishing, then we can try the Presto PR update after publishing the changes of airlift.

@mehradpk mehradpk force-pushed the jetty-upgrade-12.0.29 branch from 59dda39 to 20d0a64 Compare November 25, 2025 06:40
@tdcmeehan tdcmeehan merged commit abcd39e into prestodb:master Nov 25, 2025
3 checks passed
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.

3 participants