Repository navigation
[cherry-pick][2.57.2] eMudhra CA compromise + aiohttp security fixes - #68040
Conversation
Ports the eMudhra CA compromise and aiohttp DoS fixes from the 2.59.1 squash fed9732 (#67487: #67295, #67301, #67298, #67305, #67304, #67350) onto releases/2.57.2. The Brotli fixes follow in a separate PR. 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: same hunks as fed9732 (certifi 2026.10.19 + pip 26.2.2 via conda, uv 0.13.4, py3.10 pip from PyPI). - Windows/macOS wheel builds: pip 26.2.2, uv 0.13.4. - aiohttp floor 3.13.3 -> 3.14.4; security-requirements gains aiohttp, certifi and virtualenv floors. - requirements_compiled(_py3.14).txt: aiohttp 3.14.4, 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 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]>
|
Note The number of changes in this pull request is too large for Gemini Code Assist to generate a review. |
|
This PR is too large for Bugbot to review. It changes 42,381 lines and 4,084,168 characters. Split the change into smaller pull requests to get a review. |
sai-miduthuri
left a comment
There was a problem hiding this comment.
I checked this against the 2.59.1 squash fed97328bf (#67487), the six master commits and the 2.58.2 port (#67962). I left Brotli to #68041. No security fix is missing: every aiohttp, certifi, virtualenv, pip and uv change from the six PRs that applies to 2.57.2 is here. There are three small gaps:
python/deplocks/ray_img/ray_img_py39.lockkeeps certifi 2025.1.31. On master, #67295 moves it to 2026.10.19, and #67962 and #67487 do the same on 2.58.2 and 2.59.1. Nothing on 2.57.2 references this lock, so nothing installs it. But the description's "Left on old pins, same as 2.58.2 and master" is only true for its aiohttp, virtualenv and yarl. Either copy over the certifi entry (2.59.1's version and hash lines are the same as master's) or adjust the description.- Some of #67301's companion bumps aren't in the locks that were regenerated by dropping entries. On master, #67301 moves filelock to 3.29.0, platformdirs to 4.9.6 and typing-extensions to 4.16.0 along with virtualenv. Here they stay at 3.24.3, 4.9.2 and 4.15.0 in the TPU base-deps, ray-llm testdeps, datatfds and llm_batch locks, because only the target packages' entries were dropped. uv accepts them with virtualenv 21.15.6, and none of them affect the CVEs. So it's a difference from the source PR rather than a missing fix, but it may be worth a line in the description.
- Nit:
requirements_compiled.txtkeeps the old# viacomments. The versions and hashes match 2.59.1 exactly. But #67301 and #67304 also add-r python/requirements/security-requirements.txtunder aiohttp and virtualenv andvirtualenvunder packaging, and they removepython-discoveryunder platformdirs. The next compile would make these changes.
What checks out:
- This PR changes exactly the 122 files that the 2.59.1 squash changed and that exist on 2.57.2. It covers every file the six master PRs touch on 2.57.2 except
ray_img_py39.lock. - In all 21 non-lock files, the added lines match the 2.59.1 squash. Both Dockerfiles are identical to 2.59.1's, and the version floors match master.
- Leaving out the
RUNTIME_ENV_AGENT_PIP_PACKAGESpin is right. #64056 isn't on 2.57.2, and there the agent installsaiohttpunpinned. - In every lock on this branch, aiohttp, certifi, virtualenv and yarl are at or above the fixed versions, except in files that are just as old on 2.58.2, 2.59.1 and master. No unrelated packages change.
- I compared the 988 changed entries of these packages with 2.58.2, 2.59.1 and master. Every version that also appears there has identical hashes.
- The langchain-core change from 0.3.84 to 0.3.76 in the ray-llm testdeps locks matches #67301.
Outside this PR's scope: 2.58.2 and master have an idna>=3.15 floor, while 2.57.2's compiled requirements have idna 3.12. That floor comes from #64056, which isn't on this branch.
…generate compiled Addresses review on #68040: - Unconstrained locks (TPU base deps, ray-llm testdeps, datatfds, llm_batch, multimodal byod py3.10) had floated to the newest releases when re-resolved. Set the #67301/#67295/#67304 package set to the 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. large_image_embedding (stale on 2.58.2) follows its sibling locks. - certifi 2026.10.19 in ray_img_py39.lock (unused but shipped, as on 2.58.2/2.59.1/master), ci_windows_depset.lock and docbuild. - requirements_compiled.txt regenerated with ci/ci.sh compile_pip_dependencies (py3.11); only the # via lines change. - raydepsets build --all-configs, then --check: up to date. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: elliot-barn <[email protected]>
|
Thanks @sai-miduthuri, all three points are addressed in 41fd6a7:
After that, On idna: agreed. The The Brotli half is #68041, stacked on this PR and regenerated the same way. |
…iohttp>=3.14.4 release/requirements_py310.txt pinned aiohttp 3.9.5, below the aiohttp>=3.14.4 floor from #68040 (CVE-2026-111064, CVE-2026-111066, GHSA-2g87-pp6c-29x5). requirements_py310.in gains aiohttp>=3.14.4 and idna>=3.15 floors, next to the existing certifi and h11 floors, and the .txt is recompiled: aiohttp 3.9.5 -> 3.14.5, yarl 1.9.4 -> 1.25.1, aiosignal 1.3.1 -> 1.4.0, new aiohappyeyeballs 2.7.1 and propcache 0.5.4. No other pin changes. Recompiled with the same tool as //release:requirements_py310.update: pip-tools 6.6.0 on pip 22.0.4 and python 3.10, --no-upgrade --generate-hashes. The bazel target can't run as-is because release/requirements-doc.txt (a symlink to doc/requirements-doc.txt) pins sphinx 8.2.3, which needs python>=3.11. For the compile, that file was replaced by the same doc requirements at the versions already in the .txt, then restored. Before the .in change, this procedure reproduces the existing .txt byte for byte. Checked with uv pip install --dry-run --require-hashes on python 3.10 (221 packages) plus a full resolve. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: elliot-barn <[email protected]>
Resolves conflicts from the squash merge of #68040; tree is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: elliot-barn <[email protected]>
…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]>
Resolves conflicts from the squash merges of #68040/#68041; tree is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: elliot-barn <[email protected]>
…curity fixes (#68047) ## Description Brings two dependency security fixes that landed on master after the 2.57 cut to `releases/2.57.2`. Both are already on 2.58.x: - **idna, from #64056.** [CVE-2026-45409 / GHSA-65pc-fj4g-8rjx](GHSA-65pc-fj4g-8rjx) is a medium-severity denial of service (CVSS 5.3) in idna before 3.15. The 2024 fix for CVE-2024-3651 was incomplete: crafted input to `idna.encode()` can still take a long time to process. 2.57.1 shipped idna 3.12. - **log4j, cherry-picked from #64269.** `log4j-api`, `log4j-core` and `log4j-slf4j-impl` go from 2.25.3 to 2.25.4 in `ray_dist.jar`. 2.25.4 fixes every published log4j-core advisory, including CVE-2026-34477, -34478, -34479 and -34480 (April 2026) and CVE-2025-68161. Master and 2.58.2 are on 2.25.4. These are the fixes reported in #64050 and #63919. **Stacked on #68041** (Brotli), which is stacked on #68040 (eMudhra). `idna>=3.7` is the line just above #68040's certifi change in `security-requirements.txt`. Merge #68040, then #68041, then retarget this PR to `releases/2.57.2`. ## Changes 1. **idna** (`5edd077da0`) - `security-requirements.txt`: `idna>=3.7` → `idna>=3.15`. - `requirements_compiled.txt`: idna 3.18. `requirements_compiled_py3.14.txt`: idna 3.15. Both as on `releases/2.58.2`. - Locks: - Where 2.58.2 has the same lock, it gets 2.58.2's idna entry. - Some locks are still below 3.15 on 2.58.2 and 2.59.1, and get idna 3.18 here: TPU base deps (3.11), ray-llm testdeps (3.13), datatfds, llm_batch, the multimodal byod py3.10 locks (3.7) and `ray_img_py39.lock`. - Regenerated with `ci/ci.sh compile_pip_dependencies` (py3.11), then `raydepsets build --all-configs`. 2. **log4j** (`90b2394af3`): a clean cherry-pick of #64269, the three version lines in `java/dependencies.bzl`. 3. **idna in release tooling** (`ad13264cbc`): 3.7 → 3.18 in two files. Both are still on 3.7 on master. - `release/requirements_py310.txt`: the `py_deps_py310` Bazel lock and the release-test launcher environment. - `release/ray_release/byod/requirements_ml_byod_3.10.txt`: unreferenced, left over from the ray-ml image. - Only the version and hash lines change. The file's generator, `//release:requirements_py310.update`, can't run on this branch: it fails on `sphinx==8.2.3` (requires Python ≥3.11) from `requirements-doc.txt`, with or without this change. 4. **aiohttp in `release/requirements_py310.txt`** (`ea8eb14b97`): this file was on aiohttp 3.9.5, below #68040's `aiohttp>=3.14.4` floor. - `requirements_py310.in` gains `aiohttp>=3.14.4` and `idna>=3.15` floors, next to the existing `certifi` and `h11` floors. - The `.txt` is recompiled: aiohttp 3.9.5 → 3.14.5, yarl 1.9.4 → 1.25.1, aiosignal 1.3.1 → 1.4.0, and the new aiohappyeyeballs 2.7.1 and propcache 0.5.4. No other pin changes. - How it's recompiled: with the same tool as `//release:requirements_py310.update` (pip-tools 6.6.0 on pip 22.0.4 and Python 3.10, `--no-upgrade --generate-hashes`). The only difference: during the compile, the `release/requirements-doc.txt` symlink is swapped for the same doc requirements at the versions already in the `.txt`, because upstream's `sphinx==8.2.3` needs Python ≥3.11. Before the `.in` change, this reproduces the existing `.txt` byte for byte. **Not ported from #64056:** - The `RUNTIME_ENV_AGENT_PIP_PACKAGES` pin. On 2.57 the runtime env agent installs `aiohttp` unpinned, so its bundled idna is whatever is current when the wheel is built. - The aiohttp floor. #68040 already sets 3.14.4. - The bundled-versions guard test, because it asserts that pin. ## Related issues Related to #64056, #64269, #64050 and #63919. ## Testing - `ci/ci.sh compile_pip_dependencies` (py3.11): only idna changes. - `bazel run //ci/raydepsets:raydepsets -- build --all-configs`, then `--check`: "Lock files are up to date." Only idna pins change: | Before | After | |---|---| | 3.7 ×6, 3.11 ×6, 3.12 ×91, 3.13 ×3 | 3.15 ×7, 3.18 ×99 | - `bazel build` of the three log4j Maven artifacts and `//java:io_ray_ray_api`: succeeded with 2.25.4. - `release/requirements_py310.txt` on Python 3.10: - `uv pip install --dry-run --require-hashes` covers all 219 packages, and a full resolve has no conflicts. - `@py_deps_py310_idna` fetches. - The idna 3.18 hashes match PyPI. - `release/requirements_py310.txt` after the recompile: `uv pip install --dry-run --require-hashes` on Python 3.10 covers 221 packages, and a full resolve has no conflicts. 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]> Signed-off-by: nh-atuan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Nguyễn Hồ Anh Tuấn <[email protected]> Co-authored-by: Edward Oakes <[email protected]>
…in release tooling (#68051) ## Description Closes the remaining security gaps on `releases/2.58.2` so that it matches the 2.57.2 picks (#68040, #68041, #68047). log4j (2.25.4) and the `security-requirements.txt` floors are already correct here. ### 1. idna 3.15+ in the remaining locks (`fdcca7fe01`) [CVE-2026-45409 / GHSA-65pc-fj4g-8rjx](GHSA-65pc-fj4g-8rjx) is a medium-severity denial of service in idna before 3.15. 2.58.2 has the `idna>=3.15` floor from #64056. But locks that aren't constrained by `requirements_compiled.txt` kept vulnerable idna, and they now get idna 3.18, the compiled pin: | Lock | Before | |---|---| | TPU base deps py3.10–3.13 / py3.14 (these feed the **TPU images**) | 3.11 / 3.13 | | ray-llm testdeps py3.11/3.12 | 3.13 | | `datatfds_py3.12`, `llm_batch_single_node_benchmark_py312_cu130` | 3.11 | | multimodal byod py3.10 release locks (×5) | 3.7 | | `ray_img_py39.lock`, `requirements_ml_byod_3.10.txt` (unreferenced) | 3.7 | `large_image_embedding_py3.10.lock` was also still on certifi 2025.1.31 and virtualenv 20.33.1. It now uses its sibling locks' eMudhra pins (certifi 2026.10.19, virtualenv 21.14.12 and its dependencies, aiohttp 3.14.4), the same as on 2.57.2. ### 2. aiohttp and idna in `release/requirements_py310.txt` (`30d47f3129`) This file is the `py_deps_py310` Bazel lock and the release-test launcher environment. It pinned aiohttp 3.9.5 and idna 3.7. `requirements_py310.in` gains `aiohttp>=3.14.4` and `idna>=3.15` floors, and the `.txt` is recompiled: | Package | Before | After | |---|---|---| | aiohttp | 3.9.5 | 3.14.5 | | yarl | 1.9.4 | 1.25.1 | | aiosignal | 1.3.1 | 1.4.0 | | idna | 3.7 | 3.20 | | aiohappyeyeballs, propcache | none | 2.7.1, 0.5.4 | No other pin changes. It's recompiled with the same tool as `//release:requirements_py310.update`: pip-tools 6.6.0 on pip 22.0.4 and Python 3.10, `--no-upgrade --generate-hashes`. The one workaround: `release/requirements-doc.txt`, a symlink to `doc/requirements-doc.txt`, pins `sphinx==8.2.3`, which needs Python ≥3.11. For the compile, that symlink was replaced by the same doc requirements at the versions already in the `.txt`, then restored. Before the `.in` change, this reproduces the existing `.txt` byte for byte. ### Left as is (same on 2.57.2 and master) - **`ci_windows_depset.lock`:** compiled for Python 3.8, where aiohttp tops out at 3.10.11. - **`ray_img_py39.lock`:** aiohttp stays at 3.11.16, because the Python 3.9 line tops out at 3.13.x. - **`requirements_ml_byod_3.10.txt`:** aiohttp, brotli and yarl stay as they are. The file is unreferenced and has no generator. - **The doc pip-freeze snapshot:** regenerated from the image by the release docs step. - **The raydepsets test fixture.** ## Related issues Related to #64056, #67962, #68047 (2.57.2) and #68048 (master). ## Testing - `bazel run //ci/raydepsets:raydepsets -- build --all-configs`, then `--check`: "Lock files are up to date." The locks change only idna and, in `large_image_embedding`, the package set above. - `release/requirements_py310.txt`: `uv pip install --dry-run --require-hashes` on Python 3.10 covers 221 packages, and a full resolve has no conflicts. - A scan of every pinned file for aiohttp, certifi, brotli, idna, virtualenv and yarl below their floors finds only the files listed under "Left as is". 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]>
Description
Brings the eMudhra CA compromise and aiohttp DoS fixes to
releases/2.57.2. They come from the 2.59.1 squashfed97328bf(#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
fed97328bfconflicts 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-slimDockerfiles: the same lines asfed97328bfadds: certifi 2026.10.19 and pip 26.2.2 via conda, uv pinned to 0.13.4, and pip from PyPI on py3.10.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.txtregenerated withci/ci.sh compile_pip_dependencies(py3.11), so the# vialines match. No pins move.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 fromreleases/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.lockis 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 (#59484removed py3.9 and#59080re-added the file by accident), but it ships in the tree.Not ported: 2.59's pinned
RUNTIME_ENV_AGENT_PIP_PACKAGESinsetup.py. On 2.57 the runtime env agent installsaiohttpunpinned.Left on old pins, same as 2.58.2 and master: aiohttp, virtualenv and yarl in
ray_img_py39.lock, aiohttp inci_windows_depset.lock,requirements_ml_byod_3.10.txt, aiohttp inrelease/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 --checkpassed: "Lock files are up to date."ci/ci.sh compile_pip_dependencies(py3.11): only# vialines change.releases/2.58.2: versions and hashes match, except the intentionally updatedlarge_image_embedding.releases/2.57.2.AI assistance (Claude Code) was used to prepare this change.
🤖 Generated with Claude Code