Clock set to past confuses AppArmor cache validation
Bug #1385382 reported by
Ondrej Kubik
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
AppArmor |
Won't Fix
|
Undecided
|
Unassigned | ||
ubuntu-touch-customization-hooks (Ubuntu) |
Triaged
|
Undecided
|
Unassigned |
Bug Description
During initial boot sometimes clock could be set to past, which will confuse logic validating precompiled AppArmour cache, causing cache recreation.
If time is not set correct(valid) value, even consequent boots will fail to validate cache, forcing cache recreation.
This bug affects Initial out of the box experience, since device clock is set in the factory to default value, for example 0:0am 1st of January 2014
Changed in apparmor: | |
assignee: | nobody → Jamie Strandboge (jdstrand) |
Changed in ubuntu-touch-customization-hooks (Ubuntu): | |
status: | New → Triaged |
Changed in apparmor: | |
assignee: | Jamie Strandboge (jdstrand) → nobody |
summary: |
- Clock set to past confuses AppArmour cache validation + Clock set to past confuses AppArmor cache validation |
To post a comment you must log in.
I've thought about this quite a bit and I don't think there is anything we can do in AppArmor for this. The profiles simply need to have an mtime that is earlier than the cache files. Trying to hack around it in scripts trying to guess the state of the system relative to the clock would be brittle. However, adjusting the mtime in the files in /var/lib/ apparmor/ profiles/ *, /etc/apparmor.d/* and /etc/apparmor. d/abstractions/ * to be earlier than before the mtime of the cache files would work. This works with device resets and works when the clock is moved forward.