Skip to content

[cherry-pick][2.57.2] eMudhra CA compromise, aiohttp and Brotli security fixes - #68013

Closed
elliot-barn wants to merge 1 commit into
releases/2.57.2from
elliot-barn/cherry-pick-2.57.2-emudhra-brotli
Closed

elliot-barn wants to merge 1 commit into
releases/2.57.2from
elliot-barn/cherry-pick-2.57.2-emudhra-brotli

Conversation

@elliot-barn

Copy link
Copy Markdown
Collaborator

Description

Brings the 2.58.2 security fixes (#67962) to releases/2.57.2:

How it was applied

A direct cherry-pick of fed97328bf conflicts in about 110 files, nearly all locks, because 2.57 is two minors behind 2.59. So the source changes are applied by hand and the locks are regenerated:

Area Change
docker/base-deps, docker/base-slim Dockerfiles Were identical to 2.58.1's, so they now match releases/2.58.2 exactly: certifi 2026.10.19 and pip 26.2.2 via conda, brotli-python>=1.2.1, uv pinned to 0.13.4, py3.10 PyPI fallbacks for pip and Brotli.
Windows and macOS wheel builds pip 26.2.2 and uv 0.13.4.
requirements.txt, test-requirements.txt, setup.py aiohttp floor 3.13.3 → 3.14.4.
security-requirements.txt Adds floors for aiohttp, brotli, certifi and virtualenv.
requirements_compiled.txt, requirements_compiled_py3.14.txt The same nine pins as 2.58.2: aiohttp 3.14.4, brotli 1.2.1, certifi 2026.10.19, virtualenv 21.14.12 with distlib, packaging, python-discovery and typing-extensions, and yarl 1.25.1. The version and hash blocks are taken from 2.58.2, and the # via lines are 2.57's. On this line aiohttp moves from 3.13.5.
Locks Regenerated with raydepsets build --all-configs. Some locks aren't constrained by the compiled files: TPU base deps, ray-llm testdeps, docbuild, datatfds, and the multimodal and llm_batch release locks. For those, I dropped the stale entries first so uv re-resolves them, since uv otherwise keeps the existing pins.

Across all locks, the only packages that change are the targets above, plus filelock and platformdirs (required by the virtualenv bump in the byod release locks) and langchain-core (ray-llm testdeps, as on 2.59.1).

Not ported: 2.59's pinned RUNTIME_ENV_AGENT_PIP_PACKAGES in setup.py. On 2.57 the runtime env agent installs aiohttp unpinned, so it already gets a fixed version.

Left on old pins, same as 2.58.2 and master: ray_img_py39.lock, aiohttp in ci_windows_depset.lock, requirements_ml_byod_3.10.txt, aiohttp in release/requirements_py310.txt, and the doc pip-freeze snapshots.

Related issues

Related to #67962 (2.58.2), #67487 (2.59.1), #67596 and #67789.

Testing

Command Result
bazel run //ci/raydepsets:raydepsets -- build --all-configs --check Passed: "Lock files are up to date."
pre-commit run --files <changed non-lock files> Passed

AI assistance (Claude Code) was used to prepare this change.

🤖 Generated with Claude Code

…ity fixes

Ports the 2.58.2 security fixes (#67962) onto releases/2.57.2:
- eMudhra CA compromise and aiohttp DoS fixes, from the 2.59.1 squash
  fed9732 (#67487: #67295, #67301, #67298, #67305, #67304, #67350).
- Brotli CVE-2026-111497: #67596 (conda brotli-python in base images)
  and #67789 (brotli 1.2.1 pins).

A direct cherry-pick conflicts in ~110 lock files because 2.57 is two
minors behind 2.59, so the changes are applied by hand:
- docker/base-deps and base-slim Dockerfiles: identical to 2.58.1's
  before the fix, so they now match releases/2.58.2 exactly (certifi
  2026.10.19 + pip 26.2.2 via conda, brotli-python>=1.2.1, uv 0.13.4,
  py3.10 PyPI fallbacks).
- Windows/macOS wheel builds: pip 26.2.2, uv 0.13.4.
- aiohttp floor 3.13.3 -> 3.14.4; security-requirements gains aiohttp,
  brotli, certifi and virtualenv floors.
- requirements_compiled(_py3.14).txt: the same nine pins as 2.58.2
  (aiohttp 3.14.4, brotli 1.2.1, certifi 2026.10.19, virtualenv 21.14.12
  and its deps, yarl 1.25.1), version and hash blocks taken from 2.58.2.
- All locks regenerated with raydepsets build --all-configs. Locks not
  constrained by the compiled files (TPU base deps, ray-llm testdeps,
  docbuild, datatfds, multimodal and llm_batch release locks) had the
  stale package entries dropped first so uv re-resolves them.

setup.py's 2.59 RUNTIME_ENV_AGENT_PIP_PACKAGES pin is not ported: on 2.57
the runtime env agent installs aiohttp unpinned.

Old pins that are also left on 2.58.2 and master stay: ray_img_py39.lock,
ci_windows_depset.lock (aiohttp), requirements_ml_byod_3.10.txt,
release/requirements_py310.txt (aiohttp), doc pip-freeze snapshots.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: elliot-barn <[email protected]>
@elliot-barn
elliot-barn requested review from a team, edoakes and richardliaw as code owners November 10, 2026 09:22
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

The number of changes in this pull request is too large for Gemini Code Assist to generate a review.

@cursor

cursor Bot commented Nov 10, 2026

Copy link
Copy Markdown

This PR is too large for Bugbot to review. It changes 42,893 lines and 4,089,367 characters. Split the change into smaller pull requests to get a review.

@ray-gardener ray-gardener Bot added core Issues that should be addressed in Ray Core release-test release test security The issue or proposal related to security labels Nov 10, 2026
@elliot-barn

Copy link
Copy Markdown
Collaborator Author

Split into #68040 (eMudhra + aiohttp) and #68041 (Brotli, stacked on #68040). The combined tree is identical to this PR's.

elliot-barn added a commit that referenced this pull request Nov 11, 2026
…68040)

## Description

Brings the eMudhra CA compromise and aiohttp DoS fixes to
`releases/2.57.2`. They come from the 2.59.1 squash `fed97328bf`
(#67487: #67295, #67301, #67298, #67305, #67304, #67350), as on 2.58.2
(#67962).

This is the first of two stacked PRs that replace #68013. The Brotli
fixes are in the follow-up PR, which is based on this branch.

## How it was applied

A direct cherry-pick of `fed97328bf` conflicts in about 110 files,
nearly all locks, because 2.57 is two minors behind 2.59. So the source
changes are applied by hand and the locks are regenerated:

- **`docker/base-deps`, `docker/base-slim` Dockerfiles:** the same lines
as `fed97328bf` adds: certifi 2026.10.19 and pip 26.2.2 via conda, uv
pinned to 0.13.4, and pip from PyPI on py3.10.
- **Windows and macOS wheel builds:** pip 26.2.2 and uv 0.13.4.
- **`requirements.txt`, `test-requirements.txt`, `setup.py`:** aiohttp
floor 3.13.3 → 3.14.4.
- **`security-requirements.txt`:** adds aiohttp, certifi and virtualenv
floors.
- **`requirements_compiled.txt`, `requirements_compiled_py3.14.txt`:**
aiohttp 3.14.4, certifi 2026.10.19, virtualenv 21.14.12 with distlib,
packaging, python-discovery and typing-extensions, and yarl 1.25.1. The
version and hash blocks are taken from 2.58.2.
- **`requirements_compiled.txt`** regenerated with `ci/ci.sh
compile_pip_dependencies` (py3.11), so the `# via` lines match. No pins
move.
- **Locks:** regenerated with `raydepsets build --all-configs`. Some
locks aren't constrained by the compiled files: TPU base deps, ray-llm
testdeps, docbuild, datatfds, and the multimodal and llm_batch release
locks. In those, the bumped packages are set to the exact versions from
`releases/2.58.2` (virtualenv 21.14.12, distlib 0.4.3, filelock 3.29.0,
platformdirs 4.9.6, python-discovery 1.6.1, typing-extensions 4.16.0,
certifi 2026.10.19, aiohttp 3.14.4) before the regen, so they match the
source PRs instead of floating to the newest releases.
`large_image_embedding_py3.10.lock` is stale on 2.58.2, so it follows
its sibling multimodal locks.
- **`ray_img_py39.lock`:** certifi 2026.10.19, as on 2.58.2, 2.59.1 and
master. Nothing on 2.57.x builds or reads this lock (`#59484` removed
py3.9 and `#59080` re-added the file by accident), but it ships in the
tree.

**Not ported:** 2.59's pinned `RUNTIME_ENV_AGENT_PIP_PACKAGES` in
`setup.py`. On 2.57 the runtime env agent installs `aiohttp` unpinned.

**Left on old pins, same as 2.58.2 and master:** aiohttp, virtualenv and
yarl in `ray_img_py39.lock`, aiohttp in `ci_windows_depset.lock`,
`requirements_ml_byod_3.10.txt`, aiohttp in
`release/requirements_py310.txt`, and the doc pip-freeze snapshots.

## Related issues

Related to #67487 (2.59.1) and #67962 (2.58.2). Together with the Brotli
PR, this supersedes #68013.

## Testing

- `bazel run //ci/raydepsets:raydepsets -- build --all-configs --check`
passed: "Lock files are up to date."
- `ci/ci.sh compile_pip_dependencies` (py3.11): only `# via` lines
change.
- Every bumped package compared with `releases/2.58.2`: versions and
hashes match, except the intentionally updated `large_image_embedding`.
- No brotli line changes compared with `releases/2.57.2`.

AI assistance (Claude Code) was used to prepare this change.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: elliot-barn <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
elliot-barn added a commit that referenced this pull request Nov 11, 2026
…68041)

## Description

Brings the Brotli CVE-2026-111497 fixes to `releases/2.57.2`:

- **#67596:** conda `brotli-python>=1.2.1` in the `base-deps` and
`base-slim` images. py3.10 has no conda-forge 1.2.1 build, so it removes
conda's copy and installs the PyPI `Brotli==1.2.1` wheel.
- **#67789:** a `brotli>=1.2.1` floor in `security-requirements.txt`,
and brotli 1.2.1 in `requirements_compiled(_py3.14).txt` and every lock
that pins it.

**Stacked on #68040** (eMudhra and aiohttp), because both PRs edit the
same `conda install` lines in the Dockerfiles. Merge #68040 first, then
retarget this PR to `releases/2.57.2`.

After this PR, both Dockerfiles match `releases/2.58.2` exactly. This
pair replaces #68013.

## Related issues

Related to #67596, #67789 and #67962 (2.58.2). Together with #68040,
this supersedes #68013.

## Testing

- Every non-Dockerfile line this PR changes is a `brotli` pin; nothing
else moves.
- `ci/ci.sh compile_pip_dependencies` (py3.11): only brotli's `# via`
line changes.
- `bazel run //ci/raydepsets:raydepsets -- build --all-configs`, then
`--check`: "Lock files are up to date."

AI assistance (Claude Code) was used to prepare this change.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: elliot-barn <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issues that should be addressed in Ray Core release-test release test security The issue or proposal related to security

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant