Skip to content

xtask: update OVMF from EDK2-STABLE202502 to EDK2-STABLE202605 - #1970

Merged
phip1611 merged 6 commits into
mainfrom
bump-ovmf
Jun 15, 2026
Merged

xtask: update OVMF from EDK2-STABLE202502 to EDK2-STABLE202605#1970
phip1611 merged 6 commits into
mainfrom
bump-ovmf

Conversation

@phip1611

@phip1611 phip1611 commented Jun 14, 2026

Copy link
Copy Markdown
Member

We update OVMF to include the latest bugfixes and overall most recent
version. This influences the version of OFMF (edk2) that we use in our
integration tests.

  • bump OVMF for x86_64 and aarch64 from EDK2-STABLE202502 to EDK2-STABLE202605
  • pin OVMF for IA32 (32-bit x86) to EDK2-STABLE202508 which is the last release with IA32 support
  • update the HTTPS test code as OpenSSL changes after 2025-08 influence what certificates are accepted (details in the commit messages)

This will unblock #1728

@phip1611

Copy link
Copy Markdown
Member Author

FYI. Very interesting debugging story @nicholasbishop

@kraxel might be interesting to you too as you introduced the HTTPS test last year in #1614

@phip1611
phip1611 force-pushed the bump-ovmf branch 2 times, most recently from b30480d to 8a394ef Compare June 14, 2026 16:22
@phip1611 phip1611 changed the title xtask: update OVMF from EDK2_STABLE202502_R2 to EDK2_STABLE202605_R1 xtask: update OVMF from EDK2-STABLE202502 to EDK2-STABLE202605 Jun 14, 2026
Comment thread xtask/src/qemu.rs
@phip1611 phip1611 mentioned this pull request Jun 14, 2026
2 tasks
@phip1611 phip1611 self-assigned this Jun 14, 2026
// Keep this endpoint compatible with edk2's TLS policy. Newer OVMF
// defaults OpenSSL to security level 3, so RSA <3072-bit leaf certs
// can make Request() fail before any HTTP response is available.
fetch_http(*h, "https://example.com/")

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I can reproduce the CI issue on an aarch64 machine and will continue debugging

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

EDK2 for aarch64 is built with -DEDK2_OPENSSL_NOEC=1 ... this basically prevents connections to any TLS/HTTPS host out there. I temporarily deactivate this test for aarch64.

@phip1611
phip1611 force-pushed the bump-ovmf branch 4 times, most recently from 6c88952 to 0457f3d Compare June 15, 2026 08:59
phip1611 added 4 commits June 15, 2026 11:03
We update OVMF to include the latest bugfixes and overall most recent
version. This influences the version of OFMF (edk2) that we use in our
integration tests (`cargo xtask run`).
This is the last version in edk2 with IA32 support. We will
therefore never update OVMF for IA32 in our test infrastructure.

New tests that are conflicting will be disabled for IA32 to
maintain a solid base for IA32 without hindering progress for
the main architectures x86_64 and ARM.
## TL;DR

Switch from https://raw.githubusercontent.com to https://example.com
as GitHub's host is currently not accepted by OpenSSLs security level 3
(was 0 in older edk2).

## Root cause

The failure is not caused by a stale `cacerts.bin` or by a missing OVMF
TLS build option. It is caused by edk2 commit
`fb43f0c085045771bc2dee2f867d87298de2facb` (2025-09-19):

```text
CryptoPkg: Add support to set TLS security level.
```

That commit changed `CryptoPkg/Library/TlsLib/TlsInit.c` from:

```c
SSL_set_security_level (TlsConn->Ssl, 0);
```

to:

```c
SSL_set_security_level (TlsConn->Ssl, 3);
```

OpenSSL security level 3 rejects RSA end-entity certificates below 3072
bits. `raw.githubusercontent.com` currently serves a 2048-bit RSA leaf
certificate, so the TLS handshake is rejected as too weak.

## Evidence

The regression starts between these OVMF prebuilts:

- `edk2-stable202502`: GitHub HTTPS test works.
- `edk2-stable202602`: GitHub HTTPS test fails.
- `edk2-stable202605`: GitHub HTTPS test fails.

The failure is endpoint-specific. With the new OVMF, changing only the
HTTPS test URL to `https://example.com/` makes
`cargo xtask run --headless` pass.

Host OpenSSL reproduces the policy failure:

```sh
openssl s_client -4 \
    -connect raw.githubusercontent.com:443 \
    -servername raw.githubusercontent.com \
    -verify_return_error \
    -auth_level 3 \
    -brief
```

Expected error:

```text
verify error:num=66:EE certificate key too weak
```

At auth level 2, the same endpoint verifies successfully:

```sh
openssl s_client -4 \
    -connect raw.githubusercontent.com:443 \
    -servername raw.githubusercontent.com \
    -verify_return_error \
    -auth_level 2 \
    -brief
```

## Solution

Although edk2 now has an internal `TlsSetSecurityLevel()` helper, it is
not exposed through `EFI_TLS_PROTOCOL`, and `HttpDxe` does not let an
HTTP client lower the level. A firmware-side alternative would be to
patch edk2 to make the security level configurable, or lower the default
to level 2.

For uefi-rs, we stop using `raw.githubusercontent.com` as the HTTPS
integration test endpoint. We use a stable endpoint whose certificate
satisfies OpenSSL security level 3, for example ECDSA P-256 or
RSA 3072+. We go with `https://example.com`.

Assisted-by: Codex:GPT-5.5
We do not have control over the TLS certificates of these hosts. To
ensure non-flaky tests, we add a list of potential hosts where at least
one must succeed.
phip1611 added 2 commits June 15, 2026 11:10
Since edk2-stable202511, the default OpenSSL security level has been
raised from 0 to 3, which rejects older RSA-based keys. Unfortunately,
the EDK2 aarch64 build forcefully disables all EC-based keys
(-DEDK2_OPENSSL_NOEC=1), effectively preventing connections to most
HTTPS/TLS hosts. Temporarily disable this test on aarch64 until EC-based
keys are supported there.
@phip1611
phip1611 enabled auto-merge June 15, 2026 09:12
@phip1611
phip1611 added this pull request to the merge queue Jun 15, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 15, 2026
@phip1611
phip1611 added this pull request to the merge queue Jun 15, 2026
Merged via the queue into main with commit d438f61 Jun 15, 2026
20 checks passed
@phip1611
phip1611 deleted the bump-ovmf branch June 15, 2026 09:24
@phip1611 phip1611 mentioned this pull request Jun 15, 2026
@kraxel

kraxel commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

@kraxel might be interesting to you too as you introduced the HTTPS test last year in #1614

Yes, trapped into the https security level thing too and ended up downgrading it in the fedora edk2 builds from 3 to 2. There are just too many servers out there where 3 is too strict.

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