Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(230)

Issue 2685783008: Fix integer-overflow in blink::IntRect::uniteEvenIfEmpty (Closed)

Created:
3 years, 10 months ago by yigu
Modified:
3 years, 10 months ago
Reviewers:
pdr.
CC:
ajuma+watch_chromium.org, blink-reviews, blink-reviews-platform-graphics_chromium.org, Rik, chromium-reviews, danakj+watch_chromium.org, dshwang, drott+blinkwatch_chromium.org, krit, enne (OOO), f(malita), jbroman, Justin Novosad, kinuko+watch, pdr+graphicswatchlist_chromium.org, rwlbuis, Stephen Chennney
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

We currently cannot guarantee the height of rect (bottom - top) <= INT32_MAX which causes crash in ubsan. BUG=687488

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -4 lines) Patch
M third_party/WebKit/Source/platform/geometry/IntRect.cpp View 3 chunks +11 lines, -4 lines 0 comments Download

Messages

Total messages: 7 (4 generated)
yigu
Hi Philip, this patch is regarding a ubsan crash that caused by integer overflow (positive# ...
3 years, 10 months ago (2017-02-10 14:59:32 UTC) #4
pdr.
Looking at the callsite, is this dangerous to return an incorrect rect in this case? ...
3 years, 10 months ago (2017-02-10 18:15:44 UTC) #6
yigu
3 years, 10 months ago (2017-02-10 18:24:03 UTC) #7
On 2017/02/10 18:15:44, pdr. wrote:
> Looking at the callsite, is this dangerous to return an incorrect rect in this
> case? If not, I think closing the bug as WONTFIX would be okay, because
overflow
> is not inherently a security risk. There are many ways to get IntRect to
> overflow so I think we'd want to switch the class to use saturated arithmetic
> everywhere if we wanted to guarantee against this kind of bug.

That's true. I was surprised that this kind of issue had not been handled in the
past years. Having no security risk must be the reason that we had ignored it.
Will close this patch and mark bug WONTFIX. Thanks!

Powered by Google App Engine
This is Rietveld 408576698