Wireshark-commits: [Wireshark-commits] master c4602e1: elf: fix .eh_frame parsing, add expert info

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Wed, 3 Dec 2014 11:55:22 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=c4602e1c0ce08e0a2701e2cfb169f0d083001abb
Submitter: Michal Labedzki (michal.labedzki@xxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

c4602e1 by Peter Wu (peter@xxxxxxxxxxxxx):

    elf: fix .eh_frame parsing, add expert info for bad CIE length
    
    Fixes, matching LSB 4.1[1] and the AMD64 ABI[2]:
     - Multiple CIE entries can exist after the first one. Introduce a CFI
       subtree and add CIE and FDE records below it. Merge comon parsing
       functionality of CIE/FDE. A CIE terminator is treated specially, and
       added instead of a CFI subtree.
     - Validate the header length before using it to avoid a dissector
       assert. This condition is triggered by a binary produced by a buggy
       gold linker[3].
     - Add two expert items: one to detect an invalid CIE length (too small
       or too large) and one to detect a segment which is larger than the
       CFI records (to catch the gold linker bug[3] where the segment begins
       with zeroes).
     - Do not overload the elf.eh_frame.length field with the value of the
       Extended Length, instead use elf.eh_frame.extended_length (likewise
       for FDE).
     - Stop tracking the subsection size with another variable
       (remaining_length), just store the end of the entry.
     - Fix typos in descriptions, improved / shortened field descriptions.
    
    Tested with the 'bad' and 'good' binary from bug 10726 as well as the
    'a' binary from bug 8818 (which introduced this code). Decodes properly.
    
     [1]: https://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/ehframechpt.html
     [2]: http://www.x86-64.org/documentation/abi.pdf
     [3]: https://sourceware.org/bugzilla/show_bug.cgi?id=17639
    
    Bug: 10726
    Change-Id: I523600b8141bd8953ae468051a57357ab199a258
    Reviewed-on: https://code.wireshark.org/review/5488
    Petri-Dish: Michal Labedzki <michal.labedzki@xxxxxxxxx>
    Tested-by: Michal Labedzki <michal.labedzki@xxxxxxxxx>
    Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
    Reviewed-by: Michal Labedzki <michal.labedzki@xxxxxxxxx>
    

Actions performed:

    from  c69ccab   Install the other desktop files with "make install" as well.
    adds  c4602e1   elf: fix .eh_frame parsing, add expert info for bad CIE length


Summary of changes:
 epan/dissectors/file-elf.c |  267 ++++++++++++++++++++++++--------------------
 1 file changed, 146 insertions(+), 121 deletions(-)