Re: the Linux man-pages as an educational tool
Alejandro Colomar <[email protected]> Mon, 3 Aug 2026 18:17:44 +0200
| Newsgroups | org.kernel.vger.linux-man |
|---|---|
| Message-ID | <anC-iciC6ZgIkTdT@devuan> |
--4p6hejoek3tde5mu Content-Type: text/plain; protected-headers=v1; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable From: Alejandro Colomar <[email protected]> To: Jeffrey Walton <[email protected]> Cc: [email protected], "Maciej W. Rozycki" <[email protected]>, Collin Funk <[email protected]>, "G. Branden Robinson" <[email protected]>, Paul Eggert <[email protected]>, [email protected], [email protected] Subject: Re: the Linux man-pages as an educational tool Message-ID: <anC-iciC6ZgIkTdT@devuan> References: <am56ZBzNM5J07AUa@devuan> <[email protected]> <am6CnOddgaM10pry@devuan> <20260802000833.zpu27l7ibvrbouna@illithid> <am6PkypxYg-Fq4Iz@devuan> <[email protected]> <am6X32HkGdm2xTd7@devuan> <[email protected]> <am-2d02e1qq78Asv@devuan> <CAH8yC8mqbYSdnSPSUReFn5uq9beORx9r8qKUz--AD1KZ+oRQKA@mail.gmail.com> MIME-Version: 1.0 In-Reply-To: <CAH8yC8mqbYSdnSPSUReFn5uq9beORx9r8qKUz--AD1KZ+oRQKA@mail.gmail.com> Hi Jeff, > Date: 2026-08-03 12:07:41-0400 > From: Jeffrey Walton <[email protected]> > > On Sun, Aug 2, 2026 at 5:35=E2=80=AFPM Alejandro Colomar <[email protected]>= wrote: > > > > [...] > > > > Most programmers can live in the safe bubble of <string.h>: those > > functions always require a string as input, and always provide a string > > as output. Plain and simple. It's difficult to write bugs when using > > those. >=20 > I don't think it is simple to write safe (secure?) code using the > interfaces currently provided by libc.* Proof by counterexample: > CVE-2026-5358, > <https://sourceware.org/bugzilla/show_bug.cgi?id=3D34067>. If the libc > maintainers can't write secure code using the existing interfaces, > then there's little hope for the rest of us. Agreed; I didn't mean that limiting oneself to the currently provided libc string APIs is safe. I meant that limiting oneself to APIs that strictly handle strings (including some APIs that are not currently provided by glibc, such as streq(3) and strscpy(9)) is safe (compared to using the non-string APIs. > [*] libc could provide safer interfaces, but it declined to provide > them. Confer, the lack of support for Annex K and the safer string > functions. (I'm aware of the politics and the past decisions by folks > like Ulrich Drepper). I don't think Annex K is safe at all. But certainly, some additions would be beneficial. Have a lovely day! Alex >=20 > Jeff --=20 <https://www.alejandro-colomar.es> --4p6hejoek3tde5mu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEES7Jt9u9GbmlWADAi64mZXMKQwqkFAmpwvygACgkQ64mZXMKQ wqnucw/+NT1WYUqukfi2OIvjgdDIEBc3rRY7KEn/0oEEZkg7rrM9Wu+Dy9e2pbav Oe/76L+s8Ro1+ibD50MrQl3D3FFo/SPWx/uNIFolECVyPuiuaqpZZg1mh7S1QXrn CPKCIseeo5ijUOfzZx5OnQ4sQK3x73aUQoXztakChQyEaW71O3oiX2p4AkEtvurQ 6UpsL8wQv8GprXnjk5FVQBOiaC2dqypwtSuKU+e4A7mEiAlwHadeYtBUF5/V9g5X 5N4V9LYzzUjhv1TR+usNCs9I+VjG3GTVzW4SJKqopDQOmfITANt8tVxdqOrm1zkj jKtsBkSXG/hfDGIfEOsWTOkKoX7A+pEQvPcYxaje4G6ldS6jaPUQyEwTiKG7q35s OIbj5chzKC4bTyNZSHGmFFg9nyZcq3bu3ponIABskIk5bcL9nFScAwWkM4nIUuaA Yf+B29Ud5RwC6e0fOTgGcwbw7N8EGLIHmZNBuaTXbynMUbfVBIKDgJ/sZFqZiGfw Smha8sCbgpgpuUSLkBsYI+eHq0HZleuU9buGvuIcAHwGZI2ufEp9m/LcbnsngY+C uYbqc+qdWyHmMMIYhq6Hx7AqPZ0KIwg6lR7oGPq5t3XxhGuJpuJ73twnwOoBoByS pisBQ+V+KR5ZBBrf93vIiFaOb0i4izohSF/S2xMOJR5WcHNxM1k= =NkrA -----END PGP SIGNATURE----- --4p6hejoek3tde5mu--