Repository navigation
qutebrowser: mark as insecure due to accepting eMudhra TLS certs - #584791
Conversation
|
Isn't this a problem with qtwebengine, which should be marked insecure instead? |
|
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. |
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." |
There was a problem hiding this comment.
This probably needs an pointer to upstream
|
Successfully created backport PR for |
|
I can't reproduce, how did you test this? If I run with Nixpkgs at cde6a2f I don't see any of those certificates being accepted.
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. |
|
I cleared both |
|
Are you testing with instead? |
@rnhmjoj I added -T, also the curl command outputs: Sidenote: I suggest you to look at https://nixos.org/community and talk elsewhere, like on Matrix, I'm avaliable there too |
|
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. |
|
pinging @NickCao as qtwebengine maintainer. |
…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]>
## 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.
|
qt/qtwebengine-chromium@dfe972d |
|
I figured that when the certificates were blacklisted in the hotfix #576390, qtwebengine correctly stopped trusting these emudhra certificates. Later, 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. |
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.


Things done
#584788
./result/bin/.nixpkgs-reviewon this PR. See nixpkgs-review usage.passthru.tests.