[libcxx-commits] [PATCH] D77679: [libunwind] Fix UB in EHHeaderParser::findFDE

Fangrui Song via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 7 15:17:57 PDT 2020


MaskRay added a comment.

It seems that the problem can be reproduced with a very simple program

  Hex dump of section '.eh_frame':
    0x00016410 00000000                            ....

Linux Standard Base 5.0

> The .eh_frame section shall contain 1 or more Call Frame Information (CFI) records.

So the linker always adds a frame. findFDE may work on such an empty FDE list and trigger an out-of-bound access.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77679/new/

https://reviews.llvm.org/D77679





More information about the libcxx-commits mailing list