Bug 637092

Summary: libpst-0.6.47-2.fc12: pst_convert_utf8_null: SIGSEGV while processing pst file with non-email object
Product: Red Hat Enterprise Linux 6 Reporter: Petr Pisar <ppisar>
Component: libpstAssignee: Petr Pisar <ppisar>
Status: CLOSED NEXTRELEASE QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: low    
Version: 6.1CC: beckyspencer121, carl, jorton, mtyson, ovasik, tpelka
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: i686   
OS: Linux   
URL: http://hg.five-ten-sg.com/libpst/rev/ab87f9070ed2
Whiteboard: abrt_hash:81b117235a95f2bcd5822832c0c3957ec7e1e830
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 633498 Environment:
Last Closed: 2016-08-31 12:56:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 836160, 1355984    

Description Petr Pisar 2010-09-24 08:51:07 UTC
+++ This bug was initially created as a clone of Bug #633498 +++

abrt version: 1.1.13
architecture: i686
Attached file: backtrace
cmdline: /usr/bin/readpst -o /home/diazfa/Inbox2/ -r /media/Preload/Folders/BackUpInbox.pst
comment: I have a windows partition in my laptop with a pst file that I wanted to be able to import into thunderbird.  I execute the readpst command to read a 1.5GB pst file
component: libpst
crash_function: pst_convert_utf8_null
executable: /usr/bin/readpst
kernel: 2.6.32.21-166.fc12.i686.PAE
package: libpst-0.6.47-2.fc12
rating: 4
reason: Process /usr/bin/readpst was killed by signal 11 (SIGSEGV)
release: Fedora release 12 (Constantine)
time: 1284409840
uid: 501

How to reproduce
-----
1.mount a windows partition
2.execute readpst 
3.

--- Additional comment from updates on 2010-09-13 22:29:55 GMT ---

libpst-0.6.49-1.fc12 has been submitted as an update for Fedora 12.
https://admin.fedoraproject.org/updates/libpst-0.6.49-1.fc12
---

This is fixed in libpst-0.6.49. No test-case exists (one would need to learn the pst format and to create the pst file with non-email objects manually).

The fix is trivial:

# HG changeset patch
# User Carl Byington <carl>
# Date 1284414429 25200
# Node ID ab87f9070ed280a36bee70172ece6980b3aa4a01
# Parent  fb66d428347d1c740fd614eedfd5c4c2ff7eb37e
fix to ignore embedded objects that are not email messages

--- a/src/readpst.c	Thu Sep 02 12:28:01 2010 -0700
+++ b/src/readpst.c	Mon Sep 13 14:47:09 2010 -0700
@@ -1012,9 +1012,13 @@
     if (!item) {
         DEBUG_WARN(("write_embedded_message: pst_parse_item was unable to parse the embedded message in attachment ID %llu", attach->i_id));
     } else {
-        fprintf(f_output, "\n--%s\n", boundary);
-        fprintf(f_output, "Content-Type: %s\n\n", attach->mimetype.str);
-        write_normal_email(f_output, "", item, MODE_NORMAL, 0, pf, 0, extra_mime_headers);
+        if (!item->email) {
+            DEBUG_WARN(("write_embedded_message: pst_parse_item returned type %d, not an email message", item->type));
+        } else {
+            fprintf(f_output, "\n--%s\n", boundary);
+            fprintf(f_output, "Content-Type: %s\n\n", attach->mimetype.str);
+            write_normal_email(f_output, "", item, MODE_NORMAL, 0, pf, 0, extra_mime_headers);
+        }
         pst_freeItem(item);
     }

Comment 2 Carl Byington 2010-09-24 15:53:50 UTC
Forwarding a message containing an appointment might generate such an embedded object, but I don't have access to any MS system to test that hypothesis.

Comment 3 RHEL Program Management 2011-01-07 15:31:09 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 5 RHEL Program Management 2011-07-05 23:42:31 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 16 Joe Orton 2016-08-31 12:56:57 UTC
This is fixed upstream and in RHEL7; closing in the absence of customer reports
for RHEL6.