networkd: refuse more than 128 NTP servers
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 27 Feb 2019 13:45:29 +0000 (14:45 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 27 Feb 2019 13:52:33 +0000 (14:52 +0100)
commitc448459d5635e8ce7b7c0017df8d3bdc8e20c62e
treeb8b77cfe1ba7b49d7f5ec6f4376ed288f1775662
parent83ec4592760db3dc35f0843b9f1e03624a792e9e
networkd: refuse more than 128 NTP servers

This test case is a bit silly, but it shows that our code is unprepared to
handle so many network servers, with quadratic complexity in various places.
I don't think there are any valid reasons to have hundres of NTP servers
configured, so let's just emit a warning and cut the list short.

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13354
src/network/networkd-network.c
test/fuzz/fuzz-network-parser/oss-fuzz-13354 [new file with mode: 0644]