summaryrefslogtreecommitdiffstats
path: root/package/utils/busybox/patches/000-busybox-1.25.0-ntpd.patch
diff options
context:
space:
mode:
authorKevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>2016-09-21 20:02:01 +0100
committerJohn Crispin <john@phrozen.org>2016-09-27 17:50:22 +0200
commit78ae7d8efda344075c7991c731afdbd47ae1cee9 (patch)
tree43539cb8d9b71a14ed0a82137bbd34ae2a8a001d /package/utils/busybox/patches/000-busybox-1.25.0-ntpd.patch
parentedbc8fec8a9747a746fc321e97d9b96f7e95fa7e (diff)
downloadmaster-31e0f0ae-78ae7d8efda344075c7991c731afdbd47ae1cee9.tar.gz
master-31e0f0ae-78ae7d8efda344075c7991c731afdbd47ae1cee9.tar.bz2
master-31e0f0ae-78ae7d8efda344075c7991c731afdbd47ae1cee9.zip
busybox: v1.25.0 upstream patches
Include upstream patches for gzip, ip & ntpd. Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
Diffstat (limited to 'package/utils/busybox/patches/000-busybox-1.25.0-ntpd.patch')
-rw-r--r--package/utils/busybox/patches/000-busybox-1.25.0-ntpd.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/package/utils/busybox/patches/000-busybox-1.25.0-ntpd.patch b/package/utils/busybox/patches/000-busybox-1.25.0-ntpd.patch
new file mode 100644
index 0000000000..0eb887d23c
--- /dev/null
+++ b/package/utils/busybox/patches/000-busybox-1.25.0-ntpd.patch
@@ -0,0 +1,28 @@
+ntpd: respond only to client and symmetric active packets
+The busybox NTP implementation doesn't check the NTP mode of packets
+received on the server port and responds to any packet with the right
+size. This includes responses from another NTP server. An attacker can
+send a packet with a spoofed source address in order to create an
+infinite loop of responses between two busybox NTP servers. Adding
+more packets to the loop increases the traffic between the servers
+until one of them has a fully loaded CPU and/or network.
+
+Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
+Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
+
+--- a/networking/ntpd.c
++++ b/networking/ntpd.c
+@@ -2051,6 +2051,13 @@ recv_and_process_client_pkt(void /*int f
+ goto bail;
+ }
+
++ /* Respond only to client and symmetric active packets */
++ if ((msg.m_status & MODE_MASK) != MODE_CLIENT
++ && (msg.m_status & MODE_MASK) != MODE_SYM_ACT
++ ) {
++ goto bail;
++ }
++
+ query_status = msg.m_status;
+ query_xmttime = msg.m_xmttime;
+