pwsh/powershell VT quirk causes conhost crash when resizing while alt buffer is being used #17398

Open
opened 2026-01-31 05:41:16 +00:00 by claunia · 0 comments
Owner

Originally created by @DHowett on GitHub (May 4, 2022).

Repro:

while($true){ "`e[?1049h";sleep 0.25;"`e[?1049l"; sleep 0.25}

Resize the window horizontally while it's running.

Toggling the alt buffer from pwsh.exe or powershell.exe (specifically) causes us to UAF the outgoing SCREEN_INFORMATION here:
71cbdc8a1f/src/host/_stream.cpp (L1038-L1040)

Originally created by @DHowett on GitHub (May 4, 2022). Repro: ``` while($true){ "`e[?1049h";sleep 0.25;"`e[?1049l"; sleep 0.25} ``` Resize the window horizontally while it's running. Toggling the alt buffer _from pwsh.exe or powershell.exe_ (specifically) causes us to UAF the outgoing `SCREEN_INFORMATION` here: https://github.com/microsoft/terminal/blob/71cbdc8a1f6b8da10d130c053489445e99a4fc13/src/host/_stream.cpp#L1038-L1040
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17398