SFTP failed with the error -41 working with Openssl
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 30/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- c
- 領域
- networking
研究方向
Start with openssl.c and _libssh2_cipher_crypt(), then trace how _libssh2_transport_read() uses packet_length. Check the Windows VS2013 build options and compare the reported runtime algorithm value with the expected AES-GCM detection. Done means explaining or correcting the mismatch so SFTP no longer returns LIBSSH2_ERROR_OUT_OF_BOUNDARY in the described setup.
由索引模型根據 Issue 內容生成。
描述
I have built libssh2-1.11.0 with Openssl3, the SFTP server is SSHD, the default algorithm is aes-256-gcm, the crypt method is "[email protected]".
In the _libssh2_cipher_crypt() function in openssl. c, the value of the "algo" parameter should be EVP_aes_256_gcm, so "is_aesgcm" should be 1, but in fact "algo" is not EVP_aes_256_gcm or EVP_aes_128_gcm, so "is_aesgcm" here is 0 and the decrypted data is incorrect, and the p->packet_length in _libssh2_transport_read() is a randomly large number and returns the error LIBSSH2_ERROR_OUT_OF_BOUNDARY.
I'm not sure why the function address of EVP_aes_256_gcm is different between compilation and runtime, when I call the "algo" function the return value seems to be correct, the nid is 901(NID_aes_256_gcm).
This only happens on Windows (VS2013).
Is this something to do with the build options?
- 主要語言
- C
- 星號
- 1.6k
- 分支
- 646
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 沒有貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
libssh2/libssh2 的其他 Issue
-
outdated tests
難度 2/5 1-3 小時 新手友好度 73/100
libssh2/libssh2#2679 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 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 天內回覆
-
outdated
難度 3/5 1-2 天 新手友好度 58/100
libssh2/libssh2#2678 · 3 則留言 ·
維護者通常 1 天內回覆
-
documentation
難度 4/5 3-5 天 新手友好度 48/100
libssh2/libssh2#2597 · 2 則留言 ·
維護者通常 1 天內回覆
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 66/100
維護者通常 1 天內回覆
-
Bug Status: Needs Triage
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
interpreter-core type-feature
難度 1/5 1 小時以內 新手友好度 78/100
維護者通常 1 天內回覆
-
category:port-update
難度 2/5 1-3 小時 新手友好度 68/100
維護者通常 2 天內回覆
-
Update OpenBSD CI to OpenBSD 8.0 and vmactions/openbsd-vm v1.4.9可能已有人在做 @hyoklee 今天認領。 未關閉
難度 1/5 1-3 小時 新手友好度 85/100
維護者通常 2 天內回覆