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: May 2010
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug-Security
M-5

Restricted
  • Only users with EditIssue permission may comment.



Sign in to add a comment

Table layout crash bug from wushi

Reported by scarybea...@gmail.com, Apr 28 2010 Back to list

Issue description

Reproduces for me with attached repro.

Analysis
--------

WebKit/WebCore/rendering/FixedTableLayout.cpp

                int usedSpan = 0;
                int i = 0;
                while (usedSpan < span) {
                    //ASSERT(cCol + i < nEffCols);
                    int eSpan = m_table->spanOfEffCol(cCol + i);
                    // Only set if no col element has already set it.
                    if (m_width[cCol + i].isAuto() && w.type() != Auto) {
                        m_width[cCol + i].setRawValue(w.type(), 
w.rawValue() * eSpan / span);
                        usedWidth += effWidth * eSpan / span;
                    }
                    usedSpan += eSpan;
                    i++;
                }

The repro causes "i" to go large and out-of-bounds.
A debug build will crash on the ASSERT() that I commented out.
An optimized build will typically crash due to an out-of-bounds array read 
due to the large "i" value.

Note that isAuto() and setRawValue() are non-virtual, otherwise this would 
be clearly exploitable due to using an out-of-bounds vtable.

setRawValue() is under some conditions writing out-of-bounds to an array so 
this is still likely exploitable. Assigning SecSeverity-High out of an 
abundance of caution.

 
test0.xhtml
526 bytes View Download
Labels: -Area-Undefined Area-WebKit WebKit-Core Mstone-5
Status: Started
Status: FixUnreleased
Committed r59495: <http://trac.webkit.org/changeset/59495>

Let it bake on dev channel for a week before merging to v5 stable. will probably go
in the first v5 patch.

Labels: Reward-500
Another reward for Wushi :)
Labels: NeedsMerge

Comment 7 by jsc...@chromium.org, May 24 2010

Labels: -Pri-0 Pri-1
Labels: -NeedsMerge
Bugdroid will be started soon by Mark (it was down), till then i have manually put
the comments here.

Merge 59495 - 20100514 Abhishek Arya <inferno@chromium.org>

Reviewed by David Hyatt.

Tests that large colspan in a fixed table layout does not result in crash.
https://bugs.webkit.org/show_bug.cgi?id=38261

* fast/table/fixedtablelayoutlargecolspancrashexpected.txt: Added.
* fast/table/fixedtablelayoutlargecolspancrash.html: Added.
20100514 Abhishek Arya <inferno@chromium.org>

Reviewed by David Hyatt.

Move the m_width(Length) and m_columns(RenderTable::ColumnStruct)
vector outofbounds check out of the ASSERT into the main code.
https://bugs.webkit.org/show_bug.cgi?id=38261

Test: fast/table/fixedtablelayoutlargecolspancrash.html

* rendering/FixedTableLayout.cpp:
(WebCore::FixedTableLayout::calcWidthArray):

BUG= 42723 
TBR=eric@webkit.org

Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=48059

Comment 9 by bugdro...@gmail.com, May 24 2010

The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=48059 

------------------------------------------------------------------------
r48059 | inferno@chromium.org | 2010-05-24 11:26:34 -0700 (Mon, 24 May 2010) | 25 lines
Changed paths:
   M http://src.chromium.org/viewvc/chrome/branches/WebKit/375/LayoutTests/ChangeLog?r1=48059&r2=48058
   A http://src.chromium.org/viewvc/chrome/branches/WebKit/375/LayoutTests/fast/table/fixed-table-layout-large-colspan-crash-expected.txt
   A http://src.chromium.org/viewvc/chrome/branches/WebKit/375/LayoutTests/fast/table/fixed-table-layout-large-colspan-crash.html
   M http://src.chromium.org/viewvc/chrome/branches/WebKit/375/WebCore/ChangeLog?r1=48059&r2=48058
   M http://src.chromium.org/viewvc/chrome/branches/WebKit/375/WebCore/rendering/FixedTableLayout.cpp?r1=48059&r2=48058

Merge 59495 - 20100514  Abhishek Arya  <inferno@chromium.org>

        Reviewed by David Hyatt.

        Tests that large colspan in a fixed table layout does not result in crash.
        https://bugs.webkit.org/show_bug.cgi?id=38261

        * fast/table/fixedtablelayoutlargecolspancrashexpected.txt: Added.
        * fast/table/fixedtablelayoutlargecolspancrash.html: Added.
20100514  Abhishek Arya  <inferno@chromium.org>

        Reviewed by David Hyatt.

        Move the m_width(Length) and m_columns(RenderTable::ColumnStruct)
        vector outofbounds check out of the ASSERT into the main code.
        https://bugs.webkit.org/show_bug.cgi?id=38261

        Test: fast/table/fixedtablelayoutlargecolspancrash.html

        * rendering/FixedTableLayout.cpp:
        (WebCore::FixedTableLayout::calcWidthArray):

BUG= 42723 
TBR=eric@webkit.org
Review URL: http://codereview.chromium.org/2171002
------------------------------------------------------------------------

Labels: -Restrict-View-SecurityTeam
Status: Fixed
Fixed in 5.0.375.70
Labels: Type-Security
Labels: SecImpacts-Stable
Batch update.
Project Member

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

Labels: -Area-WebKit -SecSeverity-High -WebKit-Core -Mstone-5 -Type-Security -SecImpacts-Stable Cr-Content M-5 Security-Impact-Stable Type-Bug-Security Cr-Content-Core Security-Severity-High
Project Member

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

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

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

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

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

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

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

Labels: -Cr-Content Cr-Blink
Project Member

Comment 19 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 20 by sheriffbot@chromium.org, Oct 1 2016

Labels: Restrict-View-SecurityNotify
Project Member

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

Labels: -Restrict-View-SecurityNotify
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