Repository navigation
Sign rsession.dll in the Windows release build - #18516
Merged
Merged
Conversation
#18070 moved the bulk of the session code out of rsession.exe and rsession-utf8.exe into a shared library, leaving the two executables as thin launcher stubs. The Sign Executables stage was not updated, so the signed stubs load an unsigned DLL holding essentially all of the session implementation -- which WDAC, AppLocker publisher rules, and some EDR configurations evaluate as a loaded module. Add both build-tree copies of the DLL to %EXECUTABLES%: the x64 one next to the stubs, and the x86 one that the multiarch build installs into src/cpp/session/x86 alongside x86/rsession.exe. Signing already runs before the Package stage, so the installer picks up the signed DLLs. Addresses #18512
This was referenced Aug 14, 2026
gtritchie
added a commit
that referenced
this pull request
Aug 14, 2026
Backport of #18516 (06473dc) to Yellow Yarrow. This branch carries the rsession-shared library from #18070, so rsession.exe and rsession-utf8.exe are thin launcher stubs and rsession.dll holds essentially all of the session implementation -- but %EXECUTABLES% in the Sign Executables stage still named only the .exe files, so the shipped DLL was unsigned. Add both build-tree copies of the DLL: the x64 one next to the stubs, and the x86 one that the multiarch build installs into src/cpp/session/x86 alongside x86/rsession.exe. Signing runs before the Package stage, so the installer picks up the signed DLLs. The NEWS entry goes in version/news/os/NEWS-2026.08.1-yellow-yarrow.md, since NEWS.md is not carried on this branch. Addresses #18557
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Windows Desktop build ships
rsession.dllunsigned. #18070 moved the bulk of thesession code out of
rsession.exeandrsession-utf8.exe-- which each statically linkedtheir own copy -- into a shared library, leaving the two executables as thin launcher stubs
that forward to
rsessionMain()in the DLL. TheSign Executablesstage was not updated tomatch, so the signed stubs load an unsigned module holding essentially all of the session
implementation. Policies that verify loaded modules rather than only the launching image --
WDAC, AppLocker publisher rules, and some EDR configurations -- can block or flag it.
Change
Adds both build-tree copies of the DLL to
%EXECUTABLES%injenkins/Jenkinsfile.windows:package\win32\build\src\cpp\session\rsession.dll(x64, next to the stubs)package\win32\build\src\cpp\session\x86\rsession.dll(x86 from the multiarch sub-build,alongside the already-signed
x86\rsession.exe)Signing runs before the
Packagestage, so the installer picks up the signed DLLs with noreordering.
Verification
executables the stage already signs.
install(TARGETS rsession-shared RUNTIME DESTINATION "${RSTUDIO_INSTALL_BIN}")(
src/cpp/session/CMakeLists.txt:707) is what places the x86 copy undersession/x86,and
MULTIARCHis forced on for Jenkins builds, sosigntoolwill not miss the file.package/win32/scripts/upload-debug-symbols.ps1already listsrsession-shared.pdbforboth architectures, so its "keep in sync with the executables signed in
Jenkinsfile.windows" comment now holds.
Signing itself only runs on the Windows pipeline, so this needs manual verification on a
daily build:
signtool verify /pa(or the Digital Signatures tab) on the installedrsession.dll.Notes
Only
rsession.dllis covered here; other DLLs in the shipped tree, including those fromthe Electron distribution, were not audited.
The two
x86\...entries in the sign list currently sign files that do not reach theinstaller -- see #18515, a separate packaging regression from #17814 being fixed on its own
branch. Keeping the x86 DLL entry in place means the payload is signed once that is fixed.
Addresses #18512.