72 Commits

Author SHA1 Message Date
Czarek Nakamoto
90658235f6 update polyseed commit
change POLYSEED_COIN to wownero in the fork
update wownero patches
2024-04-22 09:33:21 +02:00
Czarek Nakamoto
22f6fb4b63 fix regarding the issues raised during security audit
In the polyseed-examples repository, the `utf8_nfc` and `utf8_nfkd` functions will never return a value exceeding `POLYSEED_STR_SIZE - 1`
In your code, the utf8_norm function has variable return behavior that seems odd
In case of a normalization error, the underlying normalizer will return a negative value, at which point your function just returns POLYSEED_STR_SIZE (this is unclear)
In case the buffer isn't large enough, the normalizer will return the required buffer size but have undefined internal behavior, at which point your function returns a value exceeding POLYSEED_STR_SIZE
Otherwise, it uses the normalizer's return value (indicating the written size) to continue with re-encoding

tobtoht: Czarek Nakamoto: polyseed asserts that the return value < POLYSEED_STR_SIZE, so if normalization fails the program crashes..
> I think my idea was to have have polyseed check the return value and return an error code instead of asserting, which would in turn throw the "Unicode normalization failed" error
> I'll upstream that. In the meantime you can replace the injected function with
```cpp
    inline size_t utf8_norm(const char* str, polyseed_str norm, utf8proc_option_t options) {
      utf8proc_int32_t buffer[POLYSEED_STR_SIZE];
      utf8proc_ssize_t result;

      result = utf8proc_decompose(reinterpret_cast<const uint8_t*>(str), 0, buffer, POLYSEED_STR_SIZE, options);
      if (result < 0 || result > (POLYSEED_STR_SIZE - 1)) {
        throw std::runtime_error("Unicode normalization failed");
      }

      result = utf8proc_reencode(buffer, result, options);
      if (result < 0 || result > POLYSEED_STR_SIZE) {
        throw std::runtime_error("Unicode normalization failed");
      }

      strcpy(norm, reinterpret_cast<const char*>(buffer));
      sodium_memzero(buffer, sizeof(buffer));
      return result;
    }
```
2024-04-19 16:37:42 +02:00
Czarek Nakamoto
1b58a960da polyseed fix
tobtoht:
Since only the composed languages are broken, it could also be that canonical composition is producing weird output. Try dumping whatever seed string is being fed to polyseed_decode to hex and we should be able to tell.
Or try removing UTF8PROC_LUMP from utf8_nfc
2024-04-15 16:17:54 +02:00
Czarek Nakamoto
f5a6dbdd8e credit tobtoht 2024-04-12 11:50:32 +02:00
Czarek Nakamoto
125e64f11f update patches
update readme
2024-04-12 11:13:43 +02:00
Czarek Nakamoto
4adbc8667c update readme 2024-04-04 23:09:29 +02:00
Czarek Nakamoto
939a955cd7 if cases are difficult 2024-04-04 17:45:42 +02:00
Czarek Nakamoto
8c54a73672 fix patch number 2024-04-04 17:08:58 +02:00
Czarek Nakamoto
3789aba98d fix android (i hope) 2024-04-04 15:39:37 +02:00
Czarek Nakamoto
f47a865bac randomx bump 2024-04-02 22:35:39 +02:00
Czarek Nakamoto
3eb727598b actually fix and not workaround the iOS issue. 2024-04-02 19:14:43 +02:00
Czarek Nakamoto
85756e631e update randomx commit 2024-04-02 17:43:13 +02:00
Czarek Nakamoto
e2ad141007 feat: iOS builds
includes patches to
- randomx: https://github.com/tevador/RandomX/pull/294
- randomwow: https://git.wownero.com/wownero/RandomWOW/pulls/2
2024-04-02 17:09:22 +02:00
Czarek Nakamoto
e4cde6dfb8 add wownero patch so it won't crash 2024-04-02 11:57:38 +02:00
Czarek Nakamoto
6f3f187592 monero: fix make debug-tests 2024-04-02 10:29:48 +02:00
Czarek Nakamoto
b034340879 macos support 2024-03-28 10:43:54 +01:00
Czarek Nakamoto
0f206f4bc1 fixed coin control patch for wownero 2024-03-27 16:34:28 +01:00
Czarek Nakamoto
04d0262686 fix wownero coin control
use proper headers
properly apply patches
2024-03-27 15:46:01 +01:00
Czarek Nakamoto
6abd77290c feat: wownero support 2024-03-26 10:00:45 +01:00
Czarek Nakamoto
380f3f41e6 wow + build 2024-03-22 14:21:57 +01:00
Czarek Nakamoto
707b5b07ee feat: windows support
feat: ci caching for faster builds
2024-03-15 22:19:52 +01:00
Czarek Nakamoto
2b685de9a4 update monero to use upstream with patches instead of fork 2024-03-12 19:17:40 +01:00