mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-02-08 05:57:26 +03:00
dhcp6: add missing option length check
Closes #13578. (cherry picked from commit 6ffe71d0e22326f8ea5775c188ae0e13573cd123)
This commit is contained in:
parent
ccf797511e
commit
f2d9af4322
@ -29,8 +29,8 @@
|
||||
|
||||
#define MAX_MAC_ADDR_LEN INFINIBAND_ALEN
|
||||
|
||||
#define IRT_DEFAULT 1 * USEC_PER_DAY
|
||||
#define IRT_MINIMUM 600 * USEC_PER_SEC
|
||||
#define IRT_DEFAULT (1 * USEC_PER_DAY)
|
||||
#define IRT_MINIMUM (600 * USEC_PER_SEC)
|
||||
|
||||
/* what to request from the server, addresses (IA_NA) and/or prefixes (IA_PD) */
|
||||
enum {
|
||||
@ -1002,6 +1002,9 @@ static int client_parse_message(
|
||||
break;
|
||||
|
||||
case SD_DHCP6_OPTION_INFORMATION_REFRESH_TIME:
|
||||
if (optlen != 4)
|
||||
return -EINVAL;
|
||||
|
||||
irt = be32toh(*(be32_t *) optval) * USEC_PER_SEC;
|
||||
break;
|
||||
}
|
||||
|
BIN
test/fuzz/fuzz-dhcp6-client/crash-13578
Normal file
BIN
test/fuzz/fuzz-dhcp6-client/crash-13578
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user