AppArmor missing file_lock for logger_lockfile
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| isc-kea (Ubuntu) |
Fix Released
|
Undecided
|
Jonas Jelten | ||
| Noble |
Fix Released
|
Undecided
|
Jonas Jelten | ||
| Plucky |
Fix Released
|
Undecided
|
Jonas Jelten | ||
Bug Description
[ Impact ]
* Apparmor denies access to lock the file /run/lock/
which is used by kea internally for its logging system.
* Since this is intended, allowing the "k" mask resolves the problem
[ Test Plan ]
* install kea-dhcp4-server
* execute the lease file cleanup service:
sudo -u _kea KEA_LOCKFILE_
* observe errors:
* dmesg:
[ 3515.694149] audit: type=1400 audit(175708132
* kea-lfc stdout:
2025-09-05 16:08:46.247 ERROR [DhcpLFC/
2025-09-05 16:08:46.247 INFO [DhcpLFC/
* when fixed, observe no dmesg output and kea-lfc log is clean:
2025-09-05 16:09:17.756 INFO [DhcpLFC/
[ Where problems could occur ]
* Since this is a just new permission allowed, regression potential is low.
* Otherwise, there could be issues due to the update rollout/service restart.
[ Other Info ]
* Fixed in debian through https:/
* in a fresh noble installation, running standalone kea-lfc accesses /var/run/
* but kea-dhcp4-
[ Original report ]
Hi,
Seeing:
| [Sat Aug 23 21:53:19 2025] audit: type=1400 audit(175598593
| [Sat Aug 23 21:53:19 2025] audit: type=1400 audit(175598593
| [Sat Aug 23 21:53:26 2025] audit: type=1400 audit(175598594
| [Sat Aug 23 21:53:26 2025] audit: type=1400 audit(175598594
The AppArmor profile allows `file_lock` to `/run/kea/
```
diff --git a/apparmor.
index ae165fa..11f6a92 100644
--- a/apparmor.
+++ b/apparmor.
@@ -11,7 +11,7 @@ profile kea-lfc /usr/sbin/kea-lfc {
/usr/
owner /run/kea/
- owner /run/lock/
+ owner /run/lock/
# Control sockets
# Before LP: #1863100, these were in /tmp. For compatibility, let's keep both
```
Related branches
- git-ubuntu bot: Approve
- Athos Ribeiro (community): Approve
- Canonical Server Reporter: Pending requested
-
Diff: 41 lines (+9/-2)3 files modifieddebian/changelog (+6/-0)
debian/control (+2/-1)
debian/usr.sbin.kea-lfc (+1/-1)
- git-ubuntu bot: Approve
- Athos Ribeiro (community): Approve
- Canonical Server Reporter: Pending requested
-
Diff: 27 lines (+7/-1)2 files modifieddebian/changelog (+6/-0)
debian/usr.sbin.kea-lfc (+1/-1)
- Andreas Hasenack: Disapprove
- Canonical Server Reporter: Pending requested
-
Diff: 41 lines (+9/-2)3 files modifieddebian/changelog (+6/-0)
debian/control (+2/-1)
debian/usr.sbin.kea-lfc (+1/-1)
| tags: | added: server-todo |
| Changed in isc-kea (Ubuntu): | |
| status: | New → Triaged |
| Changed in isc-kea (Ubuntu Noble): | |
| status: | New → Triaged |
| Changed in isc-kea (Ubuntu Plucky): | |
| status: | New → Triaged |
| Changed in isc-kea (Ubuntu): | |
| status: | Triaged → In Progress |
| assignee: | nobody → Jonas Jelten (jj) |
| Changed in isc-kea (Ubuntu Noble): | |
| assignee: | nobody → Jonas Jelten (jj) |
| Changed in isc-kea (Ubuntu Plucky): | |
| assignee: | nobody → Jonas Jelten (jj) |
| Changed in isc-kea (Ubuntu Plucky): | |
| status: | Triaged → Fix Committed |
| Changed in isc-kea (Ubuntu Plucky): | |
| status: | Fix Committed → Triaged |
| Changed in isc-kea (Ubuntu Plucky): | |
| status: | Triaged → In Progress |
| Changed in isc-kea (Ubuntu Noble): | |
| status: | Triaged → In Progress |
| description: | updated |
| description: | updated |

@hloeung we fixed this in debian, but to backport it to noble would you kindly add information to the [test plan] above, i.e. what you can do to verify the bug is gone?
Then once we placed the package to proposed, you could use this test to confirm we have indeed fixed the bug now.