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

Abierto
#1,062 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
55/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
linux

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Shell
Estrellas
1.2k
Forks
58
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de ValveSoftware/SteamVR-for-Linux

Todos los issues de ValveSoftware/SteamVR-for-Linux

Issues similares

Más issues de Shell/Bash

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.