libssh2_sftp_close_handle and LIBSSH2_ERROR_EAGAIN
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 28/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- c
- 領域
- networking
研究方向
Start by reading the implementation and existing tests for libssh2_sftp_close_handle, then trace how it handles LIBSSH2_ERROR_EAGAIN when the server does not respond. The issue asks for a way to force cleanup of local resources after a user-provided timeout; done means that cleanup is possible regardless of server behavior without leaking resources.
由索引模型根據 Issue 內容生成。
描述
Describe the bug
When encountering a weird SFTP server, which refused to respond to our request, currently there is no way to cleanup local resources.
Expected behavior
If a user-provided timeout triggers and we have not finished client-server interaction, the user should have option to forcefully cleanup all local resources regardless of server behavior.
Version (please complete the following information):
This is a very old issue first reported 2008: https://marc.info/?l=libssh2-devel&m=121498802311288&w=4
Additional context
As mentioned https://github.com/curl/curl/issues/8632#issuecomment-1091233803, this issue has been raised multiple times.
libcurl did provide a workaround for sftp hang (https://github.com/curl/curl/commit/fa34353d07e1d3053ae55b91d3971edf548d238a), but did not address the resource leak issue.
NOTE
If the client keep trying to reconnect to these weird servers, this can be viewed as Server-Initiated DOS vulnerability, because finally the unfortunate client will leak all its available memory.
- 主要語言
- C
- 星號
- 1.6k
- 分支
- 646
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 沒有貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
libssh2/libssh2 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 74/100
libssh2/libssh2#2676 · 1 則留言 ·
維護者通常 1 天內回覆
-
AEAD ciphers (chacha20-poly1305, AES-GCM) leak 16 bytes of uninitialized memory per outgoing encrypted packet可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉memory-leak
難度 2/5 1-3 小時 新手友好度 85/100
libssh2/libssh2#2023 · 5 則留言 ·
維護者通常 1 天內回覆
-
documentation
難度 4/5 3-5 天 新手友好度 48/100
libssh2/libssh2#2597 · 2 則留言 ·
維護者通常 1 天內回覆
-
Q&A
難度 4/5 3-5 天 新手友好度 45/100
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 35/100
libssh2/libssh2#1925 · 13 則留言 · 32 個 reaction ·
維護者通常 1 天內回覆
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 66/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
MerginMaps/geodiff#272 ·
-
難度 2/5 1-3 小時 新手友好度 74/100
open-quantum-safe/liboqs#2644 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 70/100
espressif/esp-adf-libs#89 · 1 則留言 ·
-
難度 1/5 1 小時以內 新手友好度 88/100
維護者通常 2 天內回覆