TC9.50b3: pasting a file from a privileged directory into the address bar may crash Total Commander
Moderators: Hacker, petermad, Stefan2, white
TC9.50b3: pasting a file from a privileged directory into the address bar may crash Total Commander
Total Commander's address bar is kind enough to convert a pasted file to its path, but when the file is from a privileged directory, this may cause a crash. This issue also affects previous versions.
To reproduce:
1. Launch Everything, and use Ctrl+C to copy a file from a privileged directory into clipboard. These files work on my laptop:
C:\Windows\SysWOW64\config\systemprofile\AppData\Local\CrashDumps\logonset.exe.6444.dmp
C:\Windows\ServiceProfiles\LocalService\AppData\Local\CrashDumps\printfilterpipelinesvc.exe.20156.dmp
2. Highlight Total Commander's address bar and press Ctrl+V. The address bar will become empty, followed by a silent crash in about 2 seconds.
Note:
1. Ctrl+Shift+C in Everything copies a file's full path, and pasting this path into Total Commander's address bar brings up the familiar "Access denied..." dialog box.
2. Not every file from a privileged directory causes a crash.
I would call this laziness rather than a bug, but it's sad to see Total Commander accidentally pass away.
To reproduce:
1. Launch Everything, and use Ctrl+C to copy a file from a privileged directory into clipboard. These files work on my laptop:
C:\Windows\SysWOW64\config\systemprofile\AppData\Local\CrashDumps\logonset.exe.6444.dmp
C:\Windows\ServiceProfiles\LocalService\AppData\Local\CrashDumps\printfilterpipelinesvc.exe.20156.dmp
2. Highlight Total Commander's address bar and press Ctrl+V. The address bar will become empty, followed by a silent crash in about 2 seconds.
Note:
1. Ctrl+Shift+C in Everything copies a file's full path, and pasting this path into Total Commander's address bar brings up the familiar "Access denied..." dialog box.
2. Not every file from a privileged directory causes a crash.
I would call this laziness rather than a bug, but it's sad to see Total Commander accidentally pass away.
#147523
- ghisler(Author)
- Site Admin
- Posts: 50532
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: TC9.50b3: pasting a file from a privileged directory into the address bar may crash Total Commander
So far I couldn't reproduce it, I just get a beep.
- Do these files need to exist?
- Do you need to go to the forbidden dir with admin rights first?
- Do these files need to exist?
- Do you need to go to the forbidden dir with admin rights first?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: TC9.50b3: pasting a file from a privileged directory into the address bar may crash Total Commander
Thanks for your response, ghisler!
These files need to exist, otherwise they cannot be copied from Everything. On a clean desktop I tried with a new empty file
C:\Windows\ServiceProfiles\LocalService\AppData\Roaming\aaaa.txt
and triggered the same crash. (Not sure if it's caused by a plugin, because Total Commander uses the same configuration on both machines.)
Admin right is not acquired before pasting. I tried again with admin acquired. This time no crash happened, but the pasted path was always "C:\Users\yyang\Desktop" ("yyang" is my user name).
These files need to exist, otherwise they cannot be copied from Everything. On a clean desktop I tried with a new empty file
C:\Windows\ServiceProfiles\LocalService\AppData\Roaming\aaaa.txt
and triggered the same crash. (Not sure if it's caused by a plugin, because Total Commander uses the same configuration on both machines.)
Admin right is not acquired before pasting. I tried again with admin acquired. This time no crash happened, but the pasted path was always "C:\Users\yyang\Desktop" ("yyang" is my user name).
#147523
- ghisler(Author)
- Site Admin
- Posts: 50532
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: TC9.50b3: pasting a file from a privileged directory into the address bar may crash Total Commander
Sorry, no crash here. There is no folder Crashdumps here in the given location, so I did the following:
1. Go to c:\Windows\ServiceProfiles\LocalService\AppData\Roaming\ (with admin rights)
2. Copy file aaaaa.txt to that directory
3. Returned to c:\Windows
4. Closed and reopened TC to end root rights
5. Started Everything
6. Searched for aaaaa.txt
7. Right clicked on aaaaa.txt in c:\Windows\ServiceProfiles\LocalService\AppData\Roaming\
8. Chose "Copy with path"
9. Clicked on address bar in TC
10. Pressed Ctrl+V
11. Pressed ENTER
-> I got error "Access denied" with buttons "OK" and "As Administrator"
1. Go to c:\Windows\ServiceProfiles\LocalService\AppData\Roaming\ (with admin rights)
2. Copy file aaaaa.txt to that directory
3. Returned to c:\Windows
4. Closed and reopened TC to end root rights
5. Started Everything
6. Searched for aaaaa.txt
7. Right clicked on aaaaa.txt in c:\Windows\ServiceProfiles\LocalService\AppData\Roaming\
8. Chose "Copy with path"
9. Clicked on address bar in TC
10. Pressed Ctrl+V
11. Pressed ENTER
-> I got error "Access denied" with buttons "OK" and "As Administrator"
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: TC9.50b3: pasting a file from a privileged directory into the address bar may crash Total Commander
In step 7 and 8, please don't choose "Copy with path". Just use Ctrl+C to copy the file itself, and Ctrl+V in the address bar.
#147523
- ghisler(Author)
- Site Admin
- Posts: 50532
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: TC9.50b3: pasting a file from a privileged directory into the address bar may crash Total Commander
I can indeed reproduce the crash now. Unfortunately it seems to happen completely within the Windows edit control window procedure. It's very strange because I use the same edit control for renaming files, and there it doesn't crash. I will investigate further, but it's possible that I will not be able to fix it.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: TC9.50b3: pasting a file from a privileged directory into the address bar may crash Total Commander
That's quite OK, and please don't spend too much time on it. Maybe I've been spoiled by Total Commander over the years. Thank you sincerely.
#147523
- ghisler(Author)
- Site Admin
- Posts: 50532
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: TC9.50b3: pasting a file from a privileged directory into the address bar may crash Total Commander
It really crashes inside of Windows: When you copy with Ctrl+C, it does NOT put a file path in the clipboard. Instead it puts an OLE object of the actual file there. Windows tries to access that file, and causes the crash because it fails. I can try to completely disable paste when the clipboard doesn't contain a name, but then you won't be able to paste names when you copied files.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: TC9.50b3: pasting a file from a privileged directory into the address bar may crash Total Commander
Thanks a lot for the investigation! I'm totally content with the current behavior. 

#147523
Re: TC9.50b3: pasting a file from a privileged directory into the address bar may crash Total Commander
I think you can fix this crash but make it possible to enable the feature "to paste names when you copied files" by wincmd.ini parameter for users who will use this often and don't care of possible crashes. You already fixed some Windows bugs in TC this way.ghisler(Author) wrote: 2019-11-06, 17:35 UTCI can try to completely disable paste when the clipboard doesn't contain a name, but then you won't be able to paste names when you copied files.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Re: TC9.50b3: pasting a file from a privileged directory into the address bar may crash Total Commander
Can you reproduce it with 32-bit TC? I'm asking because when trying to make a partial fix, Christian Ghisler found that he can't reproduce it anymore on his Windows 10 machines. The PC with 64-bit Windows 10 to which I has access is still on repair, and on my Vista 32-bit I cannot reproduce the crash (in latest stable Everything, I tried to copy with Ctrl+C some files from C:\Windows\System32\config\systemprofile\AppData\Local\CrashDumps\ and similar protected locations, and on Ctrl+V, Enter in TC's current directory bar I just get a beep, but no crash).yyang wrote: 2019-11-05, 01:09 UTCIn step 7 and 8, please don't choose "Copy with path". Just use Ctrl+C to copy the file itself, and Ctrl+V in the address bar.
Also, additional questions:
is Everything required to reproduce the crash, or it also happens for you if copy such file with Ctrl+C from search results of elevated TC?
Does it crash on pasting only into not elevated TC, or elevated TC crashes too?
Should some specific location to be opened in TC's panel where we're pasting into current directory bar?
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Re: TC9.50b3: pasting a file from a privileged directory into the address bar may crash Total Commander
Hi, thanks for asking, and very sorry for my late response! Let's see what'll happen to "C:\Windows\ServiceProfiles\LocalService\AppData\Roaming\aaaa.txt" on my machine, a fully patched Windows 10:
1. Locate it in Everything, Ctrl+C.
2. Highlight Total Commander's address bar, Ctrl+V.
3. Crash! (Both 32- and 64-bit version, 9.51 RC3)
1a. Open the protected directory in Windows Explorer, and Ctrl+C on aaaa.txt.
2a. Highlight Total Commander's address bar, Ctrl+V.
3a. Only the full path is pasted in, no crash at all! (Both versions)
4a. Ctrl+V in the file list copies over aaaa.txt just as expected.
Seems that "is Everything required to reproduce the crash" is the key difference.
1. Locate it in Everything, Ctrl+C.
2. Highlight Total Commander's address bar, Ctrl+V.
3. Crash! (Both 32- and 64-bit version, 9.51 RC3)
1a. Open the protected directory in Windows Explorer, and Ctrl+C on aaaa.txt.
2a. Highlight Total Commander's address bar, Ctrl+V.
3a. Only the full path is pasted in, no crash at all! (Both versions)
4a. Ctrl+V in the file list copies over aaaa.txt just as expected.
Seems that "is Everything required to reproduce the crash" is the key difference.
#147523
Re: TC9.50b3: pasting a file from a privileged directory into the address bar may crash Total Commander
yyang, thanks for your answers.
Are you launching x86/32-bit or 64-bit Everything app? Is it started elevated (as administrator)?
Will it crash if you'll paste in address bar of elevated 32-bit/64-bit Total Commander?
Can you please try also following:
1. Launch elevated TC.
2. While in C:\Windows\, open Find Files in Separate Process (cm_SearchStandalone) and search for your file aaaa.txt.
3. Open independent elevated and not elevated Total Commander copies, both 32-bit and 64-bit (so you'll have 4 independent TC instances).
4. From Find Files, Feed the found aaaa.txt to listboxes of independent TC instances.
5. In search results panels of independent TC instances, copy aaaa.txt with Ctrl+C, and try to paste in adderss bars of launched Total Commander instances. Does it crash in this case (always/never/only while copy/paste between some of launched TC instances)?
It may also help if you'll share your aaaa.txt file NTFS permissions:
1. Export the rights with iCACLS command: in elevated cmd.exe, execute
Then share the exported .acl file.
2. In some cases the icalcs doesn't restore all the rights from .acl file exported with above method, but it's also possible to pack the aaaa.txt file itself with its permissions:
1) install WinRAR and open its elevated copy (start it as administrator);
2) in opened WinRAR, go to C:\Windows\ServiceProfiles\LocalService\AppData\Roaming\, select aaaa.txt;
3) open Commands->Add files to archive;
4) In "Archive name and parameters" dialog, on Advanced tab check "NTFS Options"->"Save file security" option,
and on Files tab, pick "File path"->"Store full path" or "Store full path including drive letter".
5) pack the file and share it.
Above steps are for WinRAR 3.62 which I have, but it should be same or similar in newer WinRAR versions.
Are you launching x86/32-bit or 64-bit Everything app? Is it started elevated (as administrator)?
Will it crash if you'll paste in address bar of elevated 32-bit/64-bit Total Commander?
Can you please try also following:
1. Launch elevated TC.
2. While in C:\Windows\, open Find Files in Separate Process (cm_SearchStandalone) and search for your file aaaa.txt.
3. Open independent elevated and not elevated Total Commander copies, both 32-bit and 64-bit (so you'll have 4 independent TC instances).
4. From Find Files, Feed the found aaaa.txt to listboxes of independent TC instances.
5. In search results panels of independent TC instances, copy aaaa.txt with Ctrl+C, and try to paste in adderss bars of launched Total Commander instances. Does it crash in this case (always/never/only while copy/paste between some of launched TC instances)?
It may also help if you'll share your aaaa.txt file NTFS permissions:
1. Export the rights with iCACLS command: in elevated cmd.exe, execute
Code: Select all
icacls C:\Windows\ServiceProfiles\LocalService\AppData\Roaming\aaaa.txt /save C:\Windows\ServiceProfiles\LocalService\AppData\Roaming\aaaa.txt.acl
2. In some cases the icalcs doesn't restore all the rights from .acl file exported with above method, but it's also possible to pack the aaaa.txt file itself with its permissions:
1) install WinRAR and open its elevated copy (start it as administrator);
2) in opened WinRAR, go to C:\Windows\ServiceProfiles\LocalService\AppData\Roaming\, select aaaa.txt;
3) open Commands->Add files to archive;
4) In "Archive name and parameters" dialog, on Advanced tab check "NTFS Options"->"Save file security" option,
and on Files tab, pick "File path"->"Store full path" or "Store full path including drive letter".
5) pack the file and share it.
Above steps are for WinRAR 3.62 which I have, but it should be same or similar in newer WinRAR versions.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Re: TC9.50b3: pasting a file from a privileged directory into the address bar may crash Total Commander
@DrShark My Everything is 64-bit and runs as a non-admin auto-start service.
Pasting from Everything to an elevated Total Commander gets the "C:\Users\yyang\Desktop" path. That's weird...
Pasting from an elevated Total Commander's search result to another instance always gets the correct full path w/o crashing, just permission required when I press Enter.
The .rar file can be found here: https://www.dropbox.com/s/qdknqtus0p1u0u4/aaaa.rar?dl=0 (expires in 2 days).
Pasting from Everything to an elevated Total Commander gets the "C:\Users\yyang\Desktop" path. That's weird...
Pasting from an elevated Total Commander's search result to another instance always gets the correct full path w/o crashing, just permission required when I press Enter.
The .rar file can be found here: https://www.dropbox.com/s/qdknqtus0p1u0u4/aaaa.rar?dl=0 (expires in 2 days).
#147523
Re: TC9.50b3: pasting a file from a privileged directory into the address bar may crash Total Commander
On Vista it seems it doesn't crash because there Explorer doesn't copy the paths with files (Ctrl+C in Everything uses Explorer's method).
On Windows 7 32-bit I reproduced the crash:
1. Start TC with clean ini.
2. Start elevated portable Everything to make it possible to index NTFS drives.
3. In Everything settings, enable all settings for indexing c:\ drive. Indexing should be quick.
4. In Everything's search field, enter:
serviceprofiles\
- this will make it show everything under c:\windows\serviceprofiles
5. Select all found dirs/files in Everything and press Ctrl+C.
6. In TC, activate current directory bar, command line or Shift+F4 input field.
7. Press Ctrl+V: TC will show access violation error like following:
* Current directory bar paste crash:
* Command line paste crash
*Shift+F4 inputbox paste crash:
yyang, do you get similar error message when crash happens on your system? If yes, please post it too.
Edit: in start post you wrote: "The address bar will become empty, followed by a silent crash in about 2 seconds." - so we got different kind of crashes...
On Windows 7 32-bit I reproduced the crash:
1. Start TC with clean ini.
2. Start elevated portable Everything to make it possible to index NTFS drives.
3. In Everything settings, enable all settings for indexing c:\ drive. Indexing should be quick.
4. In Everything's search field, enter:
serviceprofiles\
- this will make it show everything under c:\windows\serviceprofiles
5. Select all found dirs/files in Everything and press Ctrl+C.
6. In TC, activate current directory bar, command line or Shift+F4 input field.
7. Press Ctrl+V: TC will show access violation error like following:
* Current directory bar paste crash:
Code: Select all
---------------------------
Total Commander 9.51 RC3
---------------------------
Access violation at address 761B15A2. Read of address 098819AA.
Access violation at address 761B15A2. Read of address 098819AA
Windows 7 SP1 HomePremium 6.1 (Build 7601), base: 00400000
Please report this error to the Author, with a description
of what you were doing when this error occurred!
Windows exception: C0000005
Stack trace:
761B15A2
0044DCD6 0044CD8A >0042886E 0044C32C 0042886E 0042E0A9
0042E144
Raw:
0044C282 0042886E 0044D103 0043875A 0044DCD6 0044AD89
0044D059 0044C3F6 0044CD8A 0042886E 0044C32C 0042886E
0042E0A9 0042E144 0042E2FE
Press Ctrl+C to copy this report!
Continue execution?
---------------------------
Да Нет
---------------------------
Code: Select all
---------------------------
Total Commander 9.51 RC3
---------------------------
Access violation at address 761B15A2. Read of address 099319AA.
Access violation at address 761B15A2. Read of address 099319AA
Windows 7 SP1 HomePremium 6.1 (Build 7601), base: 00400000
Please report this error to the Author, with a description
of what you were doing when this error occurred!
Windows exception: C0000005
Stack trace:
761B15A2
0046B77A 0044C3F6 0044CD8A >0042886E 0044C32C 0042886E
0042886E 0044C282 0042886E 0046B77A 0044C3F6 0044CD8A
0042886E 0044AD89 0044E24F 004398D6 0046B75C 0042886E
0042E0A9 0042E144
Raw:
0044C282 0042886E 0044D103 0044AD89 0044D059 00439D67
0046B77A 0044C3F6 0044CD8A 0042886E 0044C32C 0042886E
0042886E 0044C282 0042886E 0044D103 0044AD89 0044D059
00439D67 0046B77A 0044C3F6 0044CD8A 0044CDAD 0042D70C
0042886E 00402E8E 0044AD89 0044D059 0042A869 0044DF35
0044AD89 0044D059 0044DF35 0044AD89 0044D059 00439D67
0046B77A 0044C3F6 0044ACBF 0044E24F 0044D059 0044D8C7
0044D921 0044D8F9 00439AA3 004398D6 004398D6 0046B75C
0046B75C 0042886E 0044D103 0044D4C0 0046BFE6 0044D103
0044D4C0 0046BFE6 0044C32C 0042886E 0044D0E6 0044AD89
Press Ctrl+C to copy this report!
Continue execution?
---------------------------
Да Нет
---------------------------
Code: Select all
---------------------------
Total Commander 9.51 RC3
---------------------------
Access violation at address 761B15A2. Read of address 07D519AA.
Access violation at address 761B15A2. Read of address 07D519AA
Windows 7 SP1 HomePremium 6.1 (Build 7601), base: 00400000
Please report this error to the Author, with a description
of what you were doing when this error occurred!
Windows exception: C0000005
Stack trace:
761B15A2
00439BFE >004398D6 0046B739 0042886E 0042E0A9 0042E144
0059CE45 0059C735 0059D07E 0058EE8A 0044C32C 0042886E
004023EF 004026B8 0044D8C7 00451DDE 0044AD89 0044C3F6
0044CD8A 0042886E 0044C32C 0042886E 0042E0A9 0042E144
Raw:
0044CDAD 00439BFE 004398D6 0046B739 0044C282 0042886E
0044D103 0044D4C0 0046BFE6 0043A4D0 0044D0E6 0044AD89
0044D059 0043BB5A 0044C37E 0044C3F6 0044CD8A 0044CDAD
0042886E 0044C32C 00402E8E 0044AD89 0044D059 0044D0A7
0042A869 0044C3F6 0044CD8A 0044CDAD 0042886E 0044C282
0042886E 0042886E 0042E0A9 0042E144 00451011 0059CE45
00406F94 004023EF 00403414 0046E394 0044C32C 0042886E
0059C735 0059D07E 0058EE8A 0044C282 0042886E 005FD93F
004023EF 005FF915 004023EF 004026B8 005FF915 0046E394
005C0071 004C0044 005C0071 004C0044 005FD93F 004C0044
Press Ctrl+C to copy this report!
Continue execution?
---------------------------
Да Нет
---------------------------
Edit: in start post you wrote: "The address bar will become empty, followed by a silent crash in about 2 seconds." - so we got different kind of crashes...
Last edited by DrShark on 2020-03-05, 18:23 UTC, edited 1 time in total.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Ukraine's National Bank special bank account:
UA843000010000000047330992708