dovecot/apparmor: profile not found
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | AppArmor |
Undecided
|
Unassigned | ||
| | apparmor (Ubuntu) |
Undecided
|
Unassigned | ||
| | Trusty |
High
|
Unassigned | ||
Bug Description
[impact]
This bug prevents dovecot users from using the apparmor policies shipped
in the apparmor-profiles package without significant modifications.
[steps to reproduce]
1) install and setup dovecot and confirm that it's functioning as
expected
2) install the apparmor-profiles package
3) restart dovecot to ensure apparmor policies are being applied
4) if this bug has been addressed, dovecot should start successfully
without generating apparmor rejections
[regression potential]
The change in the patch for this bug updates the dovecot policy to
match the most recent apparmor release (2.9.2). These add missing
policies, restructure a few things to common abstractions, and grant
additional permissions. Any regressions related to this patch would
be strictly limited to the policy for dovecot.
[original description]
I'm on Ubuntu 14.04 LTS. Since last week I get these messages:
[11468.257576] type=1400 audit(139565912
[11491.128691] type=1400 audit(139565914
[11551.171186] type=1400 audit(139565921
[11551.171338] type=1400 audit(139565921
When I then start dovecot I get these in mail.log:
Mar 24 08:42:52 polly dovecot: master: Dovecot v2.2.9 starting up (core dumps disabled)
Mar 24 08:42:52 polly dovecot: master: Fatal: execv(/
Mar 24 08:42:52 polly dovecot: master: Error: service(anvil): command startup failed, throttling for 2 secs
Mar 24 08:42:52 polly dovecot: master: Error: service(log): child 1387 returned error 84 (exec() failed)
Mar 24 08:42:52 polly dovecot: master: Error: service(log): command startup failed, throttling for 2 secs
Mar 24 08:42:52 polly dovecot: master: Error: service(
Mar 24 08:55:42 polly dovecot: master: Error: service(config): command startup failed, throttling for 2 secs
Mar 24 08:55:42 polly dovecot: master: Error: service(
I tried to purge and reinstall apparmor(-profiles) but that didn't fix this issue. I did a aa-disable dovecot and now the errors are gone.
| Tom Boucher (trekkie-b) wrote : | #1 |
| tags: | added: aa-policy |
| affects: | apparmor-profiles → apparmor |
| Christian Boltz (cboltz) wrote : | #2 |
Some of those issues were already fixed in the upstream profiles. For the remaining issues, I just sent patches to the mailinglist for review.
| Steve Beattie (sbeattie) wrote : | #3 |
This will be fixed in wily with apparmor 2.9.2-0ubuntu1. Attached is patch to update the dovecot profiles for a trusty SRU.
| description: | updated |
The attachment "profiles-
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]
| tags: | added: patch |
| Launchpad Janitor (janitor) wrote : | #5 |
This bug was fixed in the package apparmor - 2.9.2-0ubuntu1
---------------
apparmor (2.9.2-0ubuntu1) wily; urgency=medium
* Update to apparmor 2.9.2
- Fix minitools to work with multiple profiles at once (LP: #1378095)
- Parse mounts that have non-ascii UTF-8 chars (LP: #1310598)
- Update dovecot profiles (LP: #1296667)
- Allow ubuntu-helpers to build texlive fonts (LP: #1010909)
* dropped patches incorporated upstream:
add-
parser-
tests-
GDM_
debian/
* Partial merge with debian apparmor package:
- debian/rules: enable the bindnow hardening flag during build.
- debian/
signing key
- debian/watch: fix watch file, add gpg signature checking
- install libapparmor.so dev symlink under /usr not /lib
- debian/
reproducible even in face of timezone variations.
- debian/control: sync fields
- debian/
/
- debian/
/
- debian/
symbols file.
- debian/copyright: sync
-- Steve Beattie <email address hidden> Mon, 11 May 2015 22:03:04 -0700
| Changed in apparmor (Ubuntu): | |
| status: | New → Fix Released |
| Steve Beattie (sbeattie) wrote : | #6 |
Unfortunately, while preparing the fix for this, I did not take into account that the debian/
However, failing to install the additional dovecot profiles does not cause any regressions, it just causes this bug to not be fixed by the version of apparmor in trusty-proposed. Given that apparmor 2.8.95~
| tags: | added: verification-failed |
| Tyler Hicks (tyhicks) wrote : | #7 |
I agree with Steve that this SRU should proceed despite the verification for this bug failing. As Steve mentioned, there are no new regressions caused by this failed verification. The bug is simply not fixed yet.
This SRU addresses a large number of other issues that are greatly impacting 14.04 users and it would be unfortunate if they had to wait longer for the fixes provided by this SRU.
| Adam Conrad (adconrad) wrote : Update Released | #8 |
The verification of the Stable Release Update for apparmor has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.
| Changed in apparmor (Ubuntu Trusty): | |
| status: | New → In Progress |
| importance: | Undecided → High |
| Chris J Arges (arges) wrote : | #9 |
Please verify apparmor_
| tags: |
added: verification-needed removed: verification-failed |
| Steve Beattie (sbeattie) wrote : | #10 |
The dovecot profiles were addressed in apparmor 2.9.2 or earlier, closing that portion of this bug.
| Changed in apparmor: | |
| status: | New → Fix Released |
| Mathew Hodson (mathew-hodson) wrote : | #11 |
I ran dovecot-core 1:2.2.9-1ubuntu2.1 with apparmor-profiles 2.8.95~
$ sudo aa-status
apparmor module is loaded.
49 profiles are loaded.
16 profiles are in enforce mode.
/sbin/dhclient
/usr/bin/evince
/usr/
/usr/
/usr/
/usr/
/usr/
/usr/
/usr/
/usr/
/usr/
/usr/
/usr/
/usr/
/usr/
/usr/
33 profiles are in complain mode.
/sbin/klogd
/sbin/syslog-ng
/sbin/syslogd
/usr/
/usr/
/usr/
/usr/
/usr/
/usr/
/usr/
/usr/
/usr/
/usr/
/usr/
/usr/
/usr/
/usr/
/usr/
/usr/
/usr/
/usr/
/usr/
/usr/
/usr/
/usr/
/usr/
/usr/sbin/identd
/usr/sbin/mdnsd
/usr/sbin/nmbd
/usr/sbin/nscd
/usr/sbin/smbd
/usr/
/{usr/,}bin/ping
9 processes have profiles defined.
2 processes are in enforce mode.
/sbin/dhclient (30347)
/usr/
7 processes are in complain mode.
/usr/
/usr/
/usr/
/usr/
/usr/
/usr/
/usr/
0 processes are unconfined but have a profile defined.
| Changed in apparmor (Ubuntu Trusty): | |
| status: | In Progress → Fix Committed |
| tags: |
added: verification-done removed: verification-needed |
| Launchpad Janitor (janitor) wrote : | #12 |
This bug was fixed in the package apparmor - 2.8.95~
---------------
apparmor (2.8.95~
* debian/
(LP: #1296667)
-- Steve Beattie <email address hidden> Fri, 12 Jun 2015 23:21:58 -0700
| Changed in apparmor (Ubuntu Trusty): | |
| status: | Fix Committed → Fix Released |


I am experiencing this as well on my 14.04 LTS installation.
Jun 8 22:10:30 ip-10-147-235-73 kernel: [7770896.524945] type=1400 audit(140226543 0.441:10760) : apparmor="ALLOWED" operation="connect" profile= "/usr/lib/ dovecot/ imap-login" name="/ run/dovecot/ anvil" pid=16455 comm="imap-login" requested_mask="rw" denied_mask="rw" fsuid=0 ouid=0 0.549:10761) : apparmor="ALLOWED" operation="connect" profile= "/usr/lib/ dovecot/ imap" name="/ run/dovecot/ config" pid=16456 comm="imap" requested_mask="rw" denied_mask="rw" fsuid=0 ouid=0 0.549:10762) : apparmor="ALLOWED" operation="connect" profile= "/usr/lib/ dovecot/ imap" name="/ run/dovecot/ auth-master" pid=16456 comm="imap" requested_mask="rw" denied_mask="rw" fsuid=0 ouid=0
Jun 8 22:10:30 ip-10-147-235-73 kernel: [7770896.635272] type=1400 audit(140226543
Jun 8 22:10:30 ip-10-147-235-73 kernel: [7770896.635983] type=1400 audit(140226543
I have my imap services in 'complain' mode though, so they are not being halted. services continue to run.