Wireshark-commits: [Wireshark-commits] master-2.6 03c674b: tcap: check p_tcap_private before derefe

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Thu, 31 Jan 2019 17:15:09 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=03c674b21bac121687522d3fe145eeb56ce72258
Submitter: "Dario Lombardo <lomato@xxxxxxxxx>"
Changed: branch: master-2.6
Repository: wireshark

Commits:

03c674b by Dario Lombardo (lomato@xxxxxxxxx):

    tcap: check p_tcap_private before dereferencing.
    
    This caused a NULL pointer dereference on ASAN builds with
    malformed packets.
    
    AddressSanitizer:DEADLYSIGNAL
    =================================================================
    ==15485==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x7ff49a4281fa bp 0x7ffe5257a4d0 sp 0x7ffe5257a2c0 T0)
    ==15485==The signal is caused by a WRITE memory access.
    ==15485==Hint: address points to the zero page.
        #0 0x7ff49a4281f9 in dissect_tcap_AARQ_application_context_name wireshark/epan/dissectors/./asn1/tcap/tcap.cnf
        #1 0x7ff498e7bab1 in dissect_ber_sequence wireshark/epan/dissectors/packet-ber.c:2425:17
    
    Bug: 15464
    Change-Id: I8fd4f09a1356211acb180e4598a33fce96d98e94
    Reviewed-on: https://code.wireshark.org/review/31840
    Reviewed-by: Pascal Quantin <pascal.quantin@xxxxxxxxx>
    Petri-Dish: Pascal Quantin <pascal.quantin@xxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    (cherry picked from commit 34873a20eb489562098c5a58085ae783f869525c)
    Reviewed-on: https://code.wireshark.org/review/31841
    Petri-Dish: Dario Lombardo <lomato@xxxxxxxxx>
    Reviewed-by: Dario Lombardo <lomato@xxxxxxxxx>
    

Actions performed:

    from  b9d0e20   Qt: Restore column width and visibility when switching profiles
     add  03c674b   tcap: check p_tcap_private before dereferencing.


Summary of changes:
 epan/dissectors/asn1/tcap/tcap.cnf | 24 +++++++++++++++--------
 epan/dissectors/packet-tcap.c      | 40 +++++++++++++++++++++++---------------
 2 files changed, 40 insertions(+), 24 deletions(-)