bugzilla-daemon at bugzilla.mindrot.org
2007-Oct-15 18:20 UTC
[Bug 1375] New: sftp-client leaks handles on failure to open local file
https://bugzilla.mindrot.org/show_bug.cgi?id=1375
Summary: sftp-client leaks handles on failure to open local file
Classification: Unclassified
Product: Portable OpenSSH
Version: 4.7p1
Platform: All
OS/Version: All
Status: NEW
Severity: minor
Priority: P2
Component: sftp
AssignedTo: bitbucket at mindrot.org
ReportedBy: sworley at chkno.net
Created an attachment (id=1362)
--> (http://bugzilla.mindrot.org/attachment.cgi?id=1362)
do_close(handle) on local file open failure
I get "Couldn't get handle: Failure" after N failures to open
local
files for writing where N = 100 on OpenBSD and N = 200 on GNU/Linux.
To reproduce:
bash-3.2$ ssh otherhost
otherhost$ mkdir test
otherhost$ cd test
otherhost$ touch {1000..1120}
otherhost$ logout
Connection to otherhost closed.
bash-3.2$ mkdir test
bash-3.2$ cd test
bash-3.2$ touch {1000..1110}
bash-3.2$ chmod 400 *
bash-3.2$ sftp otherhost
Connecting to otherhost...
sftp> cd test
sftp> get *
Fetching /home/user/test/1000 to 1000
Couldn't open local file "1000" for writing: Permission denied
Fetching /home/user/test/1001 to 1001
Couldn't open local file "1001" for writing: Permission denied
...
Fetching /home/user/test/1099 to 1099
Couldn't open local file "1099" for writing: Permission denied
Fetching /home/user/test/1100 to 1100
Couldn't get handle: Failure
Fetching /home/user/test/1101 to 1101
Couldn't get handle: Failure
...
Fetching /home/user/test/1120 to 1120
Couldn't get handle: Failure
sftp> ls
Couldn't get handle: Failure
The attached patch seems to fix the problem.
--
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2008-Jan-19 22:05 UTC
[Bug 1375] sftp-client leaks handles on failure to open local file
https://bugzilla.mindrot.org/show_bug.cgi?id=1375
Damien Miller <djm at mindrot.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
CC| |djm at mindrot.org
Blocks| |1353
--- Comment #1 from Damien Miller <djm at mindrot.org> 2008-01-20
09:05:15 ---
fix applied - thanks!
--
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2008-Mar-31 04:21 UTC
[Bug 1375] sftp-client leaks handles on failure to open local file
https://bugzilla.mindrot.org/show_bug.cgi?id=1375
Damien Miller <djm at mindrot.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |CLOSED
--- Comment #2 from Damien Miller <djm at mindrot.org> 2008-03-31
15:21:43 ---
Fix shipped in 4.9/4.9p1 release.
--
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.