Skip to content

nixos/security/pki: distrust various roots with compromised intermediates - #576390

Merged
mweinelt merged 1 commit into
NixOS:masterfrom
mweinelt:distrust-emsign-g3-root
Oct 20, 2026
Merged

mweinelt merged 1 commit into
NixOS:masterfrom
mweinelt:distrust-emsign-g3-root

Conversation

@mweinelt

Copy link
Copy Markdown
Member

Private keys for this CA have apparently leaked.

Things done

@mweinelt mweinelt added 1.severity: security Issues which raise a security issue, or PRs that fix one backport staging-nixos-26.05 Backport PR automatically labels Oct 20, 2026
@vcunat

vcunat commented Oct 20, 2026

Copy link
Copy Markdown
Member

Maybe master directly? Do we want to bundle this with this, for example?

316b009 nixos: Drop scripted stage 1

@mweinelt
mweinelt force-pushed the distrust-emsign-g3-root branch from 3b7db4c to 42c6ea1 Compare October 20, 2026 13:01
@mweinelt
mweinelt changed the base branch from staging-nixos to master October 20, 2026 13:01
@nixpkgs-ci nixpkgs-ci Bot closed this Oct 20, 2026
@nixpkgs-ci nixpkgs-ci Bot reopened this Oct 20, 2026
@mweinelt

Copy link
Copy Markdown
Member Author

Maybe master directly? Do we want to bundle this with this, for example?

316b009 nixos: Drop scripted stage 1

That was my thought for the cacert rebuild, but for this change it makes no sense.

@leona-ya leona-ya added backport release-26.05 Backport PR automatically and removed backport staging-nixos-26.05 Backport PR automatically labels Oct 20, 2026
@mweinelt
mweinelt force-pushed the distrust-emsign-g3-root branch from 42c6ea1 to 4723db4 Compare October 20, 2026 13:05
@ethancedwards8

Copy link
Copy Markdown
Member

@nixpkgs-branch-check nixpkgs-branch-check Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The PR's base branch is set to master, but this PR rebuilds all NixOS tests.

Please change the base branch to the right base branch for your changes (probably staging-nixos).

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 12.approvals: 2 This PR was reviewed and approved by two persons. 10.rebuild-nixos-tests This PR causes rebuilds for all NixOS tests and should normally target the staging branches. 7.no default reviewers This PR targets a package or module with no existing maintainers; roving reviewers, take pity! 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Oct 20, 2026
@mweinelt
mweinelt force-pushed the distrust-emsign-g3-root branch from 4723db4 to ee87ded Compare October 20, 2026 13:13
@hesiod

hesiod commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Comment thread nixos/modules/security/ca.nix Resolved
@mweinelt
mweinelt force-pushed the distrust-emsign-g3-root branch from ee87ded to f3869cf Compare October 20, 2026 13:17
@mweinelt

Copy link
Copy Markdown
Member Author

…ates

Private keys for the intermediate CAs have apparently leaked.
@mweinelt
mweinelt force-pushed the distrust-emsign-g3-root branch from f3869cf to 16ac0cd Compare October 20, 2026 13:17
matteo-pacini added a commit to matteo-pacini/nixos-configs that referenced this pull request Oct 21, 2026
* chore: weekly flake update - 2026-10-20T23:00:52Z

* fix(darwin): distrust roots on the compromised eMudhra path

nixpkgs added these to the NixOS security.pki defaults (NixOS/nixpkgs#576390),
but nix-darwin has no equivalent, so the Darwin hosts' /etc/ssl bundle still
trusts them. See NixOS/nixpkgs#576485.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(nexus): drop removed nextcloud admin options

nixpkgs turned services.nextcloud.config.adminuser and adminpassFile into
no-op assertions; the admin account already exists.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* chore(nexus): drop unused nextcloud admin password secret

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* chore(nexus): delete unused nextcloud admin secret

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
maolonglong pushed a commit to maolonglong/nix-config that referenced this pull request Oct 21, 2026
Private keys of eMudhra intermediate CAs leaked, and Mozilla is pulling
trust from the roots that issued them. nixpkgs added these four roots to
the blacklist only in the NixOS module (NixOS/nixpkgs#576390, backport
#576401). nix-darwin builds /etc/ssl/certs/ca-certificates.crt from
pkgs.cacert with security.pki.caCertificateBlacklist, which defaults to
empty, so both hosts still ship them in the Nix CA bundle.

Blacklist the same four names in modules/darwin/security.nix, which
covers personal-mba and work-mbp. cacert keeps a blacklisted root in
ca-bundle.crt as a TRUSTED CERTIFICATE rejected for every purpose and
drops its plain PEM block. On nss-cacert 3.126 the three emSign roots
were trusted for serverAuth and emailProtection; Comodo AAA Services
root was already untrusted for TLS and only loses emailProtection. This
affects tools that use the Nix bundle (NIX_SSL_CERT_FILE), not the macOS
keychain. Drop the list once nix-darwin or cacert distrusts these roots
by default.

Ported from ryan4yin/nix-config@0dcf547
ryan4yin/nix-config@0dcf547

Verified on x86_64-linux: both hosts evaluate the blacklist into the
aarch64-darwin cacert derivation behind ca-certificates.crt. The
unfiltered aarch64-darwin cacert from cache.nixos.org trusts all four
roots and is byte-identical to the Linux build of the same derivation.
The Linux build with the evaluated blacklist marks all four as rejected,
changes no other entry, and openssl verify rejects each root. The
aarch64-darwin bundle itself was not built, and `just eval` cannot run
on Linux because the catppuccin starship port is built at eval time.
chelmertz added a commit to chelmertz/dotfiles that referenced this pull request Oct 21, 2026
Pulls in the 26.05 backport of NixOS/nixpkgs#576390,
which rejects AAA Certificate Services and emSign ECC Root CA - G3 for TLS.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
gepbird added a commit to gepbird/dotfiles that referenced this pull request Oct 21, 2026
Flake lock file updates:

• Added input 'nixpkgs-patch-fix-CVE-2026-111943':
    'NixOS/nixpkgs#576390'
gepbird added a commit to tchfoo/raspi-dotfiles that referenced this pull request Oct 21, 2026
@leo60228

Copy link
Copy Markdown
Member

Comodo AAA Services root was already only trusted for emailProtection, and AFAIK the insecure intermediate certificates only apply to serverAuth. If there's software in Nixpkgs that doesn't respect the Trusted for: blocks, that seems like an issue that should be fixed separately.

gepbird added a commit to tchfoo/raspi-dotfiles that referenced this pull request Oct 21, 2026
Flake lock file updates:

• Updated input 'gep-dotfiles':
    'git+https://git.tchfoo.com/gepbird/dotfiles?ref=refs/heads/main&rev=158d8a91518b8fcd39be297ad6e996ac1a0d9bf0' (2026-10-18)
  → 'git+https://git.tchfoo.com/gepbird/dotfiles?ref=refs/heads/main&rev=cba9787f5d98ad8b621e51176d64ffdd846e8198' (2026-10-21)
• Added input 'gep-dotfiles/nixpkgs-patch-fix-CVE-2026-111943':
    'NixOS/nixpkgs#576390'
• Updated input 'home-manager':
    'github:nix-community/home-manager/640725978b99076e18e069f6e7d2959124584f8f' (2026-10-15)
  → 'github:nix-community/home-manager/ec80131710bffcdf3b8498cf41f3a0579833b023' (2026-10-20)
• Updated input 'nixos-hardware':
    'github:NixOS/nixos-hardware/60a624466c08787ee8303393b7d4752d1826f14f' (2026-10-11)
  → 'github:NixOS/nixos-hardware/efb6d0d5e2394c3c5416a18652808aba206c0988' (2026-10-20)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/fe13242281a67641c0102cdb1087f0ebe586c7df' (2026-10-15)
  → 'github:NixOS/nixpkgs/02c087f3fe673c9e317f206a627cb6b910336dbe' (2026-10-20)
• Removed input 'nixpkgs-patch-fix-CVE-2026-111943'
• Updated input 'nixpkgs-patch-nixos-nginx-add-build-time-syntax-validation':
    'NixOS/nixpkgs#474858'
  → 'NixOS/nixpkgs#474858'
• Updated input 'nur':
    'github:nix-community/NUR/7a691473c0a5a05d8b6093f6065d957abd4c7a02' (2026-10-18)
  → 'github:nix-community/NUR/22455345e60a58bba23b9d12f5e61ab448c51131' (2026-10-21)
• Updated input 'tangled-core':
    'git+https://tangled.org/tangled.org/core?ref=refs/heads/master&rev=dad751949f865d6189f7602e1409c5f951e75771' (2026-10-18)
  → 'git+https://tangled.org/tangled.org/core?ref=refs/heads/master&rev=c7ff2e9373e4df5aa7592a6a3958b2da84e300ca' (2026-10-21)
• Updated input 'ymstnt-dotfiles':
    'git+https://git.tchfoo.com/ymstnt/dotfiles?ref=refs/heads/main&rev=a9d5457f2a842748681dcc75eb90547648339c1e' (2026-10-18)
  → 'git+https://git.tchfoo.com/ymstnt/dotfiles?ref=refs/heads/main&rev=347bd3bb3b2c4452fbf24f9a1831f5d79de9f15e' (2026-10-19)
LilijoySkyseeker-agent added a commit to LilijoySkyseeker/nixOS that referenced this pull request Oct 21, 2026
nixpkgs mitigated the eMudhra compromise itself on 2026-10-20
(NixOS/nixpkgs#576390, #576401, tracked in #576485): every NixOS system
now distrusts Comodo AAA Services root, emSign ECC Root CA - G3,
emSign Root CA - C1 and emSign ECC Root CA - C3. Both pinned channels
(nixos-unstable 02c087f, nixos-26.05 cd4ea8d) already carry it.

Built all four hosts with and without this entry: the
/etc/ssl/certs bundle is byte-identical on both channels, with all four
roots marked rejected for serverAuth. The entry only covered G3, a
subset of what nixpkgs now blocks, including the Comodo AAA cross-sign
path it missed.

Decision: the owner asked for the redundant entry to be removed
(2026-10-21).
hydroakri added a commit to hydroakri/dotfiles that referenced this pull request Oct 22, 2026
britter added a commit to britter/nix-configuration that referenced this pull request Oct 22, 2026
* overlays: apply unmerged patch to python fabric
  The fabric package is required by azure-cli which is required by
  seeq-support.nix
* nextcloud: repo adminpassFile
  It was dropped from nixpkgs in
  NixOS/nixpkgs#571775.
* system-base: drop eMudhra fix
  It was merged into nixpkgs in
  NixOS/nixpkgs#576390.
* framework-13: fix issues introduced by flake update
  Backport the upstream fix
  NixOS/nixpkgs#575818
* calibre: disable speech support
  the speechd package in nixos-unstable never builds its Python
  bindings
* desktop-essentials: remove audacity because of build failures
yuanw added a commit to yuanw/nix-home that referenced this pull request Oct 23, 2026
nixpkgs 9e917916 (2026-10-17) -> 02c087f3 (2026-10-20). NixOS/nixpkgs#576390
hardcodes the compromised roots (CVE-2026-111943) into the ca.nix cacert
blacklist, so no host needs any config of its own: the system bundle drops
emSign ECC Root CA - C3, emSign ECC Root CA - G3 and emSign Root CA - C1,
121 cert blocks down to 118. "Comodo AAA Services root" was never in the
NSS-derived bundle, so the two-name snippet the incident site asks users to
add is redundant here.

silver and misfit carry it already, both checked against the incident site's
checker: dv-g3b-emudhra and dv-g3b-noct-emudhra went from 200 to
curl (60) "certificate rejected (28)", with normal TLS still 200.

Only the nixpkgs input moves. dgx-spark builds on nixpkgs-dgx and the
gateway on mono-nix, which are separate pins and still need their own bumps;
asche and misfit pick this up at their next rebuild.
ekishouTV added a commit to ekishouTV/dotfiles that referenced this pull request Oct 24, 2026
Without Minimum Release Age.

Reason: NixOS/nixpkgs#576390
@MarcelCoding MarcelCoding mentioned this pull request Oct 24, 2026
3 of 13 tasks
MarcelCoding added a commit to MarcelCoding/nixpkgs that referenced this pull request Nov 12, 2026
Right now, nss-cacert updates need to go though staging and
changes to `security.pki.caCertificateBlacklist` (like in NixOS#576390
or like custom user preferences) are not directly picked up
by applications using the `cacert` package.

This `NIX_` environment variable is patched-in in packages like pythons `certifi`
to override the ca bundle at runtime. Additionally also the SSL_CERT_FILE
is defined too, for packages supporting it out of the box.

Without this change `certifi` still uses an old version of the ca bundle:
```
❯ nix-shell -p python3Packages.certifi --command 'diff -u $(python -m certifi) /etc/ssl/certs/ca-bundle.crt'
--- /nix/store/6x3vic5vm4jzp29yna1qkp0xmf3qm35i-nss-cacert-3.126/etc/ssl/certs/ca-bundle.crt    1970-01-01 01:00:01.000000000 +0100
+++ /etc/ssl/certs/ca-bundle.crt        1970-01-01 01:00:01.000000000 +0100
@@ -1758,8 +1758,15 @@

 Comodo AAA Services root
 Traditional PEM block omitted: this certificate is not trusted for authenticating servers.
-Trusted for:
+Rejected for:
+  - 1.3.6.1.5.5.7.3.1 (RFC5280: serverAuth key usage)
+  - 1.3.6.1.5.5.7.3.2 (RFC5280: clientAuth key usage)
+  - 1.3.6.1.5.5.7.3.3 (RFC5280: codeSigning key usage)
   - 1.3.6.1.5.5.7.3.4 (RFC5280: emailProtection key usage)
+  - 1.3.6.1.5.5.7.3.8 (RFC5280: timeStamping key usage)
+  - 1.3.6.1.5.5.7.3.5 (RFC2459: ipsecEndSystem key usage)
+  - 1.3.6.1.5.5.7.3.6 (RFC2459: ipsecTunnel key usage)
+  - 1.3.6.1.5.5.7.3.7 (RFC2459: ipsecUser key usage)

<and some more>
 ```

With this change `certifi` uses the same bundle as the module system
configures:

```
❯ nix-shell -p python3Packages.certifi --command 'diff -u $(NIX_SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt python -m certifi) /etc/ssl/certs/ca-bundle.crt'
<no diff>
```

Co-authored-by: Sandro Jäckel <[email protected]>
MarcelCoding added a commit to MarcelCoding/nixpkgs that referenced this pull request Nov 12, 2026
Right now, nss-cacert updates need to go though staging and
changes to `security.pki.caCertificateBlacklist` (like in NixOS#576390
or like custom user preferences) are not directly picked up
by applications using the `cacert` package.

This `NIX_` environment variable is patched-in in packages like pythons `certifi`
to override the ca bundle at runtime. Additionally also the SSL_CERT_FILE
is defined too, for packages supporting it out of the box.

Without this change `certifi` still uses an old version of the ca bundle:
```
❯ nix-shell -p python3Packages.certifi --command 'diff -u $(python -m certifi) /etc/ssl/certs/ca-bundle.crt'
--- /nix/store/6x3vic5vm4jzp29yna1qkp0xmf3qm35i-nss-cacert-3.126/etc/ssl/certs/ca-bundle.crt    1970-01-01 01:00:01.000000000 +0100
+++ /etc/ssl/certs/ca-bundle.crt        1970-01-01 01:00:01.000000000 +0100
@@ -1758,8 +1758,15 @@

 Comodo AAA Services root
 Traditional PEM block omitted: this certificate is not trusted for authenticating servers.
-Trusted for:
+Rejected for:
+  - 1.3.6.1.5.5.7.3.1 (RFC5280: serverAuth key usage)
+  - 1.3.6.1.5.5.7.3.2 (RFC5280: clientAuth key usage)
+  - 1.3.6.1.5.5.7.3.3 (RFC5280: codeSigning key usage)
   - 1.3.6.1.5.5.7.3.4 (RFC5280: emailProtection key usage)
+  - 1.3.6.1.5.5.7.3.8 (RFC5280: timeStamping key usage)
+  - 1.3.6.1.5.5.7.3.5 (RFC2459: ipsecEndSystem key usage)
+  - 1.3.6.1.5.5.7.3.6 (RFC2459: ipsecTunnel key usage)
+  - 1.3.6.1.5.5.7.3.7 (RFC2459: ipsecUser key usage)

<and some more>
 ```

With this change `certifi` uses the same bundle as the module system
configures:

```
❯ nix-shell -p python3Packages.certifi --command 'diff -u $(NIX_SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt python -m certifi) /etc/ssl/certs/ca-bundle.crt'
<no diff>
```

Co-authored-by: Sandro Jäckel <[email protected]>
MarcelCoding added a commit to MarcelCoding/nixpkgs that referenced this pull request Nov 14, 2026
Right now, nss-cacert updates need to go though staging and
changes to `security.pki.caCertificateBlacklist` (like in NixOS#576390
or like custom user preferences) are not directly picked up
by applications using the `cacert` package.

This `NIX_` environment variable is patched-in in packages like pythons `certifi`
to override the ca bundle at runtime. Additionally also the SSL_CERT_FILE
is defined too, for packages supporting it out of the box.

Without this change `certifi` still uses an old version of the ca bundle:
```
❯ nix-shell -p python3Packages.certifi --command 'diff -u $(python -m certifi) /etc/ssl/certs/ca-bundle.crt'
--- /nix/store/6x3vic5vm4jzp29yna1qkp0xmf3qm35i-nss-cacert-3.126/etc/ssl/certs/ca-bundle.crt    1970-01-01 01:00:01.000000000 +0100
+++ /etc/ssl/certs/ca-bundle.crt        1970-01-01 01:00:01.000000000 +0100
@@ -1758,8 +1758,15 @@

 Comodo AAA Services root
 Traditional PEM block omitted: this certificate is not trusted for authenticating servers.
-Trusted for:
+Rejected for:
+  - 1.3.6.1.5.5.7.3.1 (RFC5280: serverAuth key usage)
+  - 1.3.6.1.5.5.7.3.2 (RFC5280: clientAuth key usage)
+  - 1.3.6.1.5.5.7.3.3 (RFC5280: codeSigning key usage)
   - 1.3.6.1.5.5.7.3.4 (RFC5280: emailProtection key usage)
+  - 1.3.6.1.5.5.7.3.8 (RFC5280: timeStamping key usage)
+  - 1.3.6.1.5.5.7.3.5 (RFC2459: ipsecEndSystem key usage)
+  - 1.3.6.1.5.5.7.3.6 (RFC2459: ipsecTunnel key usage)
+  - 1.3.6.1.5.5.7.3.7 (RFC2459: ipsecUser key usage)

<and some more>
 ```

With this change `certifi` uses the same bundle as the module system
configures:

```
❯ nix-shell -p python3Packages.certifi --command 'diff -u $(NIX_SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt python -m certifi) /etc/ssl/certs/ca-bundle.crt'
<no diff>
```

Co-authored-by: Sandro Jäckel <[email protected]>
SuperSandro2000 added a commit to SuperSandro2000/nixpkgs that referenced this pull request Nov 25, 2026
Right now, nss-cacert updates need to go though staging and
changes to `security.pki.caCertificateBlacklist` (like in NixOS#576390
or like custom user preferences) are not directly picked up
by applications using the `cacert` package.

This `NIX_` environment variable is patched-in in packages like pythons `certifi`
to override the ca bundle at runtime. Additionally also the SSL_CERT_FILE
is defined too, for packages supporting it out of the box.

Without this change `certifi` still uses an old version of the ca bundle:
```
❯ nix-shell -p python3Packages.certifi --command 'diff -u $(python -m certifi) /etc/ssl/certs/ca-bundle.crt'
--- /nix/store/6x3vic5vm4jzp29yna1qkp0xmf3qm35i-nss-cacert-3.126/etc/ssl/certs/ca-bundle.crt    1970-01-01 01:00:01.000000000 +0100
+++ /etc/ssl/certs/ca-bundle.crt        1970-01-01 01:00:01.000000000 +0100
@@ -1758,8 +1758,15 @@

 Comodo AAA Services root
 Traditional PEM block omitted: this certificate is not trusted for authenticating servers.
-Trusted for:
+Rejected for:
+  - 1.3.6.1.5.5.7.3.1 (RFC5280: serverAuth key usage)
+  - 1.3.6.1.5.5.7.3.2 (RFC5280: clientAuth key usage)
+  - 1.3.6.1.5.5.7.3.3 (RFC5280: codeSigning key usage)
   - 1.3.6.1.5.5.7.3.4 (RFC5280: emailProtection key usage)
+  - 1.3.6.1.5.5.7.3.8 (RFC5280: timeStamping key usage)
+  - 1.3.6.1.5.5.7.3.5 (RFC2459: ipsecEndSystem key usage)
+  - 1.3.6.1.5.5.7.3.6 (RFC2459: ipsecTunnel key usage)
+  - 1.3.6.1.5.5.7.3.7 (RFC2459: ipsecUser key usage)

<and some more>
 ```

With this change `certifi` uses the same bundle as the module system
configures:

```
❯ nix-shell -p python3Packages.certifi --command 'diff -u $(NIX_SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt python -m certifi) /etc/ssl/certs/ca-bundle.crt'
<no diff>
```

Co-authored-by: Sandro Jäckel <[email protected]>
SuperSandro2000 added a commit to SuperSandro2000/nixpkgs that referenced this pull request Nov 29, 2026
Right now, nss-cacert updates need to go though staging and
changes to `security.pki.caCertificateBlacklist` (like in NixOS#576390
or like custom user preferences) are not directly picked up
by applications using the `cacert` package.

This `NIX_` environment variable is patched-in in packages like pythons `certifi`
to override the ca bundle at runtime. Additionally also the SSL_CERT_FILE
is defined too, for packages supporting it out of the box.

Without this change `certifi` still uses an old version of the ca bundle:
```
❯ nix-shell -p python3Packages.certifi --command 'diff -u $(python -m certifi) /etc/ssl/certs/ca-bundle.crt'
--- /nix/store/6x3vic5vm4jzp29yna1qkp0xmf3qm35i-nss-cacert-3.126/etc/ssl/certs/ca-bundle.crt    1970-01-01 01:00:01.000000000 +0100
+++ /etc/ssl/certs/ca-bundle.crt        1970-01-01 01:00:01.000000000 +0100
@@ -1758,8 +1758,15 @@

 Comodo AAA Services root
 Traditional PEM block omitted: this certificate is not trusted for authenticating servers.
-Trusted for:
+Rejected for:
+  - 1.3.6.1.5.5.7.3.1 (RFC5280: serverAuth key usage)
+  - 1.3.6.1.5.5.7.3.2 (RFC5280: clientAuth key usage)
+  - 1.3.6.1.5.5.7.3.3 (RFC5280: codeSigning key usage)
   - 1.3.6.1.5.5.7.3.4 (RFC5280: emailProtection key usage)
+  - 1.3.6.1.5.5.7.3.8 (RFC5280: timeStamping key usage)
+  - 1.3.6.1.5.5.7.3.5 (RFC2459: ipsecEndSystem key usage)
+  - 1.3.6.1.5.5.7.3.6 (RFC2459: ipsecTunnel key usage)
+  - 1.3.6.1.5.5.7.3.7 (RFC2459: ipsecUser key usage)

<and some more>
 ```

With this change `certifi` uses the same bundle as the module system
configures:

```
❯ nix-shell -p python3Packages.certifi --command 'diff -u $(NIX_SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt python -m certifi) /etc/ssl/certs/ca-bundle.crt'
<no diff>
```

Co-authored-by: Sandro Jäckel <[email protected]>
SuperSandro2000 added a commit to SuperSandro2000/nixpkgs that referenced this pull request Nov 30, 2026
Right now, nss-cacert updates need to go though staging and
changes to `security.pki.caCertificateBlacklist` (like in NixOS#576390
or like custom user preferences) are not directly picked up
by applications using the `cacert` package.

This `NIX_` environment variable is patched-in in packages like pythons `certifi`
to override the ca bundle at runtime. Additionally also the SSL_CERT_FILE
is defined too, for packages supporting it out of the box.

Without this change `certifi` still uses an old version of the ca bundle:
```
❯ nix-shell -p python3Packages.certifi --command 'diff -u $(python -m certifi) /etc/ssl/certs/ca-bundle.crt'
--- /nix/store/6x3vic5vm4jzp29yna1qkp0xmf3qm35i-nss-cacert-3.126/etc/ssl/certs/ca-bundle.crt    1970-01-01 01:00:01.000000000 +0100
+++ /etc/ssl/certs/ca-bundle.crt        1970-01-01 01:00:01.000000000 +0100
@@ -1758,8 +1758,15 @@

 Comodo AAA Services root
 Traditional PEM block omitted: this certificate is not trusted for authenticating servers.
-Trusted for:
+Rejected for:
+  - 1.3.6.1.5.5.7.3.1 (RFC5280: serverAuth key usage)
+  - 1.3.6.1.5.5.7.3.2 (RFC5280: clientAuth key usage)
+  - 1.3.6.1.5.5.7.3.3 (RFC5280: codeSigning key usage)
   - 1.3.6.1.5.5.7.3.4 (RFC5280: emailProtection key usage)
+  - 1.3.6.1.5.5.7.3.8 (RFC5280: timeStamping key usage)
+  - 1.3.6.1.5.5.7.3.5 (RFC2459: ipsecEndSystem key usage)
+  - 1.3.6.1.5.5.7.3.6 (RFC2459: ipsecTunnel key usage)
+  - 1.3.6.1.5.5.7.3.7 (RFC2459: ipsecUser key usage)

<and some more>
 ```

With this change `certifi` uses the same bundle as the module system
configures:

```
❯ nix-shell -p python3Packages.certifi --command 'diff -u $(NIX_SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt python -m certifi) /etc/ssl/certs/ca-bundle.crt'
<no diff>
```

Co-authored-by: Sandro Jäckel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.severity: security Issues which raise a security issue, or PRs that fix one 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 7.no default reviewers This PR targets a package or module with no existing maintainers; roving reviewers, take pity! 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: port to stable This PR already has a backport to the stable release. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-nixos-tests This PR causes rebuilds for all NixOS tests and should normally target the staging branches. 12.approvals: 2 This PR was reviewed and approved by two persons. backport release-26.05 Backport PR automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants