Skip to content

Revert "[AutoPR- Security] Patch keras for CVE-2026-12480 [MEDIUM] (#17925)" — breaks tensorflow golden container - #18286

Merged
jslobodzian merged 1 commit into
3.0-devfrom
revert-keras-12480
Aug 1, 2026
Merged

Revert "[AutoPR- Security] Patch keras for CVE-2026-12480 [MEDIUM] (#17925)" — breaks tensorflow golden container#18286
jslobodzian merged 1 commit into
3.0-devfrom
revert-keras-12480

Conversation

@jslobodzian

Copy link
Copy Markdown
Collaborator

[Toolio Iglesias🗺️] Reverting the CVE-2026-12480 keras patch (#17925) to unblock the AMD64 DEV golden container pipeline.

Symptom

AMD64-GoldenContainerTests-DEV (def 2832) has been failing continuously since 2026-07-14 on the tensorflow container test with:

ImportError: cannot import name 'h5py' from 'keras.src.utils.module_utils'

Timeline: last green run 2026-07-13 13:30 UTC. #17925 landed on 3.0-dev 2026-07-13 05:12 UTC. Next day's test failed. 15 of the 17 runs since have failed; the two intermittent successes look like cache/retry artifacts.

Root cause

The patch (SPECS/keras/CVE-2026-12480.patch) adds a module-level import at the top of keras/src/saving/saving_lib.py:

from keras.src.utils.module_utils import h5py

That forces h5py to be resolvable the moment anything imports tf.keras. The tensorflow container's package list (.pipelines/containerSourceData/tensorflow/tensorflow.pkg) does not include python3-h5py, so every import tensorflow now raises the ImportError above at tf.keras access time.

Path forward

Re-land the CVE-2026-12480 fix either as:

  1. An amended patch that keeps h5py scoped to the specific functions that use it (matches upstream keras's usual lazy-load pattern), or
  2. Paired with a change to .pipelines/containerSourceData/tensorflow/tensorflow.pkg adding python3-h5py (and any other dependent containers that import tf.keras).

Reverting for now to stop the DEV cascade noise.

…17925)"

This reverts commit d00a76d.

The CVE-2026-12480 patch adds a module-level rom keras.src.utils.module_utils import h5py at the top of keras/src/saving/saving_lib.py, which forces h5py to be importable the moment anything imports 	f.keras. The tensorflow golden container's package list (.pipelines/containerSourceData/tensorflow/tensorflow.pkg) does not include python3-h5py, so every tf.keras import in the container now fails with:

  ImportError: cannot import name 'h5py' from 'keras.src.utils.module_utils'

DEV golden container tests (AMD64-GoldenContainerTests-DEV, def 2832) have been failing continuously since 2026-07-14 (first run after the patch landed on 07/13). Reverting to unblock the container pipeline until the fix can be re-landed properly (either as an amended patch that defers the h5py import to function scope, or paired with adding python3-h5py to tensorflow.pkg).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 26b18818-c4ef-43b9-ad6c-26bbf7c5259e
@jslobodzian
jslobodzian requested a review from a team as a code owner August 1, 2026 15:53
@microsoft-github-policy-service microsoft-github-policy-service Bot added Packaging 3.0-dev PRs Destined for AzureLinux 3.0 labels Aug 1, 2026
@jslobodzian
jslobodzian merged commit d2913f6 into 3.0-dev Aug 1, 2026
19 of 23 checks passed
@jslobodzian
jslobodzian deleted the revert-keras-12480 branch August 1, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.0-dev PRs Destined for AzureLinux 3.0 Packaging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant