Files
strongswan-ext/src/libcharon/plugins/dhcp
Tobias Brunner 8f22345542 dhcp: Fix potential OOB read when parsing DHCP messages
The missing parentheses around the additions when calculating optlen
in the previous code can cause an out-of-bound read of up to 228 bytes
if no DHCP_OPTEND is found in the message (the calculation basically
evaluated to `- 20 + 8 + 240`).

Since the buffer for the received packet (via pf_handler_t) is located
on the stack, this shouldn't cause much of an issue in practice.
2026-05-19 17:27:33 +02:00
..