dnsmasq runs unconfined due to starting before apparmor on boot
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | dnsmasq (Ubuntu) |
Critical
|
Unassigned | ||
Bug Description
Description and behavior are identical to Bug #573315. However, the solution to that bug was to make a change to /etc/apparmor.
| affects: | libvirt (Ubuntu) → dnsmasq (Ubuntu) |
| Craig (craig-st) wrote : | #1 |
| Changed in dnsmasq (Ubuntu): | |
| importance: | Undecided → Critical |
| Serge Hallyn (serge-hallyn) wrote : | #2 |
Did you install a profile yourself for dnsmasq? Could you show the result of
sudo aa-status
? By default dnsmasq ships without a profile, but since you say "it happens intermittently" I assume you do have a custom profile...
Please also show the result of:
lsb_release -r
ls -l /sbin/init
| Changed in dnsmasq (Ubuntu): | |
| status: | New → Incomplete |
| Craig (craig-st) wrote : | #3 |
The dnsmasq apparmor profile comes from package apparmor-profiles. My installed version is apparmor-profiles 2.8.95~
$> lsb_release -r
Release: 14.04
$> ls -l /sbin/init
-rwxr-xr-x 1 root root 265848 Jul 18 2014 /sbin/init
aa-status is uploaded as attachment
| Changed in dnsmasq (Ubuntu): | |
| status: | Incomplete → Triaged |
| Serge Hallyn (serge-hallyn) wrote : | #4 |
Thanks. Can you show a list of the running dnsmasqs? Which dnsmasq starts unconfined? Is it the one started by network-manager, or by a custom script, or something else?
I think adding "stopped apparmor" to the 'start on' conditions of the job which starts dnsmasq should suffice to fix the problem for you.
| Seth Arnold (seth-arnold) wrote : | #5 |
I don't think "stopped apparmor" is going to do it -- the generic apparmor profiles are loaded via a sysv-init compatibility script.
I think the job file that starts this dnsmasq instance needs to use "apparmor load" before starting the process:
http://
I hope this helps
| Craig (craig-st) wrote : | #6 |
My currently running dnsmasq (which is confined the way it should be) was started by NetworkManager:
$> ps axjf
PPID PID PGID SID TTY TPGID STAT UID TIME COMMAND
1 1873 1873 1873 ? -1 Ssl 0 0:00 NetworkManager
1873 2047 2047 1873 ? -1 S 65534 0:00 \_ /usr/sbin/dnsmasq --no-resolv --keep-


Additional info: Only happens intermittently.