]> The Tcpdump Group git mirrors - tcpdump/commitdiff
IEEE 802.15.4: Use GET_LE64ADDR_STRING() macro to add bounds checks.
authorFrancois-Xavier Le Bail <[email protected]>
Sat, 29 Jun 2019 19:51:16 +0000 (21:51 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Sat, 29 Jun 2019 19:58:56 +0000 (21:58 +0200)
This fixes a buffer over-read discovered by Shadow HUANG.

print-802_15_4.c

index 37f111bc85f7af27d854847c212e66fe6a4dd65f..7e78e4a5a46d7fde10cec194e0ddadafa78a4d2c 100644 (file)
@@ -543,7 +543,7 @@ ieee802_15_4_print_addr(netdissect_options *ndo, const u_char *p,
                ND_PRINT("%04x", GET_LE_U_2(p));
                break;
        case 8:
-               ND_PRINT("%s", le64addr_string(ndo, p));
+               ND_PRINT("%s", GET_LE64ADDR_STRING(p));
                break;
        }
        return;
@@ -1575,7 +1575,7 @@ ieee802_15_4_print_aux_sec_header(netdissect_options *ndo,
                        return -1;
                }
                if (ndo->ndo_vflag > 1) {
-                       ND_PRINT("KeySource %s, ", le64addr_string(ndo, p));
+                       ND_PRINT("KeySource %s, ", GET_LE64ADDR_STRING(p));
                }
                p += 4;
                caplen -= 4;