Skip to content

olvid: drop stale CA keystore of unused bundled runtime - #577809

Open
irgolic wants to merge 1 commit into
NixOS:masterfrom
irgolic:cacert/olvid
Open

irgolic wants to merge 1 commit into
NixOS:masterfrom
irgolic:cacert/olvid

Conversation

@irgolic

@irgolic irgolic commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Part of #576543.

Olvid, olvid, puts the lib directory of its bundled Java runtime into $out/lib. The package uses only sqlcipher-jdbc.so from this directory, through -Djava.library.path. The wrapper starts the java of jdk21, not a java of the bundled runtime. Thus, no software reads the Java trust store of the bundled runtime, lib/security/cacerts, but it was flagged by #576543 anyway, so this change removes this file. The line below inside archives is a libwebrtc library in a .jar file, and this change does not change it.

Warning

AI Disclosure: Claude Code made the code change, the commit message and the first version of this pull request description. Claude Code used Claude Fable 5.1 and Claude Opus 5.5. I examined all of this work. Claude Code also wrote all of nix-cacert-harness. This pull request description is written in ASD-STE100 (Simplified Technical English), examined with memelint in strict mode.

Test

nix-cacert-harness examines the package before and after this change. A local copy of nixpkgs is not necessary.

nix run github:irgolic/nix-cacert-harness -- olvid --pr 577809 --emudhra
Harness output: olvid
$ nix run github:irgolic/nix-cacert-harness -- olvid --base 8915027df75d0403ef013dd0cbf09ff3c602fd03 --after github:irgolic/nixpkgs/886fb4aa01b710c8ca4a9e941b32077d0f64b1b8 --emudhra
[1/2] static check + eMudhra chains: offline, reproducible
base (before) = 8915027df75d0403ef013dd0cbf09ff3c602fd03
reference: fprs4zi8r6227x12qbsd1grvfrpz6201-nss-cacert-3.131.1 TLS roots=118 all=169
==================================================================
ATTR olvid
before: 8915027df75d0403ef013dd0cbf09ff3c602fd03   after: github:irgolic/nixpkgs/886fb4aa01b710c8ca4a9e941b32077d0f64b1b8
before ok (0 built, 2s)
        drv /nix/store/…-olvid-3.1.1.drv
after  ok (0 built, 3s)
        drv /nix/store/…-olvid-3.1.1.drv

| output:path | before | after |
|---|---|---|
| out:/lib/security/cacerts | keystore 106 certs: 38 not in cacert, 17 in cacert but not for TLS, 67 cacert TLS roots missing [no-password]; scanner: AAA,ECC G3 | absent |

inside archives (scanner only; a symlink in the installed output cannot reach them, issue #576542 class):
  before out:/share/olvid/webrtc-java-0.14.0-linux-x86_64.jar!libwebrtc-java-linux-x86_64.so  roots=33 trusts AAA Certificate Services
  after  out:/share/olvid/webrtc-java-0.14.0-linux-x86_64.jar!libwebrtc-java-linux-x86_64.so  roots=33 trusts AAA Certificate Services

cacert in runtime closure (before): no
cacert in runtime closure (after): no
CAs trusted before but not trusted for TLS by cacert (55 total), e.g.:
  - CN=AAA Certificate Services, O=Comodo CA Limited, L=Salford, ST=Greater Manchester, C=GB
  - CN=emSign ECC Root CA - G3, O=eMudhra Technologies Limited, OU=emSign PKI, C=IN
  - CN=emSign Root CA - G2, O=eMudhra Technologies Limited, OU=emSign PKI, C=IN
  - CN=AddTrust External CA Root, OU=AddTrust External TTP Network, O=AddTrust AB, C=SE
  - CN=AddTrust Qualified CA Root, OU=AddTrust TTP Network, O=AddTrust AB, C=SE
  - CN=AffirmTrust Commercial, O=AffirmTrust, C=US
  - CN=AffirmTrust Networking, O=AffirmTrust, C=US
  - CN=AffirmTrust Premium ECC, O=AffirmTrust, C=US
  - CN=AffirmTrust Premium, O=AffirmTrust, C=US
VERDICT olvid: FIXED: before trusted CAs outside cacert; after: 0 store(s) == cacert, none with extra CAs (+ bundles inside archives remain, see above)

eMudhra chains (--emudhra; offline and reproducible): the 14 chains in fixtures/emudhra,
each leaf verified against each store (openssl verify -purpose sslserver, at 2026-10-23):
| output:path | before | after |
|---|---|---|
| out:/lib/security/cacerts | keystore: accepted 14/14 (g3: 7/7, aaa: 7/7, noct: 2/2) | absent |
inside archives (zip members, extracted):
| out:/share/olvid/webrtc-java-0.14.0-linux-x86_64.jar!libwebrtc-java-linux-x86_64.so | n/a (pem: no certificates readable) | n/a (pem: no certificates readable) |
VERDICT olvid emudhra: FIXED: before accepted 14/14 compromised eMudhra chains (g3: 7/7, aaa: 7/7, noct: 2/2); after 0/14

[2/2] live eMudhra test hosts: needs network, NOT reproducible offline
==================================================================
LIVE olvid: needs network; NOT reproducible offline (the static and behavioral checks are)
before: 8915027df75d0403ef013dd0cbf09ff3c602fd03   after: github:irgolic/nixpkgs/886fb4aa01b710c8ca4a9e941b32077d0f64b1b8
shim: shims/live/olvid.nix   hosts: https://<host>-emudhra.we-have-a-problem.com/, one request per host per side, 10s timeout
before ok (0 package drvs built, 2s)
        wrapper /nix/store/…-ca-live-olvid
after  ok (0 package drvs built, 3s)
        wrapper /nix/store/…-ca-live-olvid
system store: visible: /etc/ssl/certs/ca-certificates.crt -> nss-cacert-3.126/etc/ssl/certs/ca-bundle.crt /etc/pki/tls/certs/ca-bundle.crt -> nss-cacert-3.126/etc/ssl/certs/ca-bundle.crt
              rejects every served chain, so it cannot make a cell CONNECTED
              but it holds the root of dv-g3b,dv-g3b-aaa,dv-g3c,dv-g3c-aaa with a trust rule that REJECTS it (OpenSSL "certificate rejected"):
              a program that loads it next to its own store (OpenSSL's default paths, e.g. excon) is
              REFUSED there whatever its own store says; --no-system-store shows the package's store alone
control dv-g3b: ok: HTTP 200, served chain == fixtures/emudhra/dv-g3b-emudhra.we-have-a-problem.com.pem (3 certs, valid for the host up to emSign ECC Root CA - G3), stock cacert rejects it
control dv-g3b-aaa: ok: HTTP 200, served chain == fixtures/emudhra/dv-g3b-aaa-emudhra.we-have-a-problem.com.pem (2 certs, valid for the host up to AAA Certificate Services), stock cacert rejects it
control dv-g3c: ok: HTTP 200, served chain == fixtures/emudhra/dv-g3c-emudhra.we-have-a-problem.com.pem (3 certs, valid for the host up to emSign ECC Root CA - G3), stock cacert rejects it
control dv-g3c-aaa: ok: HTTP 200, served chain == fixtures/emudhra/dv-g3c-aaa-emudhra.we-have-a-problem.com.pem (2 certs, valid for the host up to AAA Certificate Services), stock cacert rejects it
  before dv-g3b      REFUSED        | Exception in thread "main" javax.net.ssl.SSLHandshakeException: (certificate_unknown) PKIX path building failed: sun.security.provider.certpath.SunCertPathBuild
  before dv-g3b-aaa  REFUSED        | Exception in thread "main" javax.net.ssl.SSLHandshakeException: (certificate_unknown) PKIX path building failed: sun.security.provider.certpath.SunCertPathBuild
  before dv-g3c      REFUSED        | Exception in thread "main" javax.net.ssl.SSLHandshakeException: (certificate_unknown) PKIX path building failed: sun.security.provider.certpath.SunCertPathBuild
  before dv-g3c-aaa  REFUSED        | Exception in thread "main" javax.net.ssl.SSLHandshakeException: (certificate_unknown) PKIX path building failed: sun.security.provider.certpath.SunCertPathBuild
  after  dv-g3b      REFUSED        | Exception in thread "main" javax.net.ssl.SSLHandshakeException: (certificate_unknown) PKIX path building failed: sun.security.provider.certpath.SunCertPathBuild
  after  dv-g3b-aaa  REFUSED        | Exception in thread "main" javax.net.ssl.SSLHandshakeException: (certificate_unknown) PKIX path building failed: sun.security.provider.certpath.SunCertPathBuild
  after  dv-g3c      REFUSED        | Exception in thread "main" javax.net.ssl.SSLHandshakeException: (certificate_unknown) PKIX path building failed: sun.security.provider.certpath.SunCertPathBuild
  after  dv-g3c-aaa  REFUSED        | Exception in thread "main" javax.net.ssl.SSLHandshakeException: (certificate_unknown) PKIX path building failed: sun.security.provider.certpath.SunCertPathBuild

olvid  (live; before 8915027df75d0403ef013dd0cbf09ff3c602fd03, after github:irgolic/nixpkgs/886fb4aa01b710c8ca4a9e941b32077d0f64b1b8)
         | dv-g3b         | dv-g3b-aaa     | dv-g3c         | dv-g3c-aaa
before   | REFUSED        | REFUSED        | REFUSED        | REFUSED
after    | REFUSED        | REFUSED        | REFUSED        | REFUSED
VERDICT olvid live: INCONCLUSIVE-BEFORE: before was REFUSED on all 4 host(s) too (the program's runtime store never trusted these chains, e.g. it runs on the already-fixed openjdk); after REFUSED on all 4. The host's system store, visible here, distrusts the roots of dv-g3b,dv-g3b-aaa,dv-g3c,dv-g3c-aaa: rerun with --no-system-store if the program also loads it

The harness tests the package with the certificate chains of the eMudhra incident, from https://emudhra.we-have-a-problem.com/ (only the certificates, not the keys). The trust store of the bundled runtime accepts all 14 chains (accepted 14/14), through emSign ECC Root CA - G3 and through the Sectigo cross-sign by AAA Certificate Services. This change removes this file (absent). Olvid does not operate on this runtime, but on the java of jdk21, and cacert makes the trust store of this JDK. In the second part of the output, a Java test on the java of the wrapper sends one request to each of four test servers. The test connects to no server before and after this change. This result is correct, because Olvid operates on jdk21 before and after this change.

Things done

Assisted-by: Claude Code (Claude Fable 5.1)
Assisted-by: Claude Code (Claude Opus 5.5)
@irgolic irgolic added the 1.severity: security Issues which raise a security issue, or PRs that fix one label Oct 23, 2026
@zimbatm zimbatm mentioned this pull request Oct 23, 2026
28 of 37 tasks
@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: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 9.needs: reviewer This PR currently has no reviewers requested and needs attention. llm-assisted Contributions that include code generation with LLMs labels Oct 23, 2026
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 9.needs: reviewer This PR currently has no reviewers requested and needs attention. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. llm-assisted Contributions that include code generation with LLMs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant