BIND ignores nanoseconds field in timestamps, fails to load newer versions of zones on reload
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
BIND |
Fix Released
|
Undecided
|
Unassigned | ||
MAAS |
Fix Released
|
Undecided
|
Unassigned | ||
1.9 |
Fix Committed
|
High
|
Unassigned | ||
bind9 (Ubuntu) |
Fix Released
|
High
|
LaMont Jones | ||
Trusty |
Fix Released
|
Undecided
|
LaMont Jones | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Since 2.6, linux has supported nanosecond granular time in stat(2) returns. BIND has a comment in the code that it might use it, but continues to ignore it.
As of 9.9.3b2, named checks the time of (at least) zone files on disk (expanding to include include files in 9.10.0a2). Because the check is only done to a granularity of seconds, changing the zone file twice in the same second can cause BIND to decide that it need not reload the zone, even though it is out of date.
[Impact]
* If a zone file is changed (generally by automated processes) more than once in a second, bind9 happily thinks it has already loaded the zone. A trivial demonstration of the bug can be seen at paste.ubuntu.
* MAAS is exactly the sort of use case that hits this bug.
* The upload changes BIND's utility function to actual use the st_mtim.tv_nsec instead of '0'.
[Test Case]
* See the pastebin above. (Change a zone file and reload it, and then do it again less than a second later.)
[Regression Potential]
* Ignoring the whole "rebuilds sometimes break things", the most likely regression would be one where something was either relying on BIND not reloading the dozone (unlikely), or otherwise relying on the modify time on a zone file to some arbitrary value.
[Other Info]
This bug was fixed in 1:9.10.3.dfsg.P2-5, which landed in xenial March 2016.
Related branches
- Andres Rodriguez (community): Approve
-
Diff: 28 lines (+9/-1)2 files modifieddebian/changelog (+8/-0)
debian/control (+1/-1)
- Mike Pontillo (community): Approve
-
Diff: 210 lines (+32/-116)2 files modifiedsrc/provisioningserver/utils/fs.py (+16/-62)
src/provisioningserver/utils/tests/test_fs.py (+16/-54)
- Mike Pontillo (community): Approve
-
Diff: 11 lines (+1/-0)1 file modifieddebian/control (+1/-0)
tags: | added: patch |
Changed in maas: | |
status: | Fix Committed → Fix Released |
description: | updated |
description: | updated |
Changed in bind9 (Ubuntu Xenial): | |
status: | New → Fix Released |
Fixed in 1:9.10.3.dfsg.P2-5