Skip to content

fix: bump netty to 4.1.118 in mmlspark/release demo image (MSRC 110886)#2557

Merged
BrendanWalsh merged 1 commit into
microsoft:masterfrom
BrendanWalsh:fix/msrc-110886-netty-bump
May 5, 2026
Merged

fix: bump netty to 4.1.118 in mmlspark/release demo image (MSRC 110886)#2557
BrendanWalsh merged 1 commit into
microsoft:masterfrom
BrendanWalsh:fix/msrc-110886-netty-bump

Conversation

@BrendanWalsh
Copy link
Copy Markdown
Collaborator

Summary

Addresses MSRC case 110886 / incident 31000000570827 -- the finder reports io.netty_netty-codec-http2 and org.eclipse.jetty_jetty-io are still flagged as vulnerable in mcr.microsoft.com/mmlspark/release despite the Spark 3.5.0 -> 3.5.4 bump in #2520.

This PR fixes the netty half of that case while staying on Spark 3.5.

Changes in tools/docker/demo/Dockerfile

  1. Replace netty 4.1.96.Final with 4.1.118.Final in /opt/spark/jars/. Spark 3.5.x pins netty 4.1.96 upstream and the entire 3.5.x line never bumped it. Since netty 4.1.x is binary-compatible, we drop in 4.1.118 right after the Spark extract step. Covers all netty-* artifacts that ship in upstream Spark 3.5.4, including netty-codec-http2 (the artifact named on the MSRC case) and the native epoll/kqueue jars for linux-x86_64, linux-aarch_64, osx-x86_64, osx-aarch_64.

  2. Drop pyspark from the conda install line. That argument was silently pulling in a complete second Spark install (PySpark 4.0.1) into /usr/local/lib/python*/site-packages/pyspark/ that nothing in the demo actually uses -- SPARK_HOME and PYTHONPATH both point at /opt/spark. The duplicate install was doubling the surface area scanners report on.

CVEs covered by the netty bump

  • CVE-2023-44487 (HTTP/2 Rapid Reset) -- fixed in 4.1.100
  • CVE-2024-29025 (HttpPostRequestDecoder OOM) -- fixed in 4.1.108
  • CVE-2025-24970 (SslHandler native crash) -- fixed in 4.1.118
  • Plus several lower-severity issues in between

Local validation

Built locally from this branch and inspected the resulting image:

Check Result
Old netty-*-4.1.96.Final*.jar in /opt/spark/jars/ 0 matches
New netty-*-4.1.118.Final*.jar (incl. netty-codec-http2) full set present (19 jars)
Duplicate conda PySpark install at /usr/local/lib/.../pyspark/ gone
/opt/spark version Spark 3.5.4 (unchanged)
spark-submit --version works
spark.range(5).count() smoke test returns 5

Out of scope (tracked separately)

The other half of the MSRC case -- org.eclipse.jetty_jetty-io 9.4.43 -- is shaded inside hadoop-client-runtime-3.3.4.jar under org.apache.hadoop.shaded.org.eclipse.jetty.*. It cannot be hot-swapped the way netty can; it requires either migrating the demo image to a spark-3.5.x-bin-without-hadoop tarball plus a user-provided Hadoop 3.4.1 (which ships jetty 9.4.53), or waiting for the spark4.1 branch to ship. Follow-up PR will track that.

Risk

Low. netty 4.1.x guarantees binary compatibility, the swap happens at install time so the build is reproducible, and all upstream Spark 4.x releases already use 4.1.118+ on top of the same Spark codebase.

…ease demo image

Addresses MSRC case 110886 / incident 31000000570827.

The mmlspark/release image (built from tools/docker/demo/Dockerfile) ships
Spark 3.5.4, which pins netty 4.1.96.Final. That version is flagged for
multiple CVEs (CVE-2023-44487, CVE-2024-29025, CVE-2025-24970, ...). Spark
has not bumped netty in any 3.5.x release.

netty 4.1.x is binary-compatible, so we replace all netty-*-4.1.96.Final*.jar
files in /opt/spark/jars/ with 4.1.118.Final right after the Spark extract.
This includes netty-codec-http2 (the specific artifact named by the finder).

Also removes 'pyspark' from the conda install line. It was pulling a
complete second Spark install (PySpark 4.0.1) into
/usr/local/lib/python*/site-packages/pyspark/ that nothing in the demo image
actually used (SPARK_HOME points at /opt/spark) and that doubled the surface
area scanners report on.

Validated locally:
- /opt/spark/jars/netty-*-4.1.96.Final*.jar: 0 matches after build
- /opt/spark/jars/netty-*-4.1.118.Final*.jar: full set present
- /usr/local/lib/.../pyspark: no longer exists
- spark-submit --version: works
- spark.range(5).count(): returns 5

Jetty (shaded inside hadoop-client-runtime-3.3.4.jar at 9.4.43) is OUT OF
SCOPE for this PR; that requires a Spark/Hadoop swap and will be tracked
separately.
Copilot AI review requested due to automatic review settings May 5, 2026 02:43
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

Hey @BrendanWalsh 👋!
Thank you so much for contributing to our repository 🙌.
Someone from SynapseML Team will be reviewing this pull request soon.

We use semantic commit messages to streamline the release process.
Before your pull request can be merged, you should make sure your first commit and PR title start with a semantic prefix.
This helps us to create release messages and credit you for your hard work!

Examples of commit messages with semantic prefixes:

  • fix: Fix LightGBM crashes with empty partitions
  • feat: Make HTTP on Spark back-offs configurable
  • docs: Update Spark Serving usage
  • build: Add codecov support
  • perf: improve LightGBM memory usage
  • refactor: make python code generation rely on classes
  • style: Remove nulls from CNTKModel
  • test: Add test coverage for CNTKModel

To test your commit locally, please follow our guild on building from source.
Check out the developer guide for additional guidance on testing your change.

@BrendanWalsh
Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.66%. Comparing base (d0bbeae) to head (83a7402).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2557      +/-   ##
==========================================
- Coverage   84.69%   84.66%   -0.03%     
==========================================
  Files         335      335              
  Lines       17753    17753              
  Branches     1615     1615              
==========================================
- Hits        15036    15031       -5     
- Misses       2717     2722       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@BrendanWalsh BrendanWalsh merged commit b4ead5e into microsoft:master May 5, 2026
82 of 83 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.

2 participants