-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem Updating VS Code - Blocked By AppLocker Due To Insufficient Information In Update Executable #73805
Comments
If I can provide any other information, or if anything I wrote is unclear, please let me know and I'll be happy to provide more information. Thanks! |
Can you tell me what values that TMP file has that you could already filter on? |
Hello! Here is more information about the tmp file: File Path: C:\USERS\USERNAME\APPDATA\LOCAL\TEMP\IS-PUPV1.TMP\CODESETUP-STABLE-51B0B28134D51361CF996D2F0A1C698247AEABD8.TMP File Hash: 5EF92093632A6169A704045D1925E0AC4382B311FDE22FAF8242454A24D7AFCB The signature logged by AppLocker shows "O=MICROSOFT CORPORATION, L=REDMOND, S=WASHINGTON, C=US\\51.1052.0.00", which implies that it's signed by MS and has a version number, but no product name registered in the signature with this file. Usually the other VS Code EXE's I have encountered have the Product Name "Product Name: VISUAL STUDIO CODE" associated with it, but this tmp file does not unfortunately have this. Please let me know if you need any other information that I can help provide. Thanks! |
Unfortunately I'm not sure we can customize the generated tmp file from Inno Setup... The product name is simply empty? |
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines. Happy Coding! |
Correct. Here are the file details of the file being blocked when attempting to run the update (it shows no Product Name:
Compare this to for instance to code.exe of VS Code that has a Product Name:
Here is the AppLocker information that is being read by the system for the failing .tmp file being read as a EXE:
The text "\\" in the Publisher shows the lack of a product name (the product name would have been between the 2 slashes). For instance here is how code.exe that has a product name looks:
Note that whatever mechanism is producing this file, it is producing a digitally signed file. Hence, if it's able to sign the file, I would imagine it should be possible to add a product name to these setup EXE file. I have attached the file in question as a Zip file (since .tmp files were not permitted) in case it helps troubleshoot this. Please let me know if I can provide any other information. Thanks! |
I am also getting this issue at work, and am available for testing / more information. |
Hello! Just a friendly check in to see if we can provide any other information that can help add a Product Name to this signed update file? Thanks! |
The TMP file is a regular executable and it is digitally signed and it is not the case here. The problem here is that Visual Studio doesn't have background updating functionality as Google Chrome has as an example. This process currently requires administrative rights to make changes in VSCode Program Files path. AppLocker is meant to work without admin rights. The application installation path must not contain writing permissions for the normal user. Otherwise it opens a door for the attackers to bypass AppLocker application whitelisting. Expected feature would be having an updating service to run on background that does all the updating magic in the background. It is very annoying that software users have to use admin rights for updating their software all the time. It would be acceptable if Windows had a sudo feature built-in. |
It is a perfectly valid applocker configuration to whitelist applications by digital signature and allow them to be run from writable folders. The signature ensures they have not been modified. (I'm not saying this is good or bad. I'm just saying it's valid.) Unless someone working on vscode found and fixed the bug separately from this github issue, one of the temp files is actually being incorrectly signed. That should be fixed, regardless of whether the updates are handled by background services or by the user. |
@aakash-shah Thanks for the very detailed explanation. I'll take a shot at this in July: https://stackoverflow.com/questions/47397961/inno-setup-uninstaller-versioninfo |
@martijnlaan I noticed this was addressed on Inno Setup 6: jrsoftware/issrc@29757d7 Any chance we could backport that to a hypothetical 5.6.2? Meanwhile I'll run some tests to see if we can update to 6 without big trouble. |
@joaomoreno No sorry, Inno Setup 5 used (really) old compilers and I can no longer build it. Let me know if you need help updating to version 6 but I think it shouldn't be too much of a problem. The compiler will recommend some changes but you could ignore those. Note that version 6 contains changes specifically made because of the vscode script which enables you to simplify it:
There's other reasons why you should update as well, like a more modern look, the use of more user friendly TaskDialog prompts in some places and improved protection against DLL hijacking, and more. After all, 5.6.1 is over two years old ;) BTW I also noticed your |
Great, many thanks for the write up. I already have builds running to give it a try. One additional question: did the |
The |
Great, good to know. We were already on Unicode, so we'll be fine. We should also be good on the version number. In order to minimize downtime during an update, we let Inno Setup place files in a temporary folder. We then shutdown VS Code and use |
Fixed by 0ff8647 |
Thank you Joao for the update and the fix. |
Unable to locate closing commit in issue timeline. You can manually reference a commit by commenting |
\closedWith 0ff8647 |
Issue Type: Bug
I am seeing an update for Visual Studio Code. In our environment, we have whitelisted the following:
However, when an update attempts to install, it appears to run a .tmp file as an EXE. However, this file has no product name associated with it and hence cannot run. Note that not all Microsoft signed products are allowed in this environment since there are some products we don't want users to be able to run/execute. Can we get these update files to also include a Product Name in the signature, ideally "VISUAL STUDIO CODE", or something static that doesn't change that we can whitelist?
Here is the error produced when attempting to run this update (I have removed the personal information):
VS Code version: Code 1.31.1 (1b8e830, 2019-02-12T02:20:54.427Z)
OS version: Windows_NT x64 10.0.17134
System Info
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
The text was updated successfully, but these errors were encountered: