mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
sd-dhcp-server: refuse too large packet to send
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=44134.
This commit is contained in:
committed by
Luca Boccassi
parent
a663f5eef5
commit
71df50a973
@@ -319,6 +319,9 @@ static int dhcp_server_send_unicast_raw(
|
||||
|
||||
memcpy(link.ll.sll_addr, chaddr, hlen);
|
||||
|
||||
if (len > UINT16_MAX)
|
||||
return -EOVERFLOW;
|
||||
|
||||
dhcp_packet_append_ip_headers(packet, server->address, DHCP_PORT_SERVER,
|
||||
packet->dhcp.yiaddr,
|
||||
DHCP_PORT_CLIENT, len, -1);
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user