From 0c239edbaddd15c013eab18c0644d0db9d095f7f Mon Sep 17 00:00:00 2001 From: Alex Arslan Date: Thu, 17 Aug 2023 10:03:39 -0700 Subject: [PATCH] Drop libssh2 patches We're now using libssh2 v1.11.0 which includes the two patches we were carrying. The patches need to be dropped in order to build with `USE_BINARYBUILDER=0`. --- deps/libssh2.mk | 16 ---------- .../patches/libssh2-fix-import-lib-name.patch | 26 ---------------- deps/patches/libssh2-userauth-check.patch | 30 ------------------- 3 files changed, 72 deletions(-) delete mode 100644 deps/patches/libssh2-fix-import-lib-name.patch delete mode 100644 deps/patches/libssh2-userauth-check.patch diff --git a/deps/libssh2.mk b/deps/libssh2.mk index d0174c0c090e22..24de4d26f7439e 100644 --- a/deps/libssh2.mk +++ b/deps/libssh2.mk @@ -30,22 +30,6 @@ endif LIBSSH2_SRC_PATH := $(SRCCACHE)/$(LIBSSH2_SRC_DIR) - # Apply patch to fix v1.10.0 CVE (https://github.com/libssh2/libssh2/issues/649), drop with v1.11 -$(LIBSSH2_SRC_PATH)/libssh2-userauth-check.patch-applied: $(LIBSSH2_SRC_PATH)/source-extracted - cd $(LIBSSH2_SRC_PATH) && \ - patch -p1 -f < $(SRCDIR)/patches/libssh2-userauth-check.patch - echo 1 > $@ - -# issue: https://github.com/JuliaLang/julia/issues/45645#issuecomment-1153214379 -# fix pr: https://github.com/libssh2/libssh2/pull/711 -$(LIBSSH2_SRC_PATH)/libssh2-fix-import-lib-name.patch-applied: $(LIBSSH2_SRC_PATH)/libssh2-userauth-check.patch-applied - cd $(LIBSSH2_SRC_PATH) && \ - patch -p1 -f < $(SRCDIR)/patches/libssh2-fix-import-lib-name.patch - echo 1 > $@ - -$(BUILDDIR)/$(LIBSSH2_SRC_DIR)/build-configured: \ - $(LIBSSH2_SRC_PATH)/libssh2-fix-import-lib-name.patch-applied - $(BUILDDIR)/$(LIBSSH2_SRC_DIR)/build-configured: $(LIBSSH2_SRC_PATH)/source-extracted mkdir -p $(dir $@) cd $(dir $@) && \ diff --git a/deps/patches/libssh2-fix-import-lib-name.patch b/deps/patches/libssh2-fix-import-lib-name.patch deleted file mode 100644 index 15aafb58d2736c..00000000000000 --- a/deps/patches/libssh2-fix-import-lib-name.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 3732420725efbf410df5863b91a09ca214ee18ba Mon Sep 17 00:00:00 2001 -From: "Y. Yang" -Date: Thu, 16 Jun 2022 19:16:37 +0800 -Subject: [PATCH] Fix DLL import library name - -https://aur.archlinux.org/packages/mingw-w64-libssh2 -https://cmake.org/cmake/help/latest/prop_tgt/IMPORT_PREFIX.html ---- - src/CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index cb8fee1..17ecefd 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -220,6 +220,7 @@ endif() - add_library(libssh2 ${SOURCES}) - # we want it to be called libssh2 on all platforms - set_target_properties(libssh2 PROPERTIES PREFIX "") -+set_target_properties(libssh2 PROPERTIES IMPORT_PREFIX "") - - target_compile_definitions(libssh2 PRIVATE ${PRIVATE_COMPILE_DEFINITIONS}) - target_include_directories(libssh2 --- -2.36.1 - diff --git a/deps/patches/libssh2-userauth-check.patch b/deps/patches/libssh2-userauth-check.patch deleted file mode 100644 index 1dc6108ebece79..00000000000000 --- a/deps/patches/libssh2-userauth-check.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 37ee0aa214655b63e7869d1d74ff1ec9f9818a5e Mon Sep 17 00:00:00 2001 -From: Daniel Stenberg -Date: Fri, 17 Dec 2021 17:46:29 +0100 -Subject: [PATCH] userauth: check for too large userauth_kybd_auth_name_len - (#650) - -... before using it. - -Reported-by: MarcoPoloPie -Fixes #649 ---- - src/userauth.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/src/userauth.c b/src/userauth.c -index 40ef915..caa5635 100644 ---- a/src/userauth.c -+++ b/src/userauth.c -@@ -1769,6 +1769,11 @@ userauth_keyboard_interactive(LIBSSH2_SESSION * session, - if(session->userauth_kybd_data_len >= 5) { - /* string name (ISO-10646 UTF-8) */ - session->userauth_kybd_auth_name_len = _libssh2_ntohu32(s); -+ if(session->userauth_kybd_auth_name_len > -+ session->userauth_kybd_data_len - 5) -+ return _libssh2_error(session, -+ LIBSSH2_ERROR_OUT_OF_BOUNDARY, -+ "Bad keyboard auth name"); - s += 4; - } - else {