diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-03-09 19:47:28 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-03-09 19:47:28 -0400 |
commit | ff1f6c417c53d905f47f26ea6b0fa90888857a8c (patch) | |
tree | f6d219b7d1e5f134a5a71e69ee7892e4080cf74e | |
parent | 5e5b82febba1ca904abc59863115f0f4b325fdad (diff) | |
parent | 1af67d7f72470cec1de5e2a75186edc3b3accfbe (diff) | |
download | tor-ff1f6c417c53d905f47f26ea6b0fa90888857a8c.tar.gz tor-ff1f6c417c53d905f47f26ea6b0fa90888857a8c.zip |
Merge branch 'maint-0.2.6' into release-0.2.6
-rw-r--r-- | changes/bug15205 | 5 | ||||
-rw-r--r-- | src/common/compat.h | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/changes/bug15205 b/changes/bug15205 new file mode 100644 index 0000000000..0cb9f3f4bc --- /dev/null +++ b/changes/bug15205 @@ -0,0 +1,5 @@ + o Major bugfixes (crash, OSX, security): + - Fix a remote denial-of-service opportunity caused by a bug + in OSX's _strlcat_chk() function. Fixes bug 15205; bug first + appeared in OSX 10.9. + diff --git a/src/common/compat.h b/src/common/compat.h index 23f8614196..11b41cded9 100644 --- a/src/common/compat.h +++ b/src/common/compat.h @@ -215,6 +215,18 @@ extern INLINE double U64_TO_DBL(uint64_t x) { #define strncasecmp _strnicmp #define strcasecmp _stricmp #endif + +#if defined __APPLE__ +/* On OSX 10.9 and later, the overlap-checking code for strlcat would + * appear to have a severe bug that can sometimes cause aborts in Tor. + * Instead, use the non-checking variants. This is sad. + * + * See https://trac.torproject.org/projects/tor/ticket/15205 + */ +#undef strlcat +#undef strlcpy +#endif + #ifndef HAVE_STRLCAT size_t strlcat(char *dst, const char *src, size_t siz) ATTR_NONNULL((1,2)); #endif |