New issue
Advanced search Search tips

Issue 761694 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 758478
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Bug-Security



Sign in to add a comment

Incorrect-function-pointer-type in hb_font_destroy

Project Member Reported by ClusterFuzz, Sep 4 2017

Issue description

Detailed report: https://clusterfuzz.com/testcase?key=6020511204376576

Fuzzer: libFuzzer_pdfium_fuzzer
Job Type: libfuzzer_chrome_ubsan
Platform Id: linux

Crash Type: Incorrect-function-pointer-type
Crash Address: 
Crash State:
  hb_font_destroy
  af_face_globals_free
  destroy_face
  
Sanitizer: undefined (UBSAN)

Recommended Security Severity: Medium

Regressed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_ubsan&range=484588:484759

Reproducer Testcase: https://clusterfuzz.com/download?testcase_id=6020511204376576

Issue filed automatically.

See https://chromium.googlesource.com/chromium/src/+/master/testing/libfuzzer/reproducing.md for more information.
 
Cc: tsepez@chromium.org
Components: Internals>Plugins>PDF
Owner: dsinclair@chromium.org
Status: Assigned (was: Untriaged)
dsinclair: can you please take a look? Though this might actually be bad behaviour in harfbuzz that pdfium is exposing.
Project Member

Comment 2 by sheriffbot@chromium.org, Sep 4 2017

Labels: M-62
Project Member

Comment 3 by sheriffbot@chromium.org, Sep 4 2017

Labels: ReleaseBlock-Stable
This is a serious security regression. If you are not able to fix this quickly, please revert the change that introduced it.

If this doesn't affect a release branch, or has not been properly classified for severity, please update the Security_Impact or Security_Severity labels, and remove the ReleaseBlock label. To disable this altogether, apply ReleaseBlock-NA.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 4 by sheriffbot@chromium.org, Sep 4 2017

Labels: Pri-1
Cc: dsinclair@chromium.org
Owner: npm@chromium.org
npm@ do you have time to look at some font stuff?

Comment 6 by npm@chromium.org, Sep 5 2017

Cc: bunge...@chromium.org drott@chromium.org
This is probably caused by freetype roll: 83b55ffcf303b35caaf048c76c9f9b89da2c3698

Comment 7 by drott@chromium.org, Sep 5 2017

I think this is similar to  issue 758478  and would benefit from a fix in HarfBuzz.

Comment 8 by npm@chromium.org, Sep 5 2017

Status: ExternalDependency (was: Assigned)
Cc: npm@chromium.org
Owner: behdad@chromium.org
Yeah, I can reproduce this and the issue appears to be that HarfBuzz in fb-ft.cc uses

static void
_hb_ft_font_destroy (hb_ft_font_t *ft_font)

and casts it to hb_destroy_func_t when setting the funcs. As a result, this later gets called as a hb_destroy_func_t, which is undefined behavior (C++14 5.2.10/6, since I was curious). I can't see 758478, so I can't really comment on that.
Note that this test case actually produces two of these sort of ubsan reports. The one in comment 9 is the first, the second is against a function in hb-face.cc

_hb_face_for_data_closure_destroy(hb_face_for_data_closure_t*)

which is also cast to hb_destroy_func_t (aka void *(void*)) and then later called as a hb_destroy_func_t.
Project Member

Comment 11 by sheriffbot@chromium.org, Sep 6 2017

Labels: -Security_Impact-Head Security_Impact-Beta
Project Member

Comment 12 by ClusterFuzz, Oct 1 2017

Components: Blink>Fonts
Labels: Test-Predator-AutoComponents
Automatically applying components based on information from OWNERS files. If this seems incorrect, please apply the Test-Predator-Wrong-Components label.
Labels: -Security_Impact-Beta -ReleaseBlock-Stable -M-62 M-63 Security_Impact-Stable
For more information, please see https://chromium.googlesource.com/chromium/src/+/master/testing/libfuzzer/reference.md.

The link referenced in the description is no longer valid.

Comment 15 by e...@chromium.org, Oct 31 2017

Mergedinto: 758478
Status: Duplicate (was: ExternalDependency)
Project Member

Comment 16 by ClusterFuzz, Nov 3 2017

ClusterFuzz has detected this issue as fixed in range 513517:513548.

Detailed report: https://clusterfuzz.com/testcase?key=6020511204376576

Fuzzer: libFuzzer_pdfium_fuzzer
Job Type: libfuzzer_chrome_ubsan
Platform Id: linux

Crash Type: Incorrect-function-pointer-type
Crash Address: 
Crash State:
  hb_font_destroy
  af_face_globals_free
  destroy_face
  
Sanitizer: undefined (UBSAN)

Recommended Security Severity: Medium

Regressed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_ubsan&range=484588:484759
Fixed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_ubsan&range=513517:513548

Reproducer Testcase: https://clusterfuzz.com/download?testcase_id=6020511204376576

See https://chromium.googlesource.com/chromium/src/+/master/testing/libfuzzer/reference.md for more information.

If you suspect that the result above is incorrect, try re-doing that job on the test case report page.
Labels: -Test-Predator-AutoComponents Test-Predator-Auto-Components
Project Member

Comment 18 by sheriffbot@chromium.org, Feb 9 2018

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

Sign in to add a comment