summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDenys Fedoryshchenko <denys.f@collabora.com>2026-08-10 08:44:13 +0300
committerDenys Fedoryshchenko <denys.f@collabora.com>2026-08-10 08:44:13 +0300
commit4600e779e801b51405ed51d421ecfe8e33e5059d (patch)
treede5cc6c77b4075c8d4633abeff80a89a2abc8da7 /docs
parent0dd152a83012764a77ef2a7ae7bf7c20c3d43c35 (diff)
downloadaccel-ppp-4600e779e801b51405ed51d421ecfe8e33e5059d.tar.gz
accel-ppp-4600e779e801b51405ed51d421ecfe8e33e5059d.zip
ipoe: bounds check classless routes and avoid unaligned reads
The destination was always read as a 32 bit word regardless of how many significant octets the prefix length implies, and the gateway was read without checking that four bytes remain in the option. Neither read was bounded by the end of the option, so a client could make the decoder run past it. dhcpv4_check_options() only enforces a minimum length of 5 for option 121, which is short of the 9 bytes a /32 route needs. Reading the destination as a word was also wrong for any prefix shorter than /32, as it pulled in the first octets of the gateway: 10.0.1.0/24 via 1.1.1.1 printed as 10.0.0.1/24. Read only the significant octets, check the remaining length before both reads, and copy the gateway rather than dereferencing a possibly unaligned pointer.
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions