Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

null pointer dereference in BenchmarkOpenCLDevices #791

Closed
bestshow opened this issue Sep 30, 2017 · 6 comments
Closed

null pointer dereference in BenchmarkOpenCLDevices #791

bestshow opened this issue Sep 30, 2017 · 6 comments
Labels

Comments

@bestshow
Copy link

Here is the critical code: (in BenchmarkOpenCLDevices)

  testEnv=AcquireMagickCLEnv();        //1163
  testEnv->library=openCL_library;
  testEnv->devices=(MagickCLDevice *) AcquireMagickMemory(
    sizeof(MagickCLDevice));
  testEnv->number_devices=1;
  testEnv->benchmark_thread_id=GetMagickThreadId();
  testEnv->initialized=MagickTrue;

AcquireMagickCLEnv(...) may return NULL, so the following operations on the "testEnv" will dereference null pointer to cause memory error.

@mikayla-grace
Copy link

Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ https://www.imagemagick.org/download/beta/ by sometime tomorrow.

@dlemstra dlemstra added the bug label Oct 1, 2017
@dlemstra dlemstra closed this as completed Oct 1, 2017
@attritionorg
Copy link

Can you link the fixing commit(s)? Not seeing them in the history.

@dlemstra
Copy link
Member

dlemstra commented Oct 4, 2017

It is this commit: d2b87b4

@attritionorg
Copy link

Great thanks!

@dlemstra
Copy link
Member

dlemstra commented Oct 4, 2017

The commit was linked to the wrong issue (#792). And that issue was not yet fixed so I just pushed some changes to resolve that.

@nohmask
Copy link

nohmask commented Mar 2, 2018

This was assigned CVE-2017-18210.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

5 participants