From cc2d9d173a5d0248d66fce5d6d6f45962628d3fe Mon Sep 17 00:00:00 2001 From: Stuart Date: Thu, 22 Oct 2026 13:50:26 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20distrust=20the=20compromised=20eMudhra?= =?UTF-8?q?=20CAs;=2032.5.5:0=20=E2=86=92=2032.5.5:1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit jgraph/drawio:32.5.5 runs Tomcat on Temurin 11, whose own cacerts and the image's Ubuntu 26.04 bundle (ca-certificates 20260601~26.04.1) both trust emSign ECC Root CA - G3. The server's one outbound TLS path, /embed2.js?fetch=, fetches caller-named public URLs with the JVM's default trust. A root Dockerfile takes the upstream image as the IMAGE build arg, upgrades ca-certificates to 20260816ubuntu0.26.04.1 and rebuilds $JAVA_HOME/lib/security/cacerts from it with trust extract. The build fails if either store still holds G3. The manifest switches from dockerTag to dockerBuild naming the same image; README and UPDATING.md describe the layer. Tested on StartOS 0.4.0.2 (x86_64): updating from 32.5.5:0 kept the primary URL and raised no task, the running container's cacerts and bundle hold no G3, and the service started and restarted healthy. Co-Authored-By: Claude Opus 5.5 --- Dockerfile | 14 ++++++++++++++ README.md | 8 +++++--- UPDATING.md | 4 ++-- startos/manifest/index.ts | 4 +++- startos/versions/current.ts | 13 ++++++------- 5 files changed, 30 insertions(+), 13 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..78085d2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +ARG IMAGE +FROM ${IMAGE} +USER root +# The JVM trusts its own cacerts, fixed when the JDK was built, not the system store. +RUN apt-get update \ + && apt-get install -y --only-upgrade ca-certificates \ + && rm -rf /var/lib/apt/lists/* \ + && trust extract --overwrite --format=java-cacerts --filter=ca-anchors --purpose=server-auth \ + "$JAVA_HOME/lib/security/cacerts" \ + && ! grep -q MIICTjCCAdOgAwIBAgIKPPYHqWhwDtqLhDAKBggqhkjOPQQDAzBr /etc/ssl/certs/ca-certificates.crt \ + && keytool -list -v -cacerts -storepass changeit > /tmp/cacerts.txt \ + && ! grep -q 'CN=emSign ECC Root CA - G3' /tmp/cacerts.txt \ + && rm /tmp/cacerts.txt +USER tomcat diff --git a/README.md b/README.md index 03fc0e9..e82d5b0 100644 --- a/README.md +++ b/README.md @@ -35,12 +35,14 @@ affiliated with or endorsed by draw.io Ltd, which owns the draw.io name and logo ## Image and Container Runtime -The package runs draw.io's official image unmodified, with its own entrypoint, in one -subcontainer. +The package runs draw.io's official image, with its own entrypoint, in one +subcontainer. The root `Dockerfile` upgrades its CA store and rebuilds Java's `cacerts` +from it, a temporary layer that comes out once upstream ships an image whose Java no +longer trusts emSign ECC Root CA - G3. | Property | Value | | ------------- | ---------------------------------------------------------------- | -| Image | `jgraph/drawio`, upstream, unmodified | +| Image | `jgraph/drawio`, upstream, plus the CA-store layer | | Architectures | x86_64, aarch64 | | Entrypoint | upstream `docker-entrypoint.sh`, then Tomcat (`catalina.sh run`) | | User | the image's `tomcat` user | diff --git a/UPDATING.md b/UPDATING.md index c306b28..155b815 100644 --- a/UPDATING.md +++ b/UPDATING.md @@ -32,8 +32,8 @@ a rebuild of the same version picks up the newer bytes. ## Applying the bump -1. Set `images.drawio.source.dockerTag` in `startos/manifest/index.ts` to - `jgraph/drawio:X.Y.Z`. +1. Set the `IMAGE` build arg of `images.drawio.source.dockerBuild` in + `startos/manifest/index.ts` to `jgraph/drawio:X.Y.Z`. 2. In `startos/versions/current.ts`, set `version` to `X.Y.Z:0` and rewrite the release notes for the new range, linking the upstream releases page. 3. Check the upstream entrypoint for changed environment variables before diff --git a/startos/manifest/index.ts b/startos/manifest/index.ts index f483c3c..a9422b2 100644 --- a/startos/manifest/index.ts +++ b/startos/manifest/index.ts @@ -13,7 +13,9 @@ export const manifest = setupManifest({ volumes: ['startos'], images: { drawio: { - source: { dockerTag: 'jgraph/drawio:32.5.5' }, + source: { + dockerBuild: { buildArgs: { IMAGE: 'jgraph/drawio:32.5.5' } }, + }, arch: ['x86_64', 'aarch64'], }, }, diff --git a/startos/versions/current.ts b/startos/versions/current.ts index 5a83d21..da6e948 100644 --- a/startos/versions/current.ts +++ b/startos/versions/current.ts @@ -1,18 +1,17 @@ import { IMPOSSIBLE, VersionInfo } from '@start9labs/start-sdk' export const current = VersionInfo.of({ - version: '32.5.5:0', + version: '32.5.5:1', releaseNotes: { en_US: - 'Updated draw.io to 32.5.5. Replace All now works across All Pages, and the SQL, animation, WebCola, Freemind import, F5 rack, flow and edge connection plugins are removed. Full list of changes: https://github.com/jgraph/drawio/blob/v32.5.5/ChangeLog', + 'Stops trusting certificates from a compromised certificate authority (eMudhra).', es_ES: - 'draw.io actualizado a 32.5.5. Reemplazar todo ahora funciona en Todas las páginas, y se eliminan los complementos SQL, animación, WebCola, importación de Freemind, rack F5, flujo y conexión de aristas. Lista completa de cambios: https://github.com/jgraph/drawio/blob/v32.5.5/ChangeLog', + 'Deja de confiar en los certificados de una autoridad de certificación comprometida (eMudhra).', de_DE: - 'draw.io auf 32.5.5 aktualisiert. Alle ersetzen funktioniert jetzt über Alle Seiten, und die Plugins SQL, Animation, WebCola, Freemind-Import, F5-Rack, Flow und Kantenverbindung wurden entfernt. Vollständige Liste der Änderungen: https://github.com/jgraph/drawio/blob/v32.5.5/ChangeLog', + 'Vertraut Zertifikaten einer kompromittierten Zertifizierungsstelle (eMudhra) nicht mehr.', pl_PL: - 'Zaktualizowano draw.io do 32.5.5. Zamień wszystkie działa teraz na Wszystkie strony, a wtyczki SQL, animacji, WebCola, importu Freemind, szafy F5, przepływu i połączeń krawędzi zostały usunięte. Pełna lista zmian: https://github.com/jgraph/drawio/blob/v32.5.5/ChangeLog', - fr_FR: - 'draw.io mis à jour vers la version 32.5.5. Tout remplacer fonctionne désormais sur Toutes les pages, et les plugins SQL, animation, WebCola, import Freemind, baie F5, flux et connexion des liens sont supprimés. Liste complète des changements : https://github.com/jgraph/drawio/blob/v32.5.5/ChangeLog', + 'Przestaje ufać certyfikatom przejętego urzędu certyfikacji (eMudhra).', + fr_FR: `Ne fait plus confiance aux certificats d'une autorité de certification compromise (eMudhra).`, }, migrations: { up: async ({ effects }) => {},