]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-dhcp-client: tentatively ignore FORCERENEW command 20002/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 23 Jun 2021 16:22:07 +0000 (01:22 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 24 Jun 2021 02:25:26 +0000 (11:25 +0900)
This makes DHCP client ignore FORCERENEW requests, as unauthenticated
FORCERENEW requests causes a security issue (TALOS-2020-1142, CVE-2020-13529).

Let's re-enable this after RFC3118 (Authentication for DHCP Messages)
and/or RFC6704 (Forcerenew Nonce Authentication) are implemented.

Fixes #16774.

src/libsystemd-network/sd-dhcp-client.c

index 67a5a03eba6ac4e6dffbf0773234e5ba3ef5ad59..dc8ff19d1a2448811c6df4cffbada36a62448c1a 100644 (file)
@@ -1587,9 +1587,17 @@ static int client_handle_forcerenew(sd_dhcp_client *client, DHCPMessage *force,
         if (r != DHCP_FORCERENEW)
                 return -ENOMSG;
 
+#if 0
         log_dhcp_client(client, "FORCERENEW");
 
         return 0;
+#else
+        /* FIXME: Ignore FORCERENEW requests until we implement RFC3118 (Authentication for DHCP
+         * Messages) and/or RFC6704 (Forcerenew Nonce Authentication), as unauthenticated FORCERENEW
+         * requests causes a security issue (TALOS-2020-1142, CVE-2020-13529). */
+        log_dhcp_client(client, "Received FORCERENEW, ignoring.");
+        return -ENOMSG;
+#endif
 }
 
 static bool lease_equal(const sd_dhcp_lease *a, const sd_dhcp_lease *b) {