<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libc/secure, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=main</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2024-09-30T03:34:18Z</updated>
<entry>
<title>libmd, kern, stand: consolidate md5 implementations (NFC)</title>
<updated>2024-09-30T03:34:18Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2022-03-08T15:39:52Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e7a629c851d747772cc138efcb0418809ecdea55'/>
<id>urn:sha1:e7a629c851d747772cc138efcb0418809ecdea55</id>
<content type='text'>
Reduce the number of md5c.c between the three of these from two to one
by just reaching into the kernel build for both userland builds.  The
precedent for this already exists for sha2 in both cases.

_libmd_ symbol privatization bits have been moved to sys/md5.h and
md5.h remains to #include &lt;sys/md5.h&gt; for compatibility.

This stops exporting MD5Pad() in the process because the kernel stopped
exporting it in 502a35d60f4c.  soversion is bumped accordingly.

This also renames the libc version of stack_protector.c; it previously
only worked by coincidence because .PATH ordering worked out such that
we got the right one, but this is not the case anymore.  Remove the
landmine.

PR:		280784 (exp-run)
Reviewed by:	allanjude, delphij
Differential Revision:	https://reviews.freebsd.org/D34497
</content>
</entry>
<entry>
<title>include: ssp: don't shadow the mempcpy builtin</title>
<updated>2024-07-16T05:12:28Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2024-07-16T05:12:28Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=0c47b9c211ede221629914ae0c5553586e772109'/>
<id>urn:sha1:0c47b9c211ede221629914ae0c5553586e772109</id>
<content type='text'>
GCC emits a warning about shadowing a builtin with our mempcpy
declaration, so switch it to using the same model as memcpy() and
use the apparently-existing __builtin___mempcpy_chk().

Reviewed by:	kib (earlier version), markj
Sponsored by:	Klara, Inc.
Sponsored by:	Stormshield
Differential Revision:	https://reviews.freebsd.org/D45976
</content>
</entry>
<entry>
<title>include: ssp: round out fortification of current set of headers</title>
<updated>2024-07-13T05:16:24Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2024-07-13T05:16:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=cf8e5289a110954600f135024d1515a77d0ae34d'/>
<id>urn:sha1:cf8e5289a110954600f135024d1515a77d0ae34d</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>include: de-macro __ssp_overlap(), improve semantics and checking</title>
<updated>2024-07-13T05:16:23Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2024-07-13T05:16:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c10d567ea022de8705fb23f8563c4726f2d09ca0'/>
<id>urn:sha1:c10d567ea022de8705fb23f8563c4726f2d09ca0</id>
<content type='text'>
Switch away from pointer arithmetic to provide more obvious semantics
for checking overlap on pointer ranges.  This lets us remove some casts
that need not exist and removes some possible fragility in its use.

While we're here, check for overflow just in case; sometimes we use a
caller-supplied size if __builtin_object_size(3) can't deduce the buffer
size, and we should fail the check if the size is nonsensical for the
provided buffers.

Reviewed by:	markj
Sponsored by:	Klara, Inc.
Sponsored by:	Stormshield
</content>
</entry>
<entry>
<title>libc: move __ssp_overlap back out into &lt;ssp/ssp.h&gt;</title>
<updated>2024-07-13T05:16:23Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2024-07-13T05:16:09Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4719366192d306a76e8e86bf926387f1c4122fd3'/>
<id>urn:sha1:4719366192d306a76e8e86bf926387f1c4122fd3</id>
<content type='text'>
We'll be using it in some upcoming definitions in headers, so move it
back now but slap a warning on it.  Our upcoming uses will all be inside
of inline functions, so we're not overly concerned about double
evaluation immediately.

Reviewed by:	markj
Sponsored by:	Klara, Inc.
Sponsored by:	Stormshield
Differential Revision:	https://reviews.freebsd.org/D45677
</content>
</entry>
<entry>
<title>Fix the GCC build after _FORTIFY_SOURCE import</title>
<updated>2024-05-13T16:21:38Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2024-05-13T16:13:51Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8b0682644e2da9c595d9249c9a0c8eb499421b5e'/>
<id>urn:sha1:8b0682644e2da9c595d9249c9a0c8eb499421b5e</id>
<content type='text'>
We haven't exposed gets(3) in a long time, rip out __gets_chk before
it's too late and something builds a gets(3) user with it enabled.
</content>
</entry>
<entry>
<title>Import _FORTIFY_SOURCE implementation from NetBSD</title>
<updated>2024-05-13T05:23:49Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2024-05-13T05:23:49Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=be04fec42638f30f50b5b55fd8e3634c0fb89928'/>
<id>urn:sha1:be04fec42638f30f50b5b55fd8e3634c0fb89928</id>
<content type='text'>
This is a mostly-unmodified copy of the various *_chk implementations
and headers from NetBSD, without yet modifying system headers to start
actually including them.  A future commit will also apply the needed
bits to fix ssp/unistd.h.

Reviewed by:	imp, pauamma_gundo.com (both previous versions), kib
Sponsored by:	Stormshield
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D32306
</content>
</entry>
<entry>
<title>libc: Remove empty comments in Symbol.map</title>
<updated>2023-11-15T17:51:03Z</updated>
<author>
<name>Brooks Davis</name>
<email>brooks@FreeBSD.org</email>
</author>
<published>2023-11-15T17:51:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=1ca63a8219b88b752b064d19bd3428c61dbcf1f9'/>
<id>urn:sha1:1ca63a8219b88b752b064d19bd3428c61dbcf1f9</id>
<content type='text'>
These were left over from $FreeBSD$ removal.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D42612
</content>
</entry>
<entry>
<title>libc: Purge unneeded cdefs.h</title>
<updated>2023-11-01T22:44:30Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-11-01T22:43:37Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=559a218c9b257775fb249b67945fe4a05b7a6b9f'/>
<id>urn:sha1:559a218c9b257775fb249b67945fe4a05b7a6b9f</id>
<content type='text'>
These sys/cdefs.h are not needed. Purge them. They are mostly left-over
from the $FreeBSD$ removal. A few in libc are still required for macros
that cdefs.h defines. Keep those.

Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D42385
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: one-line sh pattern</title>
<updated>2023-08-16T17:55:03Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:55:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf'/>
<id>urn:sha1:d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf</id>
<content type='text'>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
</content>
</entry>
</feed>
