AUDIT_USER_AVC messages are not printk'ed when auditd is not running
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux-flo (Ubuntu) |
Fix Released
|
Medium
|
Tyler Hicks | ||
Vivid |
Fix Released
|
Undecided
|
Unassigned | ||
linux-goldfish (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Vivid |
Fix Released
|
Undecided
|
Unassigned | ||
linux-mako (Ubuntu) |
Fix Released
|
Medium
|
Tyler Hicks | ||
Vivid |
Fix Released
|
Undecided
|
Unassigned | ||
linux-manta (Ubuntu) |
Fix Released
|
Medium
|
Tyler Hicks | ||
Vivid |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The auditd daemon is not part of the default phone images. At the kernel level, the audit_enabled variable remains 0 until an auditd daemon registers itself. There is a bug in old kernels that causes AUDIT_USER_AVC messages to be ignored when audit_enabled is 0. I fixed the bug several years ago and marked the patch for the stable tree but the phone kernels (mako, at least) did not pull in the patch. The upstream commit id is:
0868a5e150bc4
What this means for our phone images is that any denial messages from the system D-Bus daemon are dropped instead of being properly routed to the syslog. This results in headaches for debugging app confinement denials.
== Verification Steps ==
# Load an AppArmor profile for testing
$ echo "profile test { file, signal, unix, }" | sudo apparmor_parser -rq
# Verify that we can talk to the system bus
$ dbus-send --print-reply --system --dest=
method return sender=
array [
string "org.freedeskto
...
# Clear the dmesg buffer
$ sudo dmesg -C
# Attempt to talk to the system bus under confinement
$ aa-exec -p test -- dbus-send --print-reply --system --dest=
Failed to open connection to "system" message bus: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender="(null)" (inactive) interface=
# We should now see an AppArmor denial in the dmesg output.
# Successful fix verification *must* show the denial from the D-Bus daemon.
$ sudo dmesg | grep DENIED
[ 187.737219] type=1107 audit(143838568
Changed in linux-goldfish (Ubuntu): | |
status: | New → Fix Released |
description: | updated |
description: | updated |
Sent to the kernel team:
https:/ /lists. ubuntu. com/archives/ kernel- team/2015- July/059707. html