[BUG] vrmonitor segfaults in QSslCertificate at startup: bundled Qt 5.5 picks up system OpenSSL 3 via libssl.so (workaround inside)

Aperta
#1,062 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
linux

Direzione di ricerca

Start by reproducing the crash with SteamVR's bundled Qt libraries and system OpenSSL, then compare library resolution with OpenSSL 1.0 available from LegacySteamRuntime. The issue names bin/linux64/qt/lib and identifies vrmonitor's startup network request and QSslCertificate::fromPath() as investigation entry points. Done means vrmonitor no longer crashes when parsing certificates on current distributions without relying on the manual workaround.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

Since the Steam client update 1794424036, vrmonitor segfaults about 1 s after SteamVR starts, and vrserver then shuts everything down ("Lost master process … Quitting all immediately"). SteamVR itself was not updated (still 2.18.4); the crash started with the client update.

SteamVR's bundled Qt (bin/linux64/qt/lib, Qt 5.5.0) loads OpenSSL at runtime by its unversioned name (libssl.so / libcrypto.so). It was built against OpenSSL 1.0 (it needs SSLeay, SSL_library_init, sk_num, CRYPTO_num_locks, …). On a current distro, libssl.so resolves to OpenSSL 3 (it comes from openssl-devel / libssl-dev). Qt logs cannot resolve … for those functions (the same warnings as #745), and then calls them anyway the first time it parses a certificate, which crashes. In my case that happens on the first QNetworkAccessManager::get at startup (shown while waiting for a wireless headset).

With OpenSSL 1.1 it crashes the same way. With OpenSSL 1.0 it works.

Environment

  • Distro: Nobara Linux 44 (Fedora 44 base), kernel 7.2, KDE Plasma
  • OpenSSL: 3.5.9 (openssl-devel installed, so /usr/lib64/libssl.so → libssl.so.3)
  • Steam client: 1794424036 (native, not Flatpak)
  • SteamVR: 2.18.4 (stable), vrlink 0.5.8 (Steam Frame)
  • GPU: AMD (Mesa 26.2)

Stack (coredumpctl)

#0  libQt5Network.so.5 + 0x1003c1
#1  libQt5Network.so.5 + 0xf1537
#2  libQt5Network.so.5 + 0xf2042
#3  QSslCertificate::fromData(QByteArray const&, QSsl::EncodingFormat)
#4  QSslCertificate::fromPath(QString const&, QSsl::EncodingFormat, QRegExp::PatternSyntax)
#7  QSslCertificate::QSslCertificate(QByteArray const&, QSsl::EncodingFormat)
#8  QSslConfiguration::QSslConfiguration()
#11 QNetworkAccessManager::createRequest(...)
#12 QNetworkAccessManager::get(QNetworkRequest const&)
#13 vrmonitor + 0x24e05f

Reproduce outside SteamVR

Loading SteamVR's libQt5Network.so.5 and calling QSslCertificate::fromPath() on any single certificate (for example any certificate from /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem) segfaults with the system OpenSSL 3 and with OpenSSL 1.1. It parses all of them fine when OpenSSL 1.0 is found first.

Workaround

Give SteamVR's Qt the OpenSSL 1.0 that Steam already ships in the Legacy Steam Runtime (install "Steam Linux Runtime" / LegacySteamRuntime if it's missing). qt/lib is on vrmonitor's LD_LIBRARY_PATH, ahead of the system libraries:

L=~/.local/share/Steam/steamapps/common/LegacySteamRuntime/steam-runtime/lib/x86_64-linux-gnu
cd ~/.local/share/Steam/steamapps/common/SteamVR/bin/linux64/qt/lib
cp -L "$L/libssl.so.1.0.0" "$L/libcrypto.so.1.0.0" .
ln -sf libssl.so.1.0.0 libssl.so
ln -sf libcrypto.so.1.0.0 libcrypto.so

A SteamVR update or a file verification may remove these files; run the commands again if so. To undo, delete the four entries.

Suggested fix

Ship the OpenSSL that the bundled Qt was built for in qt/lib (or load it by its versioned name), so vrmonitor never picks up the system's unversioned libssl.so. A Qt build that has OpenSSL linked in, or a newer Qt, would avoid the problem entirely.

Lingua principale
Shell
Stelle
1.2k
Fork
58
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ValveSoftware/SteamVR-for-Linux

Tutte le issue di ValveSoftware/SteamVR-for-Linux

Issue simili

Altre issue su Shell/Bash

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.