[Webkit-unassigned] [Bug 60627] New: CSS letter-spacing integer truncation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 11 08:01:50 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=60627

           Summary: CSS letter-spacing integer truncation
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Windows Vista
            Status: NEW
          Severity: Normal
          Priority: P1
         Component: CSS
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: skylined at chromium.org
                CC: eric at webkit.org


Created an attachment (id=93118)
 --> (https://bugs.webkit.org/attachment.cgi?id=93118&action=review)
Repro (requires debugger to see the issue)

Chromium: http://code.google.com/p/chromium/issues/detail?id=82275

"letter-spacing: 32768px" is valid. Let's see what happens...

webkit\source\webcore\rendering\style\renderstyle.h @ 941:
    void setLetterSpacing(int v) { inherited.access()->font.setLetterSpacing(v); }

--> int v = 32768;

webkit\source\webcore\platform\graphics\font.h
    void setLetterSpacing(short s) { m_letterSpacing = s; }

--> short s = -32768;

A similar problem occurs for "letter-spacing: -32769px" --> s = 32767

I had assumed this would lead to buffer overflows or other forms of memory corruption, but have been unable to find any. However, the value is used in many places and I cannot rule out exploitability. It does cause the page to be rendered with incorrect letter spacing.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list