New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 1 user
Status: Fixed
Owner:
Closed: Apr 2012
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Bug-Security

Restricted
  • Only users with EditIssue permission may comment.



Sign in to add a comment
Security: stack-buffer-overflow in WebCore::GlyphPage::fill with surrogate characters
Reported by miau...@gmail.com, Apr 8 2012 Back to list
This template is ONLY for reporting security bugs. Please use a different
template for other types of bug reports.


VULNERABILITY DETAILS
stack-buffer-overflow in WebCore::GlyphPage::fill with surrogate characters

VERSION
Chrome Version: stable + dev

Chromium	20.0.1095.0 (Developer Build 131299)
OS	Linux
WebKit	536.6 (@113522)

Operating System: 64bit linux

REPRODUCTION CASE
<html>
  <head>
    <style>
      #el0 { 
        -webkit-writing-mode:vertical-lr; 
      }
    </style>
    <script>
      onload = function() {
        el0=document.createElement('div')
        el0.setAttribute('id','el0')
        document.body.appendChild(el0)
        el0.appendChild(document.createTextNode(unescape('%ud801%udc00')))
      }
    </script>
  </head>
  <body>
  </body>
</html>

FOR CRASHES, PLEASE INCLUDE THE FOLLOWING ADDITIONAL INFORMATION
Type of crash: renderer + asan
Crash State: 

==22621== ERROR: AddressSanitizer stack-buffer-overflow on address 0x7fffffff43e8 at pc 0x555559c96f82 bp 0x7fffffff4010 sp 0x7fffffff4008
READ of size 2 at 0x7fffffff43e8 thread T0
    #0 0x555559c96f82 in WebCore::GlyphPage::fill(unsigned int, unsigned int, unsigned short*, unsigned int, WebCore::SimpleFontData const*) ???:0
    #1 0x555559b8781f in WebCore::GlyphPageTreeNode::initializePage(WebCore::FontData const*, unsigned int) ???:0

Address 0x7fffffff43e8 is located at offset 904 in frame <WebCore::GlyphPage::fill(unsigned int, unsigned int, unsigned short*, unsigned int, WebCore::SimpleFontData const*)> of T0's stack:
  This frame has 5 object(s):
    [32, 40) 'buffer.i'
    [96, 98) 'scriptIndex.i'
    [160, 162) 'featureIndex.i'
    [224, 328) 'paint'
    [384, 904) 'glyphStorage'


 
stable-glyphStorage.txt
8.0 KB View Download
glyphStorage.txt
8.1 KB View Download
glyphStorage.html
399 bytes View Download
Labels: -Area-Undefined Area-Internals
I can't repro on OS X, either 18 or 20 canary. Will try on Linux Monday.
ClusterFuzz can't reproduce this either. miaubiz, I notice your canary is newer than mine on OS X (I have 1093), and maybe you are running newer code than CF does as well. (Weirdly, I am getting "update server not available" right now, so I can't get the 1095 canary that you have.) It also doesn't pop on my 1091 (ToT as of a few days ago).

I'll try on piping fresh code on Monday.
Comment 4 by miau...@gmail.com, Apr 9 2012
@pal... : I can repro it on  stable aswell. 

fwiw GlyphPage::fill is implemented in the platform specific stuff, so it wouldn├Ąt repro on mac in any case, I think mine is in Source/WebCore/platform/graphics/skia/GlyphPageTreeNodeSkia.cpp

ofcourse CF should be using that one as well. 

surrogate pairs that crash for me are atleast:

d801 dc00
d801 dc28
d801 dc4d
d801 dc4e

d847 dde0

it's always at offset 904 though, i.e. off-by-one from the glyphStorage object. and it doesn't crash any non-asan browsers. glyphStorage is also always the same size for me. :|


Comment 5 by palmer@google.com, Apr 9 2012
I still can't get it to crash, on stable, dev, canary, or ToT. Weird. For convenience, attaching a version of miaubiz' repro that tries all the surrogate pairs he lists in the previous comment.
glyphStorage2.html
699 bytes View Download
Cc: bashi@chromium.org
Kenichi, any idea what is going wrong with these surrogate characters.
Comment 7 by bashi@chromium.org, Apr 12 2012
Cc: tkent@chromium.org tony@chromium.org
Status: Started
Upload the fix to WebKit bugzilla. https://bugs.webkit.org/show_bug.cgi?id=83751
Adding tkent@ and tony@ for review.
Comment 8 by bashi@chromium.org, Apr 12 2012
Owner: bashi@chromium.org
Labels: -Restrict-View-SecurityTeam -Pri-0 -Area-Internals Restrict-View-SecurityNotify Pri-1 Area-WebKit SecSeverity-Medium OS-All SecImpacts-Stable SecImpacts-Beta Stability-AddressSanitizer Merge-Approved
Status: FixUnreleased
Kenichi, you rock!!!
http://trac.webkit.org/changeset/113951
Labels: Mstone-18
Labels: reward-500 reward-unpaid
Labels: -Merge-Approved -Mstone-18 Merge-Merged Mstone-19
M19: http://trac.webkit.org/changeset/115610
Labels: -reward-unpaid
Labels: CVE-2011-3093
Comment 15 by cdn@chromium.org, May 15 2012
Status: Fixed
Updating status to Fixed on security bugs which were fixed when m19 went to stable.
Project Member Comment 16 by bugdroid1@chromium.org, Oct 13 2012
Labels: Restrict-AddIssueComment-Commit
This issue has been closed for some time. No one will pay attention to new comments.
If you are seeing this bug or have new data, please click New Issue to start a new bug.
Project Member Comment 17 by bugdroid1@chromium.org, Mar 10 2013
Labels: -Type-Security -Area-WebKit -SecSeverity-Medium -SecImpacts-Stable -SecImpacts-Beta -Stability-AddressSanitizer -Mstone-19 Cr-Content Security-Impact-Stable Security-Impact-Beta Security-Severity-Medium Performance-Memory-AddressSanitizer M-19 Type-Bug-Security
Project Member Comment 18 by bugdroid1@chromium.org, Mar 13 2013
Labels: Restrict-View-EditIssue
Project Member Comment 19 by bugdroid1@chromium.org, Mar 13 2013
Labels: -Restrict-AddIssueComment-Commit Restrict-AddIssueComment-EditIssue
Labels: -Restrict-View-SecurityNotify -Restrict-View-EditIssue
Project Member Comment 21 by bugdroid1@chromium.org, Mar 21 2013
Labels: -Security-Impact-Stable Security_Impact-Stable
Project Member Comment 22 by bugdroid1@chromium.org, Mar 21 2013
Labels: -Security-Severity-Medium Security_Severity-Medium
Project Member Comment 23 by bugdroid1@chromium.org, Mar 21 2013
Labels: -Security-Impact-Beta Security_Impact-Beta
Project Member Comment 24 by bugdroid1@chromium.org, Apr 1 2013
Labels: -Performance-Memory-AddressSanitizer Stability-Memory-AddressSanitizer
Project Member Comment 25 by bugdroid1@chromium.org, Apr 6 2013
Labels: -Cr-Content Cr-Blink
Project Member Comment 26 by sheriffbot@chromium.org, Jun 14 2016
Labels: -security_impact-beta
Project Member Comment 27 by sheriffbot@chromium.org, Oct 1 2016
This bug has been closed for more than 14 weeks. Removing security view restrictions.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member Comment 28 by sheriffbot@chromium.org, Oct 2 2016
This bug has been closed for more than 14 weeks. Removing security view restrictions.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: allpublic
Sign in to add a comment