Skip to content
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

Handle leak, locked file after using ssh connection to user account #2204

Open
3 tasks done
WeleSS2 opened this issue Feb 15, 2024 · 4 comments
Open
3 tasks done

Handle leak, locked file after using ssh connection to user account #2204

WeleSS2 opened this issue Feb 15, 2024 · 4 comments

Comments

@WeleSS2
Copy link

WeleSS2 commented Feb 15, 2024

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.

Steps to reproduce

After connecting using ssh from machine A to machine B .DAT files are marked as "Open by System".

Steps:

  • Download OpenSSH from Optional Feaures.
  • Create a new account on machine B, do not login to this account.
  • Connect from machine A to machine B using ssh.
  • Close connection, remove account on machine B.
  • In the users is leftover folder with .DAT files inside which are open by a system.

Comment:
Tested VM hyper-V and another physical machine.
Tried finding handle in resource monitor and using Handler.exe from sysinternal. Handle isn;t listed in any of.

Tried to duplicate handle using c++ and close binary/library reponsible for keeping it alive. Program couldn't find any binary or library which have this handle open. Regardless it's listed as open by System.

Expected behavior

.DAT files shouldn't lock removing this folder. Handles to them should be closed and i should be able to remove user folder. (C:\Users\userfolder)

Actual behavior

.DAT files are locked and removing them is impossible until restart.

Error details

No response

Environment data

Both server and client. 

Name                           Value                                                                                   
----                           -----                                                                                   
PSVersion                      5.1.22621.2506                                                                          
PSEdition                      Desktop                                                                                 
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                 
BuildVersion                   10.0.22621.2506                                                                         
CLRVersion                     4.0.30319.42000                                                                         
WSManStackVersion              3.0                                                                                     
PSRemotingProtocolVersion      2.3                                                                                     
SerializationVersion           1.1.0.1

Version

9.5

Visuals

No response

@maertendMSFT
Copy link
Collaborator

If you turn off the SSHD service on machine B does the issue persist?

@JakubS02
Copy link

JakubS02 commented Mar 6, 2024

Hi,
I'm on different account but i would like to answer now.

I disabled openssh server and ssdp protocol too. Nothing changed

@maertendMSFT
Copy link
Collaborator

If SSHD was the service that was locking the files, then when it is turned off, they should no longer be locked. Can you confirm that there are no other processes using the files?

@JakubS02
Copy link

If there is something else i can test it.

But i disabled everything what is on this ss, it's locked by system not sshd itself. And as i said it only happens when new account have been logged 1st time by sshd.

Untitled

@tgauth tgauth removed the Waiting on Author Need more information to diagnose label Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants