Your message dated Mon, 08 Oct 2018 04:34:02 +0000
with message-id <[email protected]>
and subject line Bug#909849: fixed in evince 3.30.1-1
has caused the Debian Bug report #909849,
regarding evince: apparmor profile hardening
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
909849: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=909849
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: evince
Version: 3.30.0-3
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu cosmic ubuntu-patch

Dear Maintainer,

In Ubuntu, the attached patch was applied to achieve the following:

  * debian/apparmor-profile.abstraction, apparmor-profile: harden the profile
    - add preamble for expectations of the profile
    - evince{-previewer}: restrict access to DBus system bus (for compatiblity,
      we allow full access to session, translation and accessibility buses):
      + allow Get* to anything polkit allows
      + allow talking to avahi (for printing)
      + allow talking to colord (for printing)
    - make the thumbnailer more restrictive (LP: #1794848)
      + remove evince abstraction and use only what is needed from it
      + limit access to DBus session bus
      + generally disallow writes
      + allow reads for non-hidden files
    - disallow access to the dirs of private files (LP: #1794848)
  * debian/apparmor-profile: allow /bin/env ixr

Thanks for considering the patch.


-- System Information:
Debian Release: buster/sid
  APT prefers bionic-updates
  APT policy: (500, 'bionic-updates'), (500, 'bionic-security'), (500, 'bionic')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.15.0-34-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru evince-3.30.0/debian/apparmor-profile 
evince-3.30.0/debian/apparmor-profile
--- evince-3.30.0/debian/apparmor-profile       2018-09-27 06:19:53.000000000 
-0500
+++ evince-3.30.0/debian/apparmor-profile       2018-09-28 16:19:49.000000000 
-0500
@@ -1,6 +1,15 @@
 # vim:syntax=apparmor
-# Author: Kees Cook <[email protected]>
-#         Jamie Strandboge <[email protected]>
+
+# evince is not written with application confinement in mind and is designed to
+# operate within a trusted desktop session where anything running within the
+# user's session is trusted. That said, evince will often process untrusted
+# input (PDFs, images, etc). Ideally evince would be written in such a way that
+# image processing is separate from the main process and that processing
+# happens in a restrictive sandbox, but unfortunately that is not currently the
+# case. Because evince will process untrusted input, this profile aims to
+# provide some hardening, but considering evince's design and other factors 
such
+# as X, gsettings, accessibility, translations, DBus session and system
+# services, etc, complete confinement is not possible.
 
 #include <tunables/global>
 
@@ -8,8 +17,6 @@
   #include <abstractions/audio>
   #include <abstractions/bash>
   #include <abstractions/cups-client>
-  #include <abstractions/dbus>
-  #include <abstractions/dbus-session>
   #include <abstractions/dbus-accessibility>
   #include <abstractions/evince>
   #include <abstractions/ibus>
@@ -21,6 +28,26 @@
   #include <abstractions/ubuntu-console-email>
   #include <abstractions/ubuntu-media-players>
 
+  # For now, let evince talk to any session services over dbus. We can
+  # blacklist any problematic ones (but note, evince uses libsecret :\)
+  #include <abstractions/dbus-session>
+
+  #include <abstractions/dbus-strict>
+  dbus (receive) bus=system,
+  # Allow getting information from various system services
+  dbus (send)
+      bus=system
+      member="Get*"
+      peer=(label=unconfined),
+  # Allow talking to avahi with whatever polkit allows
+  dbus (send)
+      bus=system
+      interface="org.freedesktop.Avahi{,.*}",
+  # Allow talking to colord with whatever polkit allows
+  dbus (send)
+      bus=system
+      interface="org.freedesktop.ColorManager{,.*}",
+
   # Terminals for using console applications. These abstractions should ideally
   # have 'ix' to restrict access to what only evince is allowed to do
   #include <abstractions/ubuntu-gnome-terminal>
@@ -55,6 +82,7 @@
 
   # GLib desktop launch helper (used under the hood by g_app_info_launch)
   /usr/lib/@{multiarch}/glib-[0-9]*/gio-launch-desktop rmix,
+  /usr/bin/env ixr,
 
   # allow directory listings (ie 'r' on directories) so browsing via the file
   # dialog works
@@ -118,9 +146,7 @@
   #include <abstractions/audio>
   #include <abstractions/bash>
   #include <abstractions/cups-client>
-  #include <abstractions/dbus-session>
   #include <abstractions/dbus-accessibility>
-  #include <abstractions/dbus-strict>
   #include <abstractions/evince>
   #include <abstractions/ibus>
   #include <abstractions/nameservice>
@@ -131,6 +157,27 @@
   #include <abstractions/ubuntu-console-email>
   #include <abstractions/ubuntu-media-players>
 
+  # For now, let evince talk to any session services over dbus. We can
+  # blacklist any problematic ones (but note, evince uses libsecret :\)
+  #include <abstractions/dbus-session>
+
+  #include <abstractions/dbus-strict>
+  dbus (receive) bus=system,
+  # Allow getting information from various system services
+  dbus (send)
+      bus=system
+      member="Get*"
+      peer=(label=unconfined),
+  # Allow talking to avahi with whatever polkit allows
+  dbus (send)
+      bus=system
+      interface="org.freedesktop.Avahi{,.*}",
+  # Allow talking to colord with whatever polkit allows
+  dbus (send)
+      bus=system
+      interface="org.freedesktop.ColorManager{,.*}",
+
+
   # Terminals for using console applications. These abstractions should ideally
   # have 'ix' to restrict access to what only evince is allowed to do
   #include <abstractions/ubuntu-gnome-terminal>
@@ -155,8 +202,22 @@
 }
 
 /usr/bin/evince-thumbnailer {
-  #include <abstractions/dbus-session>
-  #include <abstractions/evince>
+  #include <abstractions/base>
+  #include <abstractions/private-files-strict>
+
+  #include <abstractions/fonts>
+  deny @{HOME}/.{,cache/}fontconfig/** wl,
+  deny @{HOME}/missfont.log wl,
+
+  #include <abstractions/dbus-session-strict>
+  dbus (receive) bus=session,
+  dbus (send)
+    bus=session
+    path="/org/gtk/vfs/mounttracker"
+    interface="org.gtk.vfs.MountTracker"
+    member="ListMountableInfo"
+    peer=(label=unconfined),
+
 
   # The thumbnailer doesn't need access to everything in the nameservice
   # abstraction. Allow reading of /etc/passwd and /etc/group, but suppress
@@ -171,11 +232,75 @@
   network inet  dgram,
   network inet6 dgram,
 
+  /etc/papersize r,
+
   /usr/bin/evince-thumbnailer mr,
 
-  # Lenient, but remember we still have abstractions/private-files-strict in
-  # effect).
+  /etc/texmf/ r,
+  /etc/texmf/** r,
+  /etc/xpdf/* r,
+
+  /usr/bin/gs-esp ixr,
+  /usr/bin/mktexpk Cx -> sanitized_helper,
+  /usr/bin/mktextfm Cx -> sanitized_helper,
+  /usr/bin/dvipdfm Cx -> sanitized_helper,
+  /usr/bin/dvipdfmx Cx -> sanitized_helper,
+
+  # supported archivers
+  /{usr/,}bin/gzip ixr,
+  /{usr/,}bin/bzip2 ixr,
+  /usr/bin/unrar* ixr,
+  /usr/bin/unzip ixr,
+  /usr/bin/7zr ixr,
+  /usr/lib/p7zip/7zr ixr,
+  /usr/bin/7za ixr,
+  /usr/lib/p7zip/7za ixr,
+  /usr/bin/zipnote ixr,
+  /{usr/,}bin/tar ixr,
+  /usr/bin/xz ixr,
+
+  # allow read access to anything in /usr/share, for plugins and input methods
+  /usr/local/share/** r,
+  /usr/share/** r,
+  /usr/lib/ghostscript/** mr,
+  /var/lib/ghostscript/** r,
+  /var/lib/texmf/** r,
+
+  # from http://live.gnome.org/Evince/SupportedDocumentFormats. Allow
+  # read for all supported file formats
+  /**.[bB][mM][pP]     r,
+  /**.[dD][jJ][vV][uU] r,
+  /**.[dD][vV][iI]     r,
+  /**.[gG][iI][fF]     r,
+  /**.[jJ][pP][gG]     r,
+  /**.[jJ][pP][eE][gG] r,
+  /**.[oO][dD][pP]     r,
+  /**.[fFpP][dD][fF]   r,
+  /**.[pP][nN][mM]     r,
+  /**.[pP][nN][gG]     r,
+  /**.[pP][sS]         r,
+  /**.[eE][pP][sS]     r,
+  /**.[eE][pP][sS][fFiI23] r,
+  /**.[tT][iI][fF]     r,
+  /**.[tT][iI][fF][fF] r,
+  /**.[xX][pP][mM]     r,
+  /**.[gG][zZ]         r,
+  /**.[bB][zZ]2        r,
+  /**.[cC][bB][rRzZ7]  r,
+  /**.[xX][zZ]         r,
+
+  owner @{HOME}/.texlive*/** r,
+  owner @{HOME}/.local/share/{,flatpak/exports/share/}mime/** r,
+  owner @{HOME}/.local/share/{,flatpak/exports/share/}mime/** r,
+
+  # With the network rules above, this allows data exfiltration for files
+  # not covered by private-files-strict.
   @{HOME}/ r,
-  owner @{HOME}/** rw,
-  owner /media/**  rw,
+  owner @{HOME}/[^.]** r,
+  owner /media/**  r,
+
+  owner /tmp/.gnome_desktop_thumbnail.* w,
+
+  # Site-specific additions and overrides. See local/README for details.
+  #include <local/usr.bin.evince>
 }
diff -Nru evince-3.30.0/debian/apparmor-profile.abstraction 
evince-3.30.0/debian/apparmor-profile.abstraction
--- evince-3.30.0/debian/apparmor-profile.abstraction   2018-09-27 
06:19:53.000000000 -0500
+++ evince-3.30.0/debian/apparmor-profile.abstraction   2018-09-28 
16:19:49.000000000 -0500
@@ -94,26 +94,33 @@
   # from directly.
 
   #include <abstractions/private-files>
-  audit deny @{HOME}/.gnupg/** mrwkl,
-  audit deny @{HOME}/.ssh/** mrwkl,
-  audit deny @{HOME}/.gnome2_private/** mrwkl,
-  audit deny @{HOME}/.gnome2/keyrings/** mrwkl,
-  audit deny @{HOME}/.kde/share/apps/kwallet/** mrwkl,
-  audit deny @{HOME}/.pki/nssdb/** w,
+  audit deny @{HOME}/.gnupg/{,**} mrwkl,
+  audit deny @{HOME}/.ssh/{,**} mrwkl,
+  audit deny @{HOME}/.gnome2_private/{,**} mrwkl,
+  audit deny @{HOME}/.gnome2/ w,
+  audit deny @{HOME}/.gnome2/keyrings/{,**} mrwkl,
+  audit deny @{HOME}/.kde/{,share/,share/apps/} w,
+  audit deny @{HOME}/.kde/share/apps/kwallet/{,**} mrwkl,
+  audit deny @{HOME}/.pki/{,nssdb/} w,
+  audit deny @{HOME}/.pki/nssdb/{,**} wl,
 
+  audit deny @{HOME}/.mozilla/{,**/} w,
   audit deny @{HOME}/.mozilla/*/*/* mrwkl,
-  audit deny @{HOME}/.mozilla/**/bookmarkbackups/** mrwkl,
-  audit deny @{HOME}/.mozilla/**/chrome/** mrwkl,
-  audit deny @{HOME}/.mozilla/**/extensions/** mrwkl,
-  audit deny @{HOME}/.mozilla/**/gm_scripts/** mrwkl,
+  audit deny @{HOME}/.mozilla/**/bookmarkbackups/{,**} mrwkl,
+  audit deny @{HOME}/.mozilla/**/chrome/{,**} mrwkl,
+  audit deny @{HOME}/.mozilla/**/extensions/{,**} mrwkl,
+  audit deny @{HOME}/.mozilla/**/gm_scripts/{,**} mrwkl,
 
-  audit deny @{HOME}/.config/chromium/** mrwkl,
-  audit deny @{HOME}/.evolution/** mrwkl,
-  audit deny @{HOME}/.config/evolution/** mrwkl,
-  audit deny @{HOME}/.kde/share/config/** mrwkl,
-  audit deny @{HOME}/.kde/share/apps/kmail/** mrwkl,
+  audit deny @{HOME}/.config/ w,
+  audit deny @{HOME}/.config/chromium/{,**} mrwkl,
+  audit deny @{HOME}/.config/evolution/{,**} mrwkl,
+  audit deny @{HOME}/.evolution/{,**} mrwkl,
+  audit deny @{HOME}/.kde/{,share/,share/apps/} w,
+  audit deny @{HOME}/.kde/share/config/{,**} mrwkl,
+  audit deny @{HOME}/.kde/share/apps/kmail/{,**} mrwkl,
+  audit deny @{HOME}/.{,mozilla-}thunderbird/{,**/} w,
   audit deny @{HOME}/.{,mozilla-}thunderbird/*/* mrwkl,
-  audit deny @{HOME}/.{,mozilla-}thunderbird/*/[^C][^a][^c][^h][^e]*/** mrwkl,
+  audit deny @{HOME}/.{,mozilla-}thunderbird/*/[^C][^a][^c][^h][^e]*/{,**} 
mrwkl,
 
   # When LP: #451422 is fixed, change the above to simply be:
   ##include <abstractions/private-files-strict>

--- End Message ---
--- Begin Message ---
Source: evince
Source-Version: 3.30.1-1

We believe that the bug you reported is fixed in the latest version of
evince, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jeremy Bicha <[email protected]> (supplier of updated evince package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Mon, 08 Oct 2018 00:17:39 -0400
Source: evince
Binary: evince evince-common libevdocument3-4 libevview3-3 libevince-dev 
gir1.2-evince-3.0
Architecture: source
Version: 3.30.1-1
Distribution: unstable
Urgency: medium
Maintainer: Debian GNOME Maintainers 
<[email protected]>
Changed-By: Jeremy Bicha <[email protected]>
Description:
 evince     - Document (PostScript, PDF) viewer
 evince-common - Document (PostScript, PDF) viewer - common files
 gir1.2-evince-3.0 - GObject introspection data for the evince libraries
 libevdocument3-4 - Document (PostScript, PDF) rendering library
 libevince-dev - Document (PostScript, PDF) rendering library - development 
files
 libevview3-3 - Document (PostScript, PDF) rendering library - Gtk+ widgets
Closes: 909849
Launchpad-Bugs-Fixed: 1788929 1794848
Changes:
 evince (3.30.1-1) unstable; urgency=medium
 .
   [ Jeremy Bicha ]
   * New upstream release
 .
   [ Jamie Strandboge ]
   * debian/apparmor-profile.abstraction, apparmor-profile: harden the profile
     - add preamble for expectations of the profile
     - evince{-previewer}: restrict access to DBus system bus (we allow full
       access to session, translation and accessibility buses for compatibility)
       + allow Get* to anything polkit allows
       + allow talking to avahi (for printing)
       + allow talking to colord (for printing)
     - make the thumbnailer more restrictive (LP: #1794848) (Closes: #909849)
       + remove evince abstraction and use only what is needed from it
       + limit access to DBus session bus
       + generally disallow writes
       + allow reads for non-hidden files
     - disallow access to the dirs of private files (LP: #1788929)
     * debian/apparmor-profile: allow /bin/env ixr
Checksums-Sha1:
 030cfb5269593a1b5d173fcfcfa3d3424173a243 3069 evince_3.30.1-1.dsc
 68f19b40fabc7929e71b6b50460ddd06bb6ce821 2270352 evince_3.30.1.orig.tar.xz
 a36a870f534e31edea6e219e6b6d5faa5d61550a 29576 evince_3.30.1-1.debian.tar.xz
 c6be41ee5b74dac008dbc65da0d4ce541b9f9a7a 20562 evince_3.30.1-1_source.buildinfo
Checksums-Sha256:
 f4165fb5897f09500590dc3f6cf0cb407a13e230407060cb149b3a61d67b6737 3069 
evince_3.30.1-1.dsc
 abc5516848e743bd79645e9693250974ffd5235617dd746c83b67c4c671ac0b7 2270352 
evince_3.30.1.orig.tar.xz
 69b8fd0de19aa3402a0fb67044ca25eec6620d5170ed599df13f258ff70a43b2 29576 
evince_3.30.1-1.debian.tar.xz
 c37a69c2e4dcde9b9eb9eed1d0c7c353cd8ed156722eed2a981c7b3df578ae5f 20562 
evince_3.30.1-1_source.buildinfo
Files:
 0bdea977b6d5dfe0c8763872ffc38377 3069 gnome optional evince_3.30.1-1.dsc
 5977e03a7b238aeddae8e07586bd2c77 2270352 gnome optional 
evince_3.30.1.orig.tar.xz
 d93eebe133292c423a67cd9aa23acdee 29576 gnome optional 
evince_3.30.1-1.debian.tar.xz
 f0cce06cec2a0363d341138b5ad1f3b8 20562 gnome optional 
evince_3.30.1-1_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEETQvhLw5HdtiqzpaW5mx3Wuv+bH0FAlu62p4ACgkQ5mx3Wuv+
bH2W2hAAvQOxKtd1dmdPLI1qZshcni7qUkTGD64UaEqyCDIUMutzpH5WgEg4ySly
4VTVzVDxwQHxGBC9vHxB5vdb8koZmt/9VwHtOe7BVFc0Lg3OnQCl3lqB2H5DBYP9
SK9SMWLSpzfAvNwICp1cHz21FXM985QhAPMzM3GEUQ9mD/6utDcw4CaE+sryU562
W1ZXJdRDh8AnugLWTblqjeFpVW3biIJNNx/01CCdnw+vi9LQKqNH46ygHEVrWflO
Nf98Ma2QUbEpvLzV4Q4Hv7Dluy0ovyHbZUXX2BNf8Z4aAxHPrJBlgkeEI/n6QeEA
2tHxIxhehCwkas0EgHgGc8kYCoGef3TF/xzHx2MTv9dHFMSdfoYe6gE/TN2CGBn4
O3LJaZ0PzB3ZD9PnllqzyJ4dT46fLRr7TsmnGq79dfDLRBAf0phVwXvQKtGnqzZp
ir2BJuouE57EENkH/A711dHD5MUK5AfU/dyK1I0uOQOgev/xE/EH2mZq+ItP9gp4
0qOuaduH5pKIrjBlc8QXbCOJi9fRPgggnB5KLnkOPbWtgz61r+OzTSM5qOx+/Bo6
KL5P/ZWcMQvQG8ywZwK8AeAhX7lxoZsIIvNbwb74Qd/L2MnP0HT5VkFSZjRNE8Ey
LZWhz5f+4QpSIwUNTGhzLOwA7SJlkcLclbUA4Mp1POmlcS6aJd0=
=pdjw
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to