PDF files don't open; "Failed to load backend for 'application/pdf': libpdfdocument.so" and "Invalid ELF header".

Bug #1835285 reported by daniel CURTIS
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
evince (Ubuntu)
Expired
Low
Unassigned

Bug Description

Hello.

On Wed, Jun 19. 2019, Evince has been updated to version '3.18.2-1ubuntu4.5' [1]. This update added, among other things, some hardening from Ubuntu 18.10 Release. However, now, it is impossible to open any '.pdf' files. When I try to open such file, there is an information (on the red background) in the main Evince window. And It looks this way:

,----[ Opening '.pdf' error ]
|
| Cannot open document „file:///home/user/Docs/foo-bar.pdf”.
| Failed to load backend for 'application/pdf':
| /usr/lib/i386-linux-gnu/evince/4/backends/libpdfdocument.so: Invalid ELF
| header
|
`----

There is a reference to »/usr/lib/i386-linux-gnu/evince/4/backends/libpdfdocument.so«. According to `dpkg(1)` command this file is a part of the 'libevdocument3-4' package, which is installed already (version '3.18.2-1ubuntu4.5'). I also tried to open '.pdf' file via terminal, but nothing changed. Here are the results:

,----[ $ evince Docs/foo-bar.pdf ]
|
| (evince:26918): EvinceDocument-WARNING **:
| /usr/lib/i386-linux-gnu/evince/4/backends/libpdfdocument.so: Invalid ELF
| header
|
| (evince:26918): EvinceDocument-WARNING **:
| /usr/lib/i386-linux-gnu/evince/4/backends/libpdfdocument.so: Invalid ELF
| header
|
`----

I think, that the whole problem is/could be related with AppArmor and Evince profile changes in the latest update, because - for example - day before, before update, everything was okay. Anyway, described problem/issue started to happen right after Evince update. (To check differences between AppArmor profile versions, please see 2. and 3.). There is one more thing to notice: Evince profile, has never been changed by the User.

If it's about AppArmor: I've tried to change Evince profile mode from 'enforce' to 'complain'. Unfortunately, nothing changed. There wasn't any valuable entries in system log files etc. (I'm sorry, but for now, I can not check other variants/solutions, such as: (a) disable Evince profile via `aa-disable(8)` command or (b) make links between »/etc/apparmor.d/usr.bin.evince« file and »/etc/apparmor.d/disable/« directory, next use `apparmor_parser(8)` command to remove profile etc.)

✖ NOTE: to make some more tests, I've tried to open '.djvu' file, but without success. It seems, that there is exactly the same informations as with '.pdf' files. Of course, Evince (»/etc/apparmor.d/usr.bin.evince«) profile contains rule to open such file format etc. and many others, see 4. So, according to all of this, maybe "Summary" should be changed to reflect this situation? Maybe something like: "PDF and other files don't open; "Failed to load (...)".

Sebastien, what do You think?.

Here are some additional informations:

✗ Description: Ubuntu 16.04.6 LTS
✗ Release: 16.04
✗ Architecture: x86_32/i386
✗ Linux: 4.4.0-155-generic

✓ AppArmor: 2.10.95-0ubuntu2.11
✓ Evince: 3.18.2-1ubuntu4.5

Best regards.
______________
[1] https://lists.ubuntu.com/archives/xenial-changes/2019-June/024691.html
[2] http://launchpadlibrarian.net/429511526/evince_3.18.2-1ubuntu4.4_3.18.2-1ubuntu4.5.diff.gz
[3] http://launchpadlibrarian.net/429293224/evince_3.18.2-1ubuntu4.1_3.18.2-1ubuntu4.5.diff.gz
[4] https://wiki.gnome.org/action/show/Apps/Evince/SupportedDocumentFormats?action=show&redirect=Evince%2FSupportedDocumentFormats

CVE References

daniel CURTIS (anoda)
description: updated
description: updated
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report, could you add the log from 'journalctl -b 0' after getting the issue?
Also what's the output of
$ debsums libevdocument3-4

Changed in evince (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
daniel CURTIS (anoda)
description: updated
daniel CURTIS (anoda)
description: updated
summary: - PDF files do not open. 'Failed to load backend for 'application/pdf':
- libpdfdocument.so' and 'Invalid ELF header'.
+ PDF files don't open; "Failed to load backend for 'application/pdf':
+ libpdfdocument.so" and "Invalid ELF header".
Revision history for this message
daniel CURTIS (anoda) wrote :
Download full text (3.3 KiB)

Hi Sebastien.

Thank You for an answer. And I apologize for such a long time without my answer. (An accident, nothing serious).

So Sebastien, please tell me, which informations exactly do you need? I'm thinking about a `journalctl -b 0` command, of course. Is there something specific, that you want or need to gather?

I'm asking, because there is not *any* informations about Evince or loading backend for 'application/pdf' - for example - in system log files, such as »/var/log/{syslog,kern.log}«, even right after trying to open '.pdf' or 'djvu' files etc. (as you asked for it in your comment). I mean nothing valuable, that can help to diagnose this problem.

Yes, there is the same problem with '.djvu' files - they cannot be opened via Evince. Summarizing: I have problems not only with '.pdf', but with '.djvu' files also. I have no idea what about other supported file formats (please see 4. and Evince AppArmor profile), because I can't test them, right now. And honestly, I don't know if I will be able to do this. Sorry. (So, I updated the bug report and added this information).

Sebastien, you also asked about the result of the `debsums(1)` for 'libevdocument3-4', right? I had to install `debsums` package first but here it is:

,----[ $ debsums libevdocument3-4 ]
| /usr/lib/i386-linux-gnu/evince/4/backends/comicsdocument.evince-backend OK
| /usr/lib/i386-linux-gnu/evince/4/backends/djvudocument.evince-backend OK
| /usr/lib/i386-linux-gnu/evince/4/backends/dvidocument.evince-backend OK
| /usr/lib/i386-linux-gnu/evince/4/backends/libcomicsdocument.so OK
| /usr/lib/i386-linux-gnu/evince/4/backends/libdjvudocument.so OK
| /usr/lib/i386-linux-gnu/evince/4/backends/libdvidocument.so FAILED
| /usr/lib/i386-linux-gnu/evince/4/backends/libpdfdocument.so FAILED
| /usr/lib/i386-linux-gnu/evince/4/backends/libpsdocument.so OK
| /usr/lib/i386-linux-gnu/evince/4/backends/libtiffdocument.so OK
| /usr/lib/i386-linux-gnu/evince/4/backends/libxpsdocument.so OK
| /usr/lib/i386-linux-gnu/evince/4/backends/pdfdocument.evince-backend OK
| /usr/lib/i386-linux-gnu/evince/4/backends/psdocument.evince-backend OK
| /usr/lib/i386-linux-gnu/evince/4/backends/tiffdocument.evince-backend OK
| /usr/lib/i386-linux-gnu/evince/4/backends/xpsdocument.evince-backend OK
| /usr/lib/i386-linux-gnu/libevdocument3.so.4.0.0 OK
| /usr/share/doc/libevdocument3-4/AUTHORS OK
| /usr/share/doc/libevdocument3-4/NEWS.gz OK
| /usr/share/doc/libevdocument3-4/README OK
| /usr/share/doc/libevdocument3-4/TODO OK
| /usr/share/doc/libevdocument3-4/changelog.Debian.gz OK
| /usr/share/doc/libevdocument3-4/copyright OK
| /usr/share/lintian/overrides/libevdocument3-4 OK
`----

As We can see, there are two 'FAILED' results. So the file's MD5 sum does not matc...

Read more...

Revision history for this message
daniel CURTIS (anoda) wrote :

Hello.

Sebastien, there is a good news. On Mon., Jul. 22, Evince has been updated to 3.18.2-1ubuntu4.6 version to fix one security issue (buffer overflow; CVE-2019-1010006)*. And now, I can open '.pdf' files again!

I think, that reinstalling Evince package, also could help - I mean with problem I described, because `debsums(1)` showed, that MD5 sum for 'libpdfdocument.so' and 'libdvidocument.so' files does not match so reinstall - probably - was a solution. However, I have not any possibilities to check this.

Thank You and I apologize one more time for such a long time without my answer.

Thanks, best regards.
_____________________
* https://lists.ubuntu.com/archives/xenial-changes/2019-July/025019.html

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for evince (Ubuntu) because there has been no activity for 60 days.]

Changed in evince (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.