“Openntpd is not vulnerable.”
article.gmane.org
article.gmane.org
And this is what I like about the OpenBSD community.
>At the time communications with the ntp team showed they had little interest in removing unused functionality from the ntp.org code, or any help with our form of source code audit.
Am I the only one who enjoys removing unused code? My favorite commits are the ones with negative net lines. This might be a liberal usage of the word "unused" though...
Deleted code is debugged code. — Jeff Sickel
And it very probably has zero memory safety bugs (pretty easy in 4,000 lines of code, as measured in a tarball I just downloaded), and privsep provides further defense at the cost of adding a lot of complication to the code... but I'm getting bored of this approach to security. For new code - I know openntpd is not new code, but I don't think this approach is popular in general yet - why not switch to Go or (when it's stable) Rust, or even JavaScript or Lua, and end up with essentially zero chance of such bugs being possible, regardless of how carefully or not the code was written, without the need for any privilege separation code? For something like NTP or SSH or most of the other daemons written in C people have sitting around, with the possible exception of high performance HTTP servers, the CPU overhead of any those languages is very unlikely to be noticeable (and privsep has overhead anyway).
(Admittedly, this would not help with non-memory-safety attacks such as NTP amplification...)
In particular, I'm going to make a bold claim: for OpenBSD to continue to release new daemons written in C, as it does, is irresponsible for a security-focused distribution. As much as they like the language - I do too -, as much as the whole expertise and design of the project is based on C, such that there is a naturally huge disincentive to switch languages, and as much as OpenBSD is able to minimize (but not eliminate) security advisories of this type, memory corruption is so dangerous that building a truly secure system requires making as much code as possible immune to the possibility of it.
(Hmm, I guess running AddressSanitizer in production would be nearly as good.)
Rust seems to be a saner alternative, but isn't production ready.
After all, the bugs you describe is only one among many possible security problems that can arise in an application. Another big problem is ignorance of abstractions (oh, you thought this was a bytestring? turns out, it's actually dependent on your run time platform..). Straight up C is a lot more clear to read in that regard.
Or they could adopt ZeroVM/NaCl, which would shift the balance towards compiled languages again.
(I don't have much experience with Go, though.)
http://alt.org/nethack/player-all.php?player=WowDeath
Full article here: http://taeb-nethack.blogspot.com/2009/03/predicting-and-cont...
That's a lot of caveats. Suppose you want to run multiple times in one second. Suppose you want statistically uniform random numbers to ensure even coverage of test cases.
Some simulations want to have the same sequence of numbers. Seems like a fundamental design misunderstanding in nethack, however.
srand(time(NULL)); does not provide that.
What you don't want is a repeatable random sequence that you, the programmer, incorrectly think is truly random. But rather a lot of invocations to srand turn out to be this case, rather than either of the legitimate two.
Fortunately, phk is already fixing ntpd. http://phk.freebsd.dk/time/index.html
http://www.pool.ntp.org/join/configuration.html
Not that openntpd isn't invited to be a part of the NTP pool(s).
On Fedora, which powers the computer I'm writing this from, Chrony is in use, not ntpd, so I guess my PC is immune from whatever is floating out there.
install_openntpd() {
install_from_source net/openntpd ### via pkgsrc
cp /usr/pkg/share/examples/rc.d/openntpd /etc/rc.d/
replace_service 'ntpd' 'openntpd' ### idempotently edits rc.conf to ensure ntpd=NO and openntpd=YES
}
The openntpd default pool.ntp.org is a sane default that also doesn't leak host OS information as do most NTPd-based default confs.The most recent version for OpenBSD is 4.6 while the "portable" one is 3.9 .
I don't see anything about openntpd on that page. Are you makign stuff up?
1. http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.sbin/ntpd/
The ntpd they mention is OpenNTPD see http://www.openbsd.org/faq/faq6.html#OpenNTPD
So, no, I am not "makign stuff up".
OpenNTPd is extremely easy to configure. The problem is that it's not the default choice while, apparently, it should be. Same goes with almost all OBSD-derivates (OpenSMTPd, OpenSSHd, OpenNTPd, etc.).
Here is the first guide at google: https://wiki.archlinux.org/index.php/OpenNTPD
Feel free to ask, if you feel that there's something exotic that needs to be done before getting OpenNTPd to work.
Well, there's a good argument to be made that your VPS provider should be running an accurate time daemon (whatever that might be), and you should just have paravirtualized access to the current time, instead of every VM being expected to run some form of ntpd on its own, and the hypervisor track scores of virtual clocks.
There's even a good argument to be made that running the NTP algorithm in a VM doesn't work: https://www.usenix.org/legacy/event/osdi10/tech/full_papers/...
The command you'll want to run is: # timedatectl set-ntp true
And it'll have you within a deep fraction of a second from a decent timeserver in about ten seconds, and keep you there indefinitely.
NOTE: For the person who downvoted this because they don't like systemd, seriously, you need to find a better hobby.
timedated isn't an improvement, it's just a new attempt at the code. In five years, you can recommend it.
For the moment, let's leave systems code to the people who understand it.
You shouldn't discount everyone but the OpenBSD guys just because ntp.org's ntp is a 200kloc overgrown, underengineered mess.
It offers a good out for people who would otherwise use ntp.org's ntp, and at least it's about 200x less complex(1056 lines of C). Stasticially speaking, it's unlikely to be as faulty.
Timedated is an improvement even if just for the fact that it's incredibly simple to operate. You press a button and you're synchronized; very little to mess up.
I use OpenNTPD on my OpenBSD boxes, but that doesn't make me immune to alternatives.
Even someone who likes systemd's init system functionality should think really hard before using systemd's DNS and NTP appendages. This kind of stuff needs the attention of security experts. It can't just be reimplemented as an afterthought and be secure.
If you want an alternative check out chrony: http://chrony.tuxfamily.org/