HomeFreeBSD

ppp: Avoid overflow when formatting endpoint discriminator options

Description

ppp: Avoid overflow when formatting endpoint discriminator options

Each byte of the address is represented by a pair of characters, so we
should be multiplying len by 2 when figuring out how much buffer space
we have. Previously, a sufficiently large option could cause an
overflow of the global "result" buffer.

Reported by: Joshua Rogers <joshua@joshua.hu>
Tested by: Décio Brandão (0xDBJ)
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D58555

Details

Provenance
markjAuthored on Aug 3 2026, 3:18 PM
Differential Revision
D58555: ppp: Avoid overflow when formatting endpoint discriminator options
Parents
rGfb63bc67483e: atomic: Implement atomic_{set,clear}_8 in _atomic_subword.h
Branches
Unknown
Tags
Unknown