Changeset 143811 in webkit
- Timestamp:
- Feb 22, 2013, 3:37:20 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r143809 r143811 1 2013-02-22 Justin Schuh <jschuh@chromium.org> 2 3 RenderArena masking has low entropy 4 https://bugs.webkit.org/show_bug.cgi?id=110394 5 6 Reviewed by Oliver Hunt. 7 8 No new tests. This is a hardening measure. 9 10 * rendering/RenderArena.cpp: 11 (WebCore::RenderArena::RenderArena): 12 1 13 2013-02-22 Min Qin <qinmin@chromium.org> 2 14 -
trunk/Source/WebCore/rendering/RenderArena.cpp
r133119 r143811 37 37 #include "RenderArena.h" 38 38 39 #include <limits> 39 40 #include <stdlib.h> 40 41 #include <string.h> 41 42 #include <wtf/Assertions.h> 43 #include <wtf/CryptographicallyRandomNumber.h> 42 44 43 45 #define ROUNDUP(x, y) ((((x)+((y)-1))/(y))*(y)) … … 90 92 // RenderObject pointer. 91 93 // See http://download.crowdstrike.com/papers/hes-exploiting-a-coalmine.pdf. 92 93 // The bottom bits are predictable because the binary is loaded on a 94 // boundary. This just shifts most of those predictable bits out. 95 m_mask = ~(reinterpret_cast<uintptr_t>(WTF::fastMalloc) >> 13); 94 WTF::cryptographicallyRandomValues(&m_mask, sizeof(m_mask)); 95 m_mask |= (static_cast<uintptr_t>(3) << (std::numeric_limits<uintptr_t>::digits - 2)) | 1; 96 96 } 97 97
Note:
See TracChangeset
for help on using the changeset viewer.