RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1411327 - [fix available] Password Protected (Encrypted) files opening as plain text after cancelling password dialog
Summary: [fix available] Password Protected (Encrypted) files opening as plain text af...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libreoffice
Version: 7.5-Alt
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Michael Stahl
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks: 1426348
TreeView+ depends on / blocked
 
Reported: 2017-01-09 13:43 UTC by jigar
Modified: 2020-05-14 15:31 UTC (History)
6 users (show)

Fixed In Version: libreoffice-5.0.6.2-5.el7
Doc Type: Bug Fix
Doc Text:
Previously, when an incorrect password was entered for a password protected document, the document has beenoperation considered as valid and a fallback attempt to open it as plain text has been made. As a consequence, it could appear that the document succesfully loaded, while just the encrypted unreadable content was shown. A fix has been made to terminate import attempts after entering incorrect password, and now nothing is loaded when a wrong password is entered.
Clone Of:
: 1426348 (view as bug list)
Environment:
Last Closed: 2017-08-01 12:21:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Document Foundation 80999 0 None None None 2017-01-10 14:56:42 UTC
Red Hat Product Errata RHSA-2017:1975 0 normal SHIPPED_LIVE Moderate: libreoffice security and bug fix update 2017-08-01 16:04:51 UTC

Description jigar 2017-01-09 13:43:29 UTC
Description of problem: When we save password protected files using .xlsx format, it can be reopened with libreoffice without entering password and can lead to data loss and data theft. 


Version-Release number of selected component (if applicable): libreoffice-5.0.6.2-3


How reproducible: Always


Steps to Reproduce:
1. Create a Calc/Writer doc with data
2. In the "Save as" dialog box, select "Save with Password" & Format as ".xlsx"
3. Save the sheet & try reopening it
4. When prompted for password, Press "Cancel"
5. The sheet still opens up with encrypted data and can be edited and saved again.

Actual results: The encrypted password protected files can be reopened without password and edited.


Expected results: Password protected files should not open without the password.


Additional info: This is a security issue for the customer and hence high priority.

Comment 1 Caolan McNamara 2017-01-10 10:33:20 UTC
To be very clear, and looking at what I get here with this version, the documents are encrypted correctly and are only decrypted successfully if the correct password is given, right ?

But, if cancel is selected at the password dialog the import as a docx/pptx fails and the encrypted file is opened as raw text by some fall back logic. i.e. gibberish is shown. Which is the same thing as you would get if you e.g. opened the encrypted file in gedit as raw text.

So, assuming I'm looking at the right problem, this is unsightly and we should just fail to open it, but its not a security issue because there is no data theft possibility. Such raw encrypted data can be opened and edited in any text editor.

caolanm->mstahl: this happens in 5.0 but not in 5.1, can you track down the commit which make it behave as expected

Comment 3 Michael Stahl 2017-01-10 14:56:43 UTC
this is fixed upstream in 5.2.0 by

commit 579c2de3a88483eff0664d3a303b19cbd386db47
Author:     Maxim Monastirsky <momonasmon>
AuthorDate: Wed Apr 27 16:19:13 2016 +0300

    tdf#80999 Canceling password prompt should abort detection
    
    ... instead of continuing the detection loop and being
    "detected" as plain text. The detection API will from now
    return a type based on the file extension only, which is
    far more useful than "plain text" anyway. Plus the media
    descriptor has a flag to indicate that the detection wasn't
    completed, which can be also used by the loading code to
    abort the loading process.


patch applies cleanly to libreoffice-5-0 my branch and passes "make check".

Comment 4 Michael Stahl 2017-02-09 14:19:22 UTC
fix committed

Comment 11 Bill Sanford 2017-04-10 18:01:46 UTC
Verified with RHEL-7.4-20170330.1 and libreoffice-5.0.6.2-7

Comment 12 errata-xmlrpc 2017-08-01 12:21:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:1975


Note You need to log in before you can comment on or make changes to this bug.