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

TIF011/TIF013 could never be reached #117

Open
qhjchc opened this issue Oct 19, 2022 · 4 comments
Open

TIF011/TIF013 could never be reached #117

qhjchc opened this issue Oct 19, 2022 · 4 comments

Comments

@qhjchc
Copy link

qhjchc commented Oct 19, 2022

Hi,

I traversed all instructions in the given binaries

  • tiff_read_rgba_fuzzer
  • tiffcp

and found that the none instructions are in the two files

  • libtiff/tif_print.c
  • libtiff/tif_jbig.c

which means that the two CVEs may never be reached in magma

  • TIF011 | AAH019 | libtiff/tif_print.c:549
  • TIF013 | AAH021 | libtiff/tif_jbig.c:122
@qhjchc qhjchc changed the title TIF011/TIF011 could never be reached TIF011/TIF013 could never be reached Oct 19, 2022
@adrianherrera
Copy link
Member

Hi!

Interesting! Can you please be more specific about what you mean by "traversed all instructions".

@qhjchc
Copy link
Author

qhjchc commented Oct 22, 2022

Thanks a lot for your kind reply :)

I used an LLVM Pass to locate the corresponding instructions of the target line in the two binaries.
However, none instructions in the two binaries belong to the two files (tif_print.c:549, tif_jbig.c:122).

So I think these two CVEs could never be triggered in magma.

The following is the demo code to get the fileName of each instruction:

    for (Module::iterator F = M.begin(), E = M.end(); F != E; ++F) {
      Function *Func = &*F;
      for (inst_iterator I = inst_begin(Func), E = inst_end(Func); I != E; ++I) {
        if (MDNode *N = I->getMetadata("dbg")) {
          DILocation *Loc = cast<DILocation>(N);
          std::string fileName = getDSPIPath(*Loc);
        }
      }
     }

@adrianherrera
Copy link
Member

Thanks, @qhjchc, that is very interesting. This sounds like a useful analysis to have; do you have the code for your LLVM pass available on github? I would be interested in digging into this in greater detail.

@acidghost
Copy link

@qhjchc AAH019 and AAH021 are not marked with a Proof of Vulnerability in the paper.

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

No branches or pull requests

3 participants