New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 695697 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

Incorrect-function-pointer-type in egl::Display::initialize

Project Member Reported by ClusterFuzz, Feb 24 2017

Issue description

Project Member

Comment 1 by sheriffbot@chromium.org, Feb 24 2017

Labels: M-58
Project Member

Comment 2 by sheriffbot@chromium.org, Feb 24 2017

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

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

Comment 3 by sheriffbot@chromium.org, Feb 24 2017

Labels: Pri-1
Components: Internals>GPU
Owner: jbau...@chromium.org
Status: Assigned (was: Untriaged)
PTAL or send this to someone who can, thank you.
Cc: jbau...@chromium.org
Components: -Internals>GPU Internals>GPU>ANGLE
Labels: -Pri-1 -ReleaseBlock-Beta -Security_Severity-Medium -Security_Impact-Head Pri-2
Owner: jmad...@chromium.org
Labels: -Pri-2 -M-58 Pri-3
This is due to a limitation in clusterfuzz where it can't parse decltype declarations. I'm going to file an feature request for decltype support - but in the meantime I think this is not a security issue of any kind.
Cc: jmad...@chromium.org
Owner: etienneb@chromium.org
Correction, this is a limitation in ASAN. Etienne said he could help me out here.
Labels: -Type-Bug-Security Type-Bug
I said: It may be a UBSAN limitation (not ASAN).
I'm gonna look to the exact case and try to repro.
I tried to repro with this snippet, but with LLVM ToT it seems fine.

==== module.h ====

#include <iostream>

void problemMember() {
  std::cout << "problemMember called!" << std::endl;
}

struct ProblemFns {
  decltype(&problemMember) member = problemMember;
};

// needs export labels
extern "C" __declspec(dllexport) ProblemFns *GetProblemFns();
using GetProblemFnsType = decltype(GetProblemFns);


==== module.cc ====

#include <windows.h>

#include "module.h"

static ProblemFns g_problemFns;

ProblemFns *GetProblemFns() {
  return &g_problemFns;
}


==== main.cc ====

#include <windows.h>

#include "module.h"

int main() {
  HMODULE dll = ::LoadLibrary("module.dll");
  auto getProblemFns = reinterpret_cast<GetProblemFnsType*>(
      ::GetProcAddress(dll, "GetProblemFns"));

  // error 1:
  auto problemFns = getProblemFns();

  // error 2:
  problemFns->member();
}



command-line:
d:\src\llvm\ninja64\bin\clang-cl.exe main.cc /Zi -fsanitize=undefined
d:\src\llvm\ninja64\bin\clang-cl.exe module.cc /LD /Zi -fsanitize=undefined


Running:
D:\src\llvm\examples>main.exe
problemMember called!
Project Member

Comment 11 by ClusterFuzz, Jul 30 2017

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

Fuzzer: gpu_angle_fuzzer
Job Type: libfuzzer_chrome_ubsan
Crash Type: Incorrect-function-pointer-type
Crash Address: 
Crash State:
  egl::Display::initialize
  egl::Display::initialize
  egl::Initialize
  
Sanitizer: undefined (UBSAN)

Recommended Security Severity: Medium

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


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

Comment 12 by ClusterFuzz, Jul 31 2017

Labels: Security_Severity-Medium
Detailed report: https://clusterfuzz.com/testcase?key=4722871158177792

Fuzzer: gpu_angle_fuzzer
Job Type: libfuzzer_chrome_ubsan
Crash Type: Incorrect-function-pointer-type
Crash Address: 
Crash State:
  egl::Display::initialize
  egl::Display::initialize
  egl::Initialize
  
Sanitizer: undefined (UBSAN)

Recommended Security Severity: Medium

Regressed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_ubsan&range=452261:452420

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


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

A recommended severity was added to this bug. Please change the severity if it is inaccurate.

Project Member

Comment 13 by ClusterFuzz, Sep 7 2017

ClusterFuzz has detected this issue as fixed in range 500168:500210.

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

Fuzzer: gpu_angle_fuzzer
Job Type: libfuzzer_chrome_ubsan
Crash Type: Incorrect-function-pointer-type
Crash Address: 
Crash State:
  egl::Display::initialize
  egl::Display::initialize
  egl::Initialize
  
Sanitizer: undefined (UBSAN)

Recommended Security Severity: Medium

Regressed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_ubsan&range=452261:452420
Fixed: https://clusterfuzz.com/revisions?job=libfuzzer_chrome_ubsan&range=500168:500210

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

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

If you suspect that the result above is incorrect, try re-doing that job on the test case report page.
Project Member

Comment 14 by ClusterFuzz, Sep 7 2017

Labels: ClusterFuzz-Verified
Status: Verified (was: Assigned)
ClusterFuzz testcase 4722871158177792 is verified as fixed, so closing issue as verified.

If this is incorrect, please add ClusterFuzz-Wrong label and re-open the issue.
Project Member

Comment 15 by sheriffbot@chromium.org, Sep 7 2017

Labels: -Restrict-View-SecurityTeam Restrict-View-SecurityNotify
Project Member

Comment 16 by sheriffbot@chromium.org, Dec 14 2017

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