]> git.puffer.fish Git - mirror/frr.git/commitdiff
babeld: Missing Validation for AE=0 and Plen!=0 18473/head
authorzmw12306 <zmw12306@gmail.com>
Mon, 24 Mar 2025 02:37:59 +0000 (22:37 -0400)
committerzmw12306 <zmw12306@gmail.com>
Mon, 24 Mar 2025 02:37:59 +0000 (22:37 -0400)
A Request TLV with AE set to 0 and Plen not set to 0 MUST be ignored.
Signed-off-by: zmw12306 <zmw12306@gmail.com>
babeld/message.c

index 5a33d5c288ac6d6885143720f338ca99ba2f3e71..fabd72fda32f54d60a965232084aeafa26e6573e 100644 (file)
@@ -706,6 +706,11 @@ parse_packet(const unsigned char *from, struct interface *ifp,
                              "Received source-specific wildcard request.");
                     goto done;
                 }
+                if(message[3] != 0) {
+                    flog_err(EC_BABEL_PACKET,
+                             "Ignoring request with AE=0 and non-zero Plen");
+                    goto done;
+                }
                 /* If a neighbour is requesting a full route dump from us,
                    we might as well send it an IHU. */
                 send_ihu(neigh, NULL);