From e52e01a445340947aa0e2101296bec7e71bafa5c Mon Sep 17 00:00:00 2001 From: xiphon Date: Sun, 20 Sep 2020 13:57:44 +0000 Subject: [PATCH 1/3] daemon: Windows - fix FAT32 warning, trailing backslash is required --- src/daemon/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/daemon/main.cpp b/src/daemon/main.cpp index 748184640..ad783c713 100644 --- a/src/daemon/main.cpp +++ b/src/daemon/main.cpp @@ -249,7 +249,7 @@ int main(int argc, char const * argv[]) command_line::get_arg(vm, cryptonote::arg_data_dir)); #ifdef WIN32 - if (isFat32(data_dir.root_name().c_str())) + if (isFat32(data_dir.root_path().c_str())) { MERROR("Data directory resides on FAT32 volume that has 4GiB file size limit, blockchain might get corrupted."); } From 83fe535888e3ab07c3ca844eb90dce172ca791d2 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Thu, 24 Sep 2020 15:16:44 +0000 Subject: [PATCH 2/3] fix a couple bugs found by OSS-fuzz - index out of bounds when importing outputs - accessing invalid CLSAG data --- src/ringct/rctTypes.h | 6 ++++++ src/wallet/wallet2.cpp | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/ringct/rctTypes.h b/src/ringct/rctTypes.h index c80fc0dba..bb3c07524 100644 --- a/src/ringct/rctTypes.h +++ b/src/ringct/rctTypes.h @@ -372,6 +372,12 @@ namespace rct { template class Archive> bool serialize_rctsig_prunable(Archive &ar, uint8_t type, size_t inputs, size_t outputs, size_t mixin) { + if (inputs >= 0xffffffff) + return false; + if (outputs >= 0xffffffff) + return false; + if (mixin >= 0xffffffff) + return false; if (type == RCTTypeNull) return ar.stream().good(); if (type != RCTTypeFull && type != RCTTypeSimple && type != RCTTypeBulletproof && type != RCTTypeBulletproof2 && type != RCTTypeFullBulletproof && type != RCTTypeSimpleBulletproof && type != RCTTypeCLSAG) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 7f2d6ae4a..6bced88a2 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -13031,6 +13031,8 @@ process: crypto::public_key tx_pub_key = get_tx_pub_key_from_received_outs(td); const std::vector additional_tx_pub_keys = get_additional_tx_pub_keys_from_extra(td.m_tx); + THROW_WALLET_EXCEPTION_IF(td.m_internal_output_index >= td.m_tx.vout.size(), + error::wallet_internal_error, "Internal index is out of range"); THROW_WALLET_EXCEPTION_IF(td.m_tx.vout[td.m_internal_output_index].target.type() != typeid(cryptonote::txout_to_key), error::wallet_internal_error, "Unsupported output type"); const crypto::public_key& out_key = boost::get(td.m_tx.vout[td.m_internal_output_index].target).key; From 10c30ea5aa3e0a2d945f952c1a723adf9f60a66f Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Thu, 17 Sep 2020 14:51:33 +0000 Subject: [PATCH 3/3] link libzmq against libgssapi_krb5 if found --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 615454e3a..caabc590f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -992,6 +992,7 @@ find_path(ZMQ_INCLUDE_PATH zmq.h) find_library(ZMQ_LIB zmq) find_library(PGM_LIBRARY pgm) find_library(NORM_LIBRARY norm) +find_library(GSSAPI_LIBRARY gssapi_krb5) find_library(PROTOLIB_LIBRARY protolib) find_library(SODIUM_LIBRARY sodium) @@ -1007,6 +1008,9 @@ endif() if(NORM_LIBRARY) set(ZMQ_LIB "${ZMQ_LIB};${NORM_LIBRARY}") endif() +if(GSSAPI_LIBRARY) + set(ZMQ_LIB "${ZMQ_LIB};${GSSAPI_LIBRARY}") +endif() if(PROTOLIB_LIBRARY) set(ZMQ_LIB "${ZMQ_LIB};${PROTOLIB_LIBRARY}") endif()