Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Backport Wine 35b1e7eb9a: schannel DecryptMessage reports wrong SECBUFFER_MISSING size, TLS reads hang (Wollay Launcher / reqwest native-tls)

Aperta Adatta ai principianti
#366 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
c, rust

Direzione di ricerca

Il bug si trova in schan_DecryptMessage in dlls/secur32/schannel.c, dove il secondo SECBUFFER_MISSING viene calcolato dopo che il puntatore del buffer è già stato spostato, quindi riporta la dimensione completa del record. Leggi la funzione intorno al ramo del record incompleto e confrontala con il commit upstream 35b1e7eb9a. È fatto quando il secondo buffer riporta il numero di byte rimanenti, il todo_wine corrispondente viene rimosso da dlls/secur32/tests/schannel.c e quel test passa con il test runner di Wine.

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

Descrizione

Proton versions: seen on GE-Proton11-1. Source checked: the fix is missing in ValveSoftware/wine experimental_11.0, proton_11.0 and bleeding-edge, and in the wine submodule of GE-Proton11-7.
Affected application: Wollay Launcher 0.4.7 / 0.4.8 (Cube World Omega beta launcher, non-Steam, Rust/Tauri). The bug likely affects any Rust app that uses reqwest/native-tls → the schannel crate, and possibly other Schannel clients that trust SECBUFFER_MISSING.

Request

Please backport upstream Wine commit 35b1e7eb9a ("secur32/schannel: Fix returned required buffer size for incomplete messages in DecryptMessage()", in wine-11.6+). It is a 2-line change in dlls/secur32/schannel.c.

Problem

For an incomplete TLS record, schan_DecryptMessage sets the first SECBUFFER_MISSING correctly. It then computes the second one as expected_size - buffer->cbBuffer after buffer has been moved to the empty buffer, so the second SECBUFFER_MISSING reports the full record size instead of the remaining bytes. Windows reports the remaining byte count in both buffers (the upstream commit removes the matching todo_wine in dlls/secur32/tests/schannel.c).

All three Valve branches still have the old line:

buffer->cbBuffer = expected_size - buffer->cbBuffer;

Effect

The Rust schannel crate (0.1.29, used by native-tls/reqwest) takes needs_read from that second buffer, and its read_in keeps reading until needs_read bytes have arrived. When the last TLS record of a response arrives split across reads on a keep-alive connection (here Cloudflare), the peer never sends the extra bytes, so the read waits until the application times out.

Seen with Wollay Launcher under GE-Proton (Schannel negotiates TLS 1.2, ECDHE-ECDSA-CHACHA20-POLY1305, HTTP/1.1):

  • Game updates hang on "Checking access and updates…" or mid-download, then fail after ~60–90 s with "The update connection was interrupted. Retry to resume."
  • The launcher self-update sits at "Downloading launcher … 99%".
  • The same endpoints download quickly with curl/OpenSSL on the host, and through a local proxy whose upstream connection uses OpenSSL (TLS 1.3).

The launcher binary contains both tokio-native-tls/schannel-0.1.29 and rustls. reqwest 0.13.5 without http3 defaults to native-tls, so its update HTTP client goes through Wine's Schannel.

Notes

  • Upstream Wine 11.19 has the fix, but the launcher shows a blank window there (missing DirectComposition, Wine bug 55432). Proton renders the launcher but has this TLS bug, so neither runtime works fully for this app today.
  • I found the root cause by reading the Wine, schannel-crate and launcher code, not by debugging a running launcher; the launcher needs beta account access to download. Happy to test a build with the backport.
Lingua principale
C
Stelle
2.1k
Fork
509
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/wine

Tutte le issue di ValveSoftware/wine

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.