Skip to content

Commit 0492100

Browse files
committed
Merge 5.5 into 10.0
2 parents e3dd9a9 + 69bc3c1 commit 0492100

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

extra/yassl/src/handshake.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -788,6 +788,16 @@ int DoProcessReply(SSL& ssl)
788788
needHdr = true;
789789
else {
790790
buffer >> hdr;
791+
/*
792+
According to RFC 4346 (see "7.4.1.3. Server Hello"), the Server Hello
793+
packet needs to specify the highest supported TLS version, but not
794+
higher than what client requests. YaSSL highest supported version is
795+
TLSv1.1 (=3.2) - if the client requests a higher version, downgrade it
796+
here to 3.2.
797+
See also Appendix E of RFC 5246 (TLS 1.2)
798+
*/
799+
if (hdr.version_.major_ == 3 && hdr.version_.minor_ > 2)
800+
hdr.version_.minor_ = 2;
791801
ssl.verifyState(hdr);
792802
}
793803

include/my_valgrind.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
# define MEM_CHECK_DEFINED(a,len) VALGRIND_CHECK_MEM_IS_DEFINED(a,len)
3636
#elif defined(__SANITIZE_ADDRESS__)
3737
# include <sanitizer/asan_interface.h>
38+
/* How to do manual poisoning:
39+
https://github.com/google/sanitizers/wiki/AddressSanitizerManualPoisoning */
3840
# define MEM_UNDEFINED(a,len) ASAN_UNPOISON_MEMORY_REGION(a,len)
3941
# define MEM_NOACCESS(a,len) ASAN_POISON_MEMORY_REGION(a,len)
4042
# define MEM_CHECK_ADDRESSABLE(a,len) ((void) 0)

storage/innobase/mem/mem0mem.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,11 @@ mem_heap_create_block_func(
406406
heap->total_size += len;
407407
}
408408

409+
/* Poison all available memory. Individual chunks will be unpoisoned on
410+
every mem_heap_alloc() call. */
411+
compile_time_assert(MEM_BLOCK_HEADER_SIZE >= sizeof *block);
412+
UNIV_MEM_FREE(block + 1, len - sizeof *block);
413+
409414
ut_ad((ulint)MEM_BLOCK_HEADER_SIZE < len);
410415

411416
return(block);

storage/xtradb/mem/mem0mem.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,11 @@ mem_heap_create_block_func(
406406
heap->total_size += len;
407407
}
408408

409+
/* Poison all available memory. Individual chunks will be unpoisoned on
410+
every mem_heap_alloc() call. */
411+
compile_time_assert(MEM_BLOCK_HEADER_SIZE >= sizeof *block);
412+
UNIV_MEM_FREE(block + 1, len - sizeof *block);
413+
409414
ut_ad((ulint)MEM_BLOCK_HEADER_SIZE < len);
410415

411416
return(block);

0 commit comments

Comments
 (0)