projects
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6491e27
)
dhcp6: add missing option length check
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Tue, 17 Sep 2019 13:18:49 +0000
(22:18 +0900)
committer
Michael Biebl
<biebl@debian.org>
Tue, 19 Nov 2019 08:17:12 +0000
(08:17 +0000)
Closes #13578.
(cherry picked from commit
6ffe71d0e22326f8ea5775c188ae0e13573cd123
)
(cherry picked from commit
f2d9af4322f74832d93e101abfcc1b3adf0e05c6
)
Gbp-Pq: Name dhcp6-add-missing-option-length-check.patch
src/libsystemd-network/sd-dhcp6-client.c
patch
|
blob
|
history
diff --git
a/src/libsystemd-network/sd-dhcp6-client.c
b/src/libsystemd-network/sd-dhcp6-client.c
index 7dab776b7295d2dc63faf0ed192fbd3e90980782..5a3b0a6353bd851694ea7804f32dd4543528933f 100644
(file)
--- a/
src/libsystemd-network/sd-dhcp6-client.c
+++ b/
src/libsystemd-network/sd-dhcp6-client.c
@@
-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;
}