HomeFreeBSD

include: ssp: round out fortification of current set of headers

Description

include: ssp: round out fortification of current set of headers

ssp/ssp.h needed some improvements:

  • len isn't always a size_t, it may need casted
  • In some cases we may want to use a len that isn't specified as a parameter (e.g., L_ctermid), so __ssp_redirect() should be more flexible.
  • In other cases we may want additional checking, so pull all of the declaration bits out of __ssp_redirect_raw() so that some functions can implement the body themselves.

strlcat/strlcpy should be the last of the fortified functions that get
their own __*_chk symbols, and these cases are only done to be
consistent with the rest of the str*() set.

Reviewed by: markj
Sponsored by: Klara, Inc.
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D45679

Details

Provenance
kevansAuthored on Jul 13 2024, 5:16 AM
Reviewer
markj
Differential Revision
D45679: include: ssp: round out fortification of current set of headers
Parents
rGc10d567ea022: include: de-macro __ssp_overlap(), improve semantics and checking
Branches
Unknown
Tags
Unknown