Backport Wine 35b1e7eb9a: schannel DecryptMessage reports wrong SECBUFFER_MISSING size, TLS reads hang (Wollay Launcher / reqwest native-tls)
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
- Ambito
- networking, operating-systems
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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ValveSoftware/wine
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ValveSoftware/wine#363 · 1 reazione ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
ValveSoftware/wine#353 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
ValveSoftware/wine#303 · 3 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
ValveSoftware/wine#358 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
ValveSoftware/wine#354 ·
Tutte le issue di ValveSoftware/wine
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
ChrisTitusTech/dwm-titus#397 ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue help wanted language:fr translation
Difficoltà 1/5 1-3 ore Idoneità per principianti 85/100
mrvi0/cli-cheatsheet#160 ·
-
Test modules use volatile int for cross-thread flags instead of atomicsForse già presa @rahimuddin140 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
valkey-io/valkey#4899 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Profiler (Remotery) leaks a socket for every connection that fails the WebSocket handshakeForse già presa @rthery l’ha presa oggi. Apertatriage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Symlink in release archive attempts traversalForse già presa @Tiancheng-Xu l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
redis/hiredis#1388 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno