Skip to content

qutebrowser: mark as insecure due to accepting eMudhra TLS certs - #584791

Merged
dotlambda merged 1 commit into
NixOS:masterfrom
RossSmyth:qutebrowser-mark-as-insecure-due-to-accept-emudhra-tls-certs/lsuwpxytslqm
Nov 8, 2026
Merged

dotlambda merged 1 commit into
NixOS:masterfrom
RossSmyth:qutebrowser-mark-as-insecure-due-to-accept-emudhra-tls-certs/lsuwpxytslqm

Conversation

@RossSmyth

Copy link
Copy Markdown
Contributor

Things done

#584788

@nixpkgs-ci
nixpkgs-ci Bot requested review from dotlambda and rnhmjoj November 8, 2026 02:06
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 2.status: merge-bot eligible This PR can be merged by commenting "@NixOS/nixpkgs-merge-bot merge". labels Nov 8, 2026
@RossSmyth RossSmyth added backport release-26.05 Backport PR automatically 1.severity: security Issues which raise a security issue, or PRs that fix one labels Nov 8, 2026
@dotlambda

Copy link
Copy Markdown
Member

Isn't this a problem with qtwebengine, which should be marked insecure instead?

@RossSmyth

RossSmyth commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor Author

Perhaps, the exact cause I'm not sure of. I saw a PR for blink-qt (#577808) which uses qtwebengine that changed the certs to come from ours, but they had explicitly vendored certs. I'm unsure if qutebrowser's comes from qtwebengine, some Python dependency, or a combo of both.

@dotlambda
dotlambda added this pull request to the merge queue Nov 8, 2026
@ShadowRZ

ShadowRZ commented Nov 8, 2026

Copy link
Copy Markdown
Member

I saw a PR for blink-qt (#577808) which uses qtwebengine that changed the certs to come from ours

I don't think this is really related as the PR likely only concerns TLS connections from the software itself, not Qt WebEngine which probably uses libnss like Chromium

mainProgram = "qutebrowser";
platforms = if enableWideVine then [ "x86_64-linux" ] else qt6Packages.qtwebengine.meta.platforms;
knownVulnerabilities = [
"Still accepts eMudhra TLS certs."

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This probably needs an pointer to upstream

Merged via the queue into NixOS:master with commit 8e97bd7 Nov 8, 2026
33 checks passed
@nixpkgs-ci

nixpkgs-ci Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Successfully created backport PR for release-26.05:

@github-actions github-actions Bot added the 8.has: port to stable This PR already has a backport to the stable release. label Nov 8, 2026
@rnhmjoj

rnhmjoj commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

I can't reproduce, how did you test this? If I run

result/bin/qutebrowser -T https://emudhra.we-have-a-problem.com/

with Nixpkgs at cde6a2f I don't see any of those certificates being accepted.

image image

Besides, this doesn't even make sense. qtwebengine uses NSS and picks the CAs from the system trust store via p11-kit (see the custom-ca test), it doesn't have any vendored files AFAIK. Also, if anything, this would be an issue with qtwebengine, not with qutebrowser.

Please, revert this.

@ShadowRZ

ShadowRZ commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

with Nixpkgs at cde6a2f I don't see any of those certificates being accepted.

@rnhmjoj On my machine, with the same commit Qutebrowser still suffers from #584788, I also tried cleaning ~/.pki but still.

@dotlambda

Copy link
Copy Markdown
Member

I cleared both ~/.cache/qutebrowser and ~/.local/share/qutebrowser but can still reproduce it on cde6a2f.

@rnhmjoj

rnhmjoj commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Are you testing with --temp-basedir/-T? What do you get with

curl https://dv-g3b-emudhra.we-have-a-problem.com/

instead?

@ShadowRZ

ShadowRZ commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Are you testing with --temp-basedir/-T? What do you get with

curl https://dv-g3b-emudhra.we-have-a-problem.com/

instead?

@rnhmjoj I added -T, also the curl command outputs:

@ curl https://dv-g3b-emudhra.we-have-a-problem.com/
curl: (60) SSL certificate OpenSSL verify result: unable to get local issuer certificate (20)
More details here: https://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the webpage mentioned above.

Sidenote: I suggest you to look at https://nixos.org/community and talk elsewhere, like on Matrix, I'm avaliable there too

@rnhmjoj

rnhmjoj commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

I managed to reproduce with a clean VM, I have no idea why on my machine the certificates are not trusted by default.

Anyway, as I expected, this affects all applications using qtwebengine, not specifically qutebrowser. You can check with falkon, for example. We need to figure how why.

@rnhmjoj

rnhmjoj commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

pinging @NickCao as qtwebengine maintainer.

prismatic-koi added a commit to prismatic-koi/nixos-config that referenced this pull request Nov 12, 2026
…tebrowser-3.7.0 (#3467)

* flake: configure nixpkgs through module options for NixOS hosts

* qutebrowser: distrust compromised eMudhra intermediates in NSS

nixpkgs marks qutebrowser-3.7.0 insecure because QtWebEngine accepts
the compromised eMudhra intermediates (NixOS/nixpkgs#584791). The
update-flakes run 43163856072 stops at evaluation for tui and navi.

Add a home-manager activation step that adds each certificate from
impacted-intermediates.json to ~/.pki/nssdb with trust p,p,p. This is
the mitigation from qutebrowser/qutebrowser#9032. The repo holds a
byte-identical copy of the JSON file, and evaluation fails if its
sha256 does not match the pinned value. The step makes no network
calls.

Permit "qutebrowser-3.7.0" by name in the same module. The module is
imported on Linux only, because QtWebEngine on macOS does not read the
NSS database.

* flake: remove the wrong file reference from the nixpkgs comment

---------

Co-authored-by: prismatic-koi <[email protected]>
kevinher7 added a commit to kevinher7/nixos that referenced this pull request Nov 12, 2026
## Summary

Apply the upstream NSS distrust workaround on `beans-btw` and `kebean`,
including the cross-signed intermediates missing from the original
eight-certificate script. Permit only `qutebrowser-3.7.0` while
qutebrowser is enabled on those hosts so the insecure-package check in
#317 no longer blocks evaluation. Keep the existing flake lock.

```text
Pinned certificate JSON
  Nix builds 16 PEM files
  Home Manager activation imports p,p,p distrust into the user NSS database
```

The certificate list has a fixed SHA-256 hash. Activation creates the
NSS database if needed and uses Nix-provided `certutil`, with no runtime
downloads. The activation applies only on Linux.

References: [upstream
workaround](qutebrowser/qutebrowser#9032 (comment)),
[Nixpkgs discussion](NixOS/nixpkgs#584791).

## Evidence

- Before, [PR #317
CI](https://github.com/kevinher7/nixos/actions/runs/43164456854/job/131002944909?pr=317)
refused to evaluate `qutebrowser-3.7.0` because it is marked insecure.
- After, both Linux system derivations evaluate with nixpkgs
`177d0540942fb205af6993b1d5fa0b57799e09f8`, the revision from #317.
- Built the pinned certificate derivation and rendered activation. All
16 PEM fingerprints match the source list. Two consecutive activation
runs against a temporary NSS database produced exactly 16 entries, all
with `p,p,p` trust flags.
- A dry run reported all imports without creating a database.
- Repository pre-commit check and Darwin system evaluation passed.
Confirmed the activation is absent on Darwin.
- Browser verification remains required after activation. Restart
qutebrowser and run every case on the [incident test
page](https://emudhra.we-have-a-problem.com/). These checks verify NSS
imports, not browser rejection. The exception permits evaluation and
does not itself fix certificate validation.

- Verified on both Linux hosts that disabling qutebrowser removes both
the package exception and NSS activation.

## Merge danger

**Door:** two-way for the configuration. Reverting it leaves the NSS
distrust entries in place. Removing those entries requires explicit
`certutil` cleanup.

**Blast radius:** Linux. The user NSS database is shared with other
applications that use it. No system activation or real-user certificate
database changes were performed during validation. The macOS app bundle
needs separate trust-store verification.
@nix-julia

Copy link
Copy Markdown
Contributor

qt/qtwebengine-chromium@dfe972d
#587672
Does this commit fix the issue?

@rnhmjoj

rnhmjoj commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

I figured that when the certificates were blacklisted in the hotfix #576390, qtwebengine correctly stopped trusting these emudhra certificates. Later, cacert was updated (f903b88) and some of the blacklist entries removed. After this, qtwebengine started trusting again the certificates.

This is why I couldn't reproduce the issue (I was still using the older cacert with the blacklist), but I still don't understand exactly what's going on.

Anyway, I just tested that with the latest qtwebengine release (1.640.0 #587672) all the emudhra certificates are distrusted.

@nix-julia nix-julia mentioned this pull request Nov 14, 2026
4 of 13 tasks
@RossSmyth
RossSmyth deleted the qutebrowser-mark-as-insecure-due-to-accept-emudhra-tls-certs/lsuwpxytslqm branch November 15, 2026 03:28
magnetophon added a commit to magnetophon/new-nixos-config that referenced this pull request Nov 16, 2026
nixpkgs marks qutebrowser insecure because QtWebEngine accepts the
compromised eMudhra intermediates (NixOS/nixpkgs#584791). Add a systemd
user service that adds each certificate from the pinned
impacted-intermediates.json to ~/.pki/nssdb with trust p,p,p, and permit
qutebrowser-3.7.0 by name.

Ported from prismatic-koi/nixos-config#3467, adapted to a setup without
home-manager.
@rnhmjoj rnhmjoj mentioned this pull request Nov 18, 2026
3 of 13 tasks
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 2.status: merge-bot eligible This PR can be merged by commenting "@NixOS/nixpkgs-merge-bot merge". 8.has: port to stable This PR already has a backport to the stable release. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. backport release-26.05 Backport PR automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants