Skip to content

Windows: rsession.dll is not code-signed #18512

Closed

Description

@gtritchie

Problem

The Windows Desktop build ships rsession.dll unsigned. It is the only shipped session
binary that DigiCert signing skips.

The Sign Executables stage in jenkins/Jenkinsfile.windows signs seven binaries:

package\win32\build\src\cpp\session\rsession-utf8.exe
package\win32\build\src\cpp\session\rsession.exe
package\win32\build\src\cpp\session\x86\rsession.exe
package\win32\build\src\cpp\session\consoleio\consoleio.exe
package\win32\build\src\cpp\session\postback\rpostback.exe
package\win32\build\src\cpp\diagnostics\diagnostics.exe
src\node\desktop-build-AMD64\out\RStudio-win32-x64\rstudio.exe

rsession.dll is not in that list, but it is installed into the same directory as the
launcher stubs (src/cpp/session/CMakeLists.txt, install(TARGETS rsession-shared ...))
and so ends up in the installer. Multiarch builds produce two copies, one per
architecture:

  • package\win32\build\src\cpp\session\rsession.dll (x64)
  • package\win32\build\src\cpp\session\x86\rsession.dll (x86, RSTUDIO_INSTALL_BIN is
    x86 for RSTUDIO_SESSION_WIN32)

How this happened

#18070 (cc8959d7dd, 2026-06-25) moved the bulk of the session code out of
rsession.exe and rsession-utf8.exe, which each statically linked their own copy, into
a single shared library. The two executables became thin launcher stubs that forward to
rsessionMain() in the DLL. The signing list in jenkins/Jenkinsfile.windows was not
updated to match, so code that was previously covered by the signatures on the two
executables is now in an unsigned module.

Impact

The signed rsession.exe / rsession-utf8.exe stubs load an unsigned DLL that contains
essentially all of the session implementation. Policies that verify loaded modules rather
than just the launching image -- WDAC, AppLocker publisher rules, and some EDR
configurations -- can block or flag it, and the signature coverage of a shipped install no
longer matches what it was before #18070.

Fix

Add both DLL paths to %EXECUTABLES% in the Sign Executables stage of
jenkins/Jenkinsfile.windows. Signing runs before the Package stage, so the signed DLLs
get picked up by the installer with no further reordering.

Note that only rsession.dll is covered here; other DLLs in the shipped tree, including
those from the Electron distribution, were not audited.

Metadata

Metadata

Assignees

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions