Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

libssh2_sftp_close_handle and LIBSSH2_ERROR_EAGAIN

未關閉
#690 5 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 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 範本
  • 沒有貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

libssh2/libssh2 的其他 Issue

查看 libssh2/libssh2 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。