Commit graph

356 commits

Author SHA1 Message Date
Christian Boltz
8029059d73 Add missing permissions to the nscd profile.
Also deny capability block_suspend because nobody can imagine why it 
would be needed.

References: https://bugzilla.novell.com/show_bug.cgi?id=807104

Acked-by: Seth Arnold <seth.arnold@canonical.com>

(backport of trunk r2109)
2013-03-05 22:12:37 +01:00
Christian Boltz
05251eef06 abstractions/mysql: changed paths and MariaDB support
abstractions/mysql  contains
   /var/lib/mysql/mysql.sock rw,
   /usr/share/mysql/charsets/ r,
   /usr/share/mysql/charsets/*.xml r,

but the files moved (at least on openSUSE) to
    /usr/share/mysql-community-server/charsets/*.xml
    /var/run/mysql/mysql.sock
This causes denials for all applications using MySQL on 12.2 and 
Factory.

MariaDB has the *.xml files in
    /usr/share/mariadb/charsets/*.xml
and also seems to use /var/run/mysql/ for the socket.

Since MariaDB is basically a drop-in replacement for MySQL, it makes
sense to allow access to it via abstractions/mysql.

References: https://bugzilla.novell.com/show_bug.cgi?id=798183

Acked-by: Seth Arnold <seth.arnold@canonical.com>
2013-01-13 14:41:56 +01:00
Steve Beattie
e7e6aa9ed2 Subject: profiles - adjust pulseaudio in abstraction
Merge from trunk commit 2102

Original message:
  I was testing out a profile for pulseaudio and hit an issue where my
  pulseaudio process was getting the firefox profile applied to it. This
  is because in abstractions/ubuntu-browsers.d/multimedia the rule for
  pulseaudio is /usr/bin/pulseaudio ixr; attached is a patch to change it
  to Pixr, so as to use a global pulseaudio policy if it exists.

Signed-off-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2013-01-09 15:15:59 -08:00
Steve Beattie
701537325e Subject: dnsmasq network-manager integration
Merge from trunk commit 2096

Original message:
  Subject: profiles - dnsmasq: allow writes to
   /{,var/}run/sendsigs.omit.d/*dnsmasq.pid for network manager
   integration
  
  Author: Jamie Strandboge <jamie@canonical.com>
  Description: allow writes to /{,var/}run/sendsigs.omit.d/*dnsmasq.pid
   for network manager integration
  Bug-Ubuntu: https://launchpad.net/bugs/941808
  
  Acked-by: Steve Beattie <sbeattie@ubuntu.com>

Nominated-by: Christian Boltz <apparmor@cboltz.de>
Acked-by: Steve Beattie <sbeattie@ubuntu.com>
2013-01-04 09:46:39 -08:00
Steve Beattie
dca6359ad5 Subject: add XCompose to abstractions/X
Merge from trunk commit 2093

Original message:
  Subject: profiles - add user's XCompose file to X abstraction
  
  In testing the skype profile, I found access to my @{HOME}/.XCompose
  was being rejected. This patch updates the X abstraction to take a
  user's defined XCompose key shortcuts into account.
  
  Signed-off-by: Steve Beattie <sbeattie@ubuntu.com>
  Acked-By: Jamie Strandboge <jamie@canonical.com>

Nominated-by: Christian Boltz <apparmor@cboltz.de>
Acked-by: Steve Beattie <sbeattie@ubuntu.com>
2013-01-04 09:45:19 -08:00
Steve Beattie
6e02694f6f Subject: update skype profile
Merge from trunk commit 2092 (w/ dropping the last modified timestamp
entirely)

Original message:
  Subject: profiles - update skype profile
  
  Author: Jamie Strandboge <jamie@canonical.com>
  Bug-Ubuntu: https://launchpad.net/bugs/933440 Forwarded: yes
  
  This is a very slightly updated version of the skype profile
  update that Jamie Strandboge submitted, but did not get a review.
  The only addition over the previously submitted version is rw access
  to @{HOME}/.config/Skype/Skype.conf.
  
  (This commit incorporates the additional @{HOME}/.kde4 change proposed
  by Christian Boltz <apparmor@cboltz.de>)
  
  Signed-off-by: Steve Beattie <sbeattie@ubuntu.com>
  Acked-By: Jamie Strandboge <jamie@canonical.com>

Nominated-by: Christian Boltz <apparmor@cboltz.de>
Acked-by: Steve Beattie <sbeattie@ubuntu.com>
2013-01-04 09:38:29 -08:00
Steve Beattie
fc6889ae8e Subject: nvidia abstractions cleanups
Merge from trunk commit 2090

Original message:
  Subject: profiles - nvidia abstraction cleanups
  
  This patch modifies the nvidia abstraction to add the livdpau wrapper
  config file for nvidia workarounds. It also converts the /proc/
  rules to use the @{PROC} tunable. And finally, it converts the
  ubuntu-browsers.d/multimedia abstraction to use the nvidia abstraction.
  
  Signed-off-by: Steve Beattie <sbeattie@ubuntu.com>
  Acked-By: Jamie Strandboge <jamie@canonical.com>

Nominated-by: Christian Boltz <apparmor@cboltz.de>
Acked-by: Steve Beattie <sbeattie@ubuntu.com>
2013-01-04 09:34:43 -08:00
Steve Beattie
ae12cc8e42 Subject: update mailing list address in extras README
Merge mailing list update from profiles/apparmor/profiles/extras/README
in trunk commit 2069.

Nominated-by: Christian Boltz <apparmor@cboltz.de>
Acked-by: Steve Beattie <sbeattie@ubuntu.com>
2013-01-03 16:43:41 -08:00
Steve Beattie
590a39e194 Subject: update gnome abstraction to allow reading
/usr/share/poppler/cMap/**

Merge from trunk commit 2065.1.3

Original message:
  Gnome applications are now quite interested in reading
  /usr/share/poppler/cMap/**. These files are included in the poppler-data
  package on Ubuntu, and their 'r' denials create quite a bit of noise.
  Apparently they are needed to display PDF documents containing CJK
  characters with libpoppler. I added it to the gnome abstraction because
  several applications not linked against poppler are consulting this
  data.
  
  Acked-By: Jamie Strandboge <jamie@canonical.com>
  Acked-By: Steve Beattie <sbeattie@ubuntu.com>

Nominated-by: Christian Boltz <apparmor@cboltz.de>
Acked-by: Steve Beattie <sbeattie@ubuntu.com>
2013-01-03 16:34:57 -08:00
Steve Beattie
0da19a9474 Subject: update fonts abstraction for new fontconfig paths
Merge from trunk commit 2065.1.1.

Original message:
  update fonts abstraction for new fontconfig paths
  
  Acked-By: Jamie Strandboge <jamie@canonical.com>
  Acked-By: Steve Beattie <sbeattie@ubuntu.com>

Nominated-by: Christian Boltz <apparmor@cboltz.de>
Acked-by: Steve Beattie <sbeattie@ubuntu.com>
2013-01-03 16:27:15 -08:00
Steve Beattie
4fdb2dd24e Merge from trunk commit 2062:
Original message:
  /bin/ping moved to /usr/bin/ping on openSUSE (usrMerge)
  Update the profile to make sure it's still used.

  Acked-by: John Johansen <john.johansen@canonical.com>

Nominated-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2013-01-03 15:55:57 -08:00
Steve Beattie
6e0996981b Merge from trunk commit 2059:
Original message:
  Author: Mark Ramsell <mramsell@qazonline.net>
  Description: ubuntu-integration does not work properly with exo-open
  Bug-Ubuntu: https://launchpad.net/bugs/987578

  Acked-By: Jamie Strandboge <jamie@canonical.com>

Nominated-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2013-01-03 15:54:16 -08:00
Steve Beattie
8e33b4a173 Merge from trunk commit 2058:
Original message:
  Description: let sanitized-helper also allow access to /usr/local.
    Patch based on work by Reuben Thomas
  Bug-Ubuntu: https://launchpad.net/bugs/1013887

  Acked-By: Jamie Strandboge <jamie@canonical.com>

Nominated-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2013-01-03 15:44:14 -08:00
Steve Beattie
3e18698c78 Merge from trunk commit 2057:
Original message:
  Description: update ubuntu-browsers.d/java for IcedTea 7
  Bug-Ubuntu: https://launchpad.net/bugs/1003856

  Acked-By: Jamie Strandboge <jamie@canonical.com>

Nominated-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2013-01-03 15:37:41 -08:00
Christian Boltz
b0a05c5b3d ls moved from /bin/ to /usr/bin/ on openSUSE (usrMove)
Acked-by: John Johansen <john.johansen@canonical.com>
2012-08-06 13:57:22 +02:00
Jamie Strandboge
64a8698a5f Adjust path for thunderbird to include non-versioned path
Bug-Ubuntu: https://launchpad.net/bugs/990931

Acked-By: Jamie Strandboge <jamie@canonical.com>
2012-05-18 15:30:22 -05:00
Jamie Strandboge
279b5945cb Allow Google Chrome and chromium-browser to work under sanitized helper. While
the chromium and chrome sandboxes are setuid root, they only link in limited
libraries so glibc's secure execution should be enough to not require the
santized_helper (ie, LD_PRELOAD will only use standard system paths (man
ld.so)). Also allow some paths in /opt for Chrome.

Ubuntu-Bug: https://launchpad.net/bugs/964510

Acked-By: Jamie Strandboge <jamie@canonical.com>
2012-05-02 07:44:55 -05:00
Jamie Strandboge
d2bcf440e8 Allow software center to work again from browsers. It was blocked by
sanitized_helper. For now this only allows software-center scripts in
/usr/share, but we may need to increase what is allowed in /usr/share if more
things are denied when they shouldn't be.

Ubuntu-Bug: https://launchpad.net/bugs/972367

Acked-By: Jamie Strandboge <jamie@canonical.com>
2012-05-02 07:43:30 -05:00
Kees Cook
67ce4c3bd9 Include IceWeasel in ubuntu-browsers abstraction.
Author: Intrigeri <intrigeri@debian.org>
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=661176

Signed-off-by: Kees Cook <kees@ubuntu.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
Acked-By: Jamie Strandboge <jamie@canonical.com>
2012-04-25 12:13:15 -07:00
Kees Cook
dd91c7791b Updates the X abstraction to include gdm3 path.
Author: Intrigeri <intrigeri@debian.org>
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=660079

Signed-off-by: Kees Cook <kees@ubuntu.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-04-25 11:36:51 -07:00
Christian Boltz
ebe8803e80 If tftp server for dnsmasq is configured it won't serve the boot
file. This patch adds read permissions for /srv/tftpboot/

References: https://bugzilla.novell.com/show_bug.cgi?id=738905

Somehow ;-) [1] Acked-By: John Johansen

[1] see mailinglist for details ;-)
2012-04-16 23:10:43 +02:00
Christian Boltz
f67168cf2d the usr.lib.dovecot.imap-login profile should allow inet6 in addition to inet
References: https://bugzilla.novell.com/show_bug.cgi?id=755923 

Acked-By: Jamie Strandboge <jamie@canonical.com>
2012-04-05 23:51:17 +02:00
Jamie Strandboge
b47197b881 allow read access to ~/.drirc
Bug-Ubuntu: https://launchpad.net/bugs/941506

Acked-By: Jamie Strandboge <jamie@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-03-02 15:09:21 -06:00
Jamie Strandboge
3e5ae57164 Description: allow read access to /usr/share/texmf/fonts
Bug-Ubuntu: https://launchpad.net/bugs/941503

Acked-By: Jamie Strandboge <jamie@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-03-02 15:08:03 -06:00
Jamie Strandboge
a0048ec064 ubuntu-browsers.d/java: update to fix LP: #945019 2012-03-02 13:03:04 -06:00
Jamie Strandboge
c35e10f875 fix path to java in ubuntu-browsers.d/java
Bug-Ubuntu: https://launchpad.net/bugs/943161

Acked-By: Jamie Strandboge <jamie@canonical.com>
2012-03-02 11:18:11 -06:00
Jamie Strandboge
46d9aae952 include /etc/drirc in the X abstraction
Bug-Ubuntu: https://launchpad.net/bugs/918879

Acked-By: Jamie Strandboge <jamie@canonical.com>
Signed-off-by: Kees Cook <kees@ubuntu.com>
2012-02-28 12:50:20 -06:00
Christian Boltz
e074def743 Add the missing k permission for /etc/.pwd.lock to the userdel profile.
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-02-13 10:50:37 +01:00
Jamie Strandboge
13e959f8c0 Author: Jamie Strandboge <jamie@canonical.com>
Description: glibc's __get_nprocs() now checks /sys/devices/system/cpu/online
 in addition to /proc/stat for the number of processors. This is used in the
 _SC_NPROCESSORS_ONLN implementation, a part of sysconf. This was introduced in
 upstream glibc commit:
 84e2a551a7
Bug-Ubuntu: https://launchpad.net/bugs/929531

Acked-By: Jamie Strandboge <jamie@canonical.com>
Acked-By: Christian Boltz <apparmor@cboltz.de>
2012-02-09 21:06:24 -06:00
Jamie Strandboge
5151168071 abstractions/ubuntu-helpers: use Pixr instead of Pix in case we have an
interpreted file
2012-01-24 09:00:32 -06:00
Christian Boltz
77f37e84eb Update abstractios for KDE4
(At least) openSUSE uses ~/.kde4 to store KDE4 settings.
This patch changes ~/.kde/ to ~/.kde{,4} in all abstractions.

The patch is mostly from Velery Valery, I only fixed a merge conflict 
and added the kmail{,2} part in private-files-strict.

References: https://bugzilla.novell.com/show_bug.cgi?id=741592

Acked-By: Steve Beattie <sbeattie@ubuntu.com> for both trunk and 2.7.
2012-01-19 15:20:28 +01:00
Jamie Strandboge
8e3b75c40a update p11-kit to allow mmap of libraries in pkcs directories
Acked-by: Jamie Strandboge <jamie@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-01-18 16:22:08 -06:00
Jamie Strandboge
4037c3ae65 Adjust dnsmasq profile for read access to /{,var/}run/nm-dns-dnsmasq.conf
which is needed by NetworkManager integration in Ubuntu. (LP: #917628)

Acked-by: Jamie Strandboge <jamie@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-01-18 16:20:43 -06:00
Steve Beattie
c817e01774 Bug: https://bugs.launchpad.net/bugs/917859
A bug in Ubuntu reported that the aspell abstraction does
not allow write access to the user customizable dictionaries, the
personal dictionary (~/.aspell.$LANG.pws) and the personal replacement
dictionary (~/.aspell.$LANG.prepl). It also adjusts the abstraction
to add the owner modifier to the personal dictionaries.

Signed-off-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: John Johansen <john.johansen@canonical.com>

Bug: https://launchpad.net/bugs/917859
2012-01-18 10:15:57 -08:00
Jamie Strandboge
8d1e8c9c2e ubuntu-browsers.d/plugins-common: include the ubuntu-helpers profile here as
it is needed by pretty much all of the browser abstractions. aa-update-browser
unconditionally adds the plugins-common abstraction, so this should be
sufficient.
2012-01-17 08:22:11 -06:00
Jamie Strandboge
b0ad1303ac update ubuntu-integration abstraction for multiarch with gst-plugin-scanner
(LP: #917641)

Acked-by: Jamie Strandboge <jamie@canonical.com>
2012-01-17 08:00:56 -06:00
Jamie Strandboge
e4e173233c update ubuntu-browsers.d/text-editors to work with emacs2[2-9] 2012-01-17 07:10:33 -06:00
Jamie Strandboge
dd1756ba9e profiles/apparmor.d/abstractions/ubuntu-helpers: add inet6 too 2012-01-13 11:19:55 +01:00
Jamie Strandboge
39a3f5b08d Add profiles/apparmor.d/abstractions/ubuntu-helpers:
Lenient profile that is intended to be used when 'Ux' is desired but
does not provide enough environment sanitizing. This effectively is an
open profile that blacklists certain known dangerous files and also
does not allow any capabilities. For example, it will not allow 'm' on files
owned be the user invoking the program. While this provides some additional
protection, please use with care as applications running under this profile
are effectively running without any AppArmor protection. Use this profile
only if the process absolutely must be run (effectively) unconfined.

Limitations:
1. This does not work for root owned processes, because of the way we use
   owner matching in the sanitized helper. We could do a better job with
   this to support root, but it would make the policy harder to understand
   and going unconfined as root is not desirable anyway.

2. For this sanitized_helper to work, the program running in the sanitized
   environment must open symlinks directly in order for AppArmor to mediate
   it. This is confirmed to work with:
    - compiled code which can load shared libraries
    - python imports
   It is known not to work with:
    - perl includes

3. Going forward it might be useful to try sanitizing ruby and java

Use at your own risk. This profile was developed as an interim workaround for
LP: #851986 until AppArmor implements proper environment filtering.

Acked-by: Jamie Strandboge <jamie@canonical.com>



Adjust ubuntu abstractions to use sanitized_helper instead of (P)Ux.

Acked-by: Jamie Strandboge <jamie@canonical.com>



Update launchpad-integration to use a sanitized helper in a similar manner
as that in ubuntu-helpers.

Acked-by: Jamie Strandboge <jamie@canonical.com>
2012-01-11 15:20:42 +01:00
Jamie Strandboge
7eee94290b add xdg-desktop abstraction to gnome and kde. Acked via discussions 2012-01-11 14:17:32 +01:00
Jamie Strandboge
45e7265c82 Create an xdg-desktop abstraction based on the upstream documentation for
creating owner writes on things like ~/.cache and ~/.config

Acked-by: Jamie Strandboge <jamie@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-01-11 13:00:34 +01:00
Jamie Strandboge
3c2684b674 merge from trunk 2012-01-11 09:48:22 +01:00
Jamie Strandboge
b1a8e7cf44 fix up comments in launchpad-integration 2012-01-11 09:27:22 +01:00
Jamie Strandboge
7887d5906d don't #include ubuntu-helpers in the abstractions. This can only be included
once in policy, otherwise you will get an error regarding multiple definitions
for sanitized_helper
2012-01-11 09:00:35 +01:00
Jamie Strandboge
b0ef4d2b6a add note to ubuntu-helpers regarding needing to only include it once 2012-01-11 08:50:47 +01:00
Jamie Strandboge
c626e62da6 fix missing '}' in ubuntu-helpers 2012-01-11 08:48:07 +01:00
Jamie Strandboge
b93c49974c update ubuntu-browsers to also Cx the firefox.sh in /usr/lib 2012-01-11 00:59:38 +01:00
Jamie Strandboge
d045d609be update launchpad-integration to use a sanitized helper 2012-01-10 20:54:57 +01:00
Jamie Strandboge
333cd41d33 update ubuntu abstractions to use the sanitized helper 2012-01-10 20:54:38 +01:00
Jamie Strandboge
2526933747 ubuntu-helpers: account for lib32 and lib64 2012-01-10 19:57:58 +01:00