Yeraze / ytnef

Yeraze's TNEF Stream Reader - for winmail.dat files
GNU General Public License v2.0
32 stars 22 forks source link

ytnef crashes with Segmentation fault parsing winmail.dat #89

Closed pasikarkkainen closed 1 year ago

pasikarkkainen commented 3 years ago

I tried using ytnef and noticed it crashes trying to parse the winmail.dat tnef file I have..

$ ytnef -v winmail.dat 
Attempting to parse winmail.dat...
Aid Owner: [4] �'cz
Request Response: [2] 
Segmentation fault

this is using the following:

$ rpm -qa | grep ytnef
ytnef-2.6-12.el7.x86_64
libytnef-1.5-14.el7.x86_64
pasikarkkainen commented 3 years ago

Some more info.. the crashing winmail.dat tnef file in question looks like the following (when checking with "tnefparse" which seems to be able to parse it properly):

$ tnefparse -o winmail.dat  -b

Overview of winmail.dat:

  Attachments:

  Objects:

    TNEF Version
    OEM Codepage
    Message ID
    Priority
    Date Sent
    Date Modified
    Message Class
    Subject
    Date Start
    Date End
    Owner Appointment ID
    Response Requested
    MAPI Properties

  Properties:

    MAPI_TNEF_CORRELATION_KEY
    MAPI_SENT_REPRESENTING_NAME
    MAPI_SENT_REPRESENTING_EMAIL_ADDRESS
    MAPI_SENT_REPRESENTING_ADDRTYPE
    MAPI_SENT_REPRESENTING_ENTRYID
    MAPI_SENT_REPRESENTING_SMTP_ADDRESS
    MAPI_SIP_ADDRESS
    MAPI_SENDER_NAME
    MAPI_SENDER_EMAIL_ADDRESS
    MAPI_SENDER_ADDRTYPE
    MAPI_SENDER_ENTRYID
    MAPI_SENDER_SMTP_ADDRESS 
    MAPI_SEND_RICH_INFO
    MAPI_MESSAGE_CLASS
    MAPI_MESSAGE_LOCALE_ID   
    MAPI_SEND_RICH_INFO
    MAPI_MESSAGE_CODEPAGE
    MAPI_SEARCH_KEY
    MAPI_IMPORTANCE
    MAPI_CLIENT_SUBMIT_TIME  
    MAPI_LAST_MODIFICATION_TIME
    MAPI_OWNER_APPT_ID
    MAPI_START_DATE
    MAPI_END_DATE
    MAPI_READ_RECEIPT_REQUESTED
    MAPI_ORIGINATOR_DELIVERY_REPORT_REQUESTED
    MAPI_LAST_MODIFIER_NAME  
    MAPI_REPLY_REQUESTED
    MAPI_RESPONSE_REQUESTED  
    MAPI_SUBJECT
    MAPI_SUBJECT_PREFIX
    MAPI_SENSITIVITY
    MAPI_ORIGINAL_SENSITIVITY
    MAPI_CONVERSATION_INDEX  
    MAPI_CONVERSATION_TOPIC  
    MAPI_SMTP_MESSAGE_ID
    MAPI_INTERNET_CODEPAGE   
    MAPI_ICON_INDEX
    MAPI_CREATION_TIME
    MAPI_ALTERNATE_RECIPIENT_ALLOWED
    MAPI_PRIORITY
    MAPI_RECIPIENT_REASSIGNMENT_PROHIBITED
    MAPI_NON_RECEIPT_NOTIFICATION_REQUESTED
    MAPI_TARGET_ENTRY_ID
    MAPI_CONVERSATION_ID
    MAPI_CREATOR_NAME
    MAPI_CREATOR_ADDRESS_TYPE
    MAPI_CREATOR_EMAIL_ADDRESS
    MAPI_SENDER_SIMPLE_DISPLAY_NAME
    MAPI_SENT_REPRESENTING_SIMPLE_DISPLAY_NAME
    MAPI_CREATOR_SIMPLE_DISP_NAME
    MAPI_LAST_MODIFIER_SIMPLE_DISPLAY_NAME
    MAPI_INTERNET_MAIL_OVERRIDE_FORMAT
    MAPI_MESSAGE_EDITOR_FORMAT
    MAPI_STORE_SUPPORT_MASK  
<body text goes here>

this winmail.dat tnef file includes a calender invitation from MS Exchange 2010 as MAPI objects/properties.

ohwgiles commented 3 years ago

Several crashes have been fixed since that version. Please try out your winmail.dat file on ytnef compiled from the master branch.

Yeraze commented 1 year ago

stale