From: Yu Watanabe Date: Wed, 18 Sep 2019 13:14:45 +0000 (+0900) Subject: dhcp6: use unaligned_read_be32() X-Git-Tag: v244-rc1~278 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0eb5e6d3f08c6b3a41cfa7ac02bcc6302259ed4a;p=thirdparty%2Fsystemd.git dhcp6: use unaligned_read_be32() Closes #13591. --- diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c index 5a3b0a6353b..9773a067d58 100644 --- a/src/libsystemd-network/sd-dhcp6-client.c +++ b/src/libsystemd-network/sd-dhcp6-client.c @@ -1005,7 +1005,7 @@ static int client_parse_message( if (optlen != 4) return -EINVAL; - irt = be32toh(*(be32_t *) optval) * USEC_PER_SEC; + irt = unaligned_read_be32((be32_t *) optval) * USEC_PER_SEC; break; } diff --git a/test/fuzz/fuzz-dhcp6-client/crash-13591 b/test/fuzz/fuzz-dhcp6-client/crash-13591 new file mode 100644 index 00000000000..20ac358f4d4 Binary files /dev/null and b/test/fuzz/fuzz-dhcp6-client/crash-13591 differ