Re: String functions considered unsafe in kernel

From: Poul-Henning Kamp <phk_at_phk.freebsd.dk>
Date: Thu, 02 Sep 2021 21:30:01 +0000
--------
Johannes Totz via freebsd-hackers writes:

> there are a few string (copy, formatting) functions I would consider 
> unsafe when used in kernel, in particular when used with untrusted input 
> coming from user space.

This is precisely why des_at_ and I designed at created <sys/sbuf.h>.

Use it.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk_at_FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.
Received on Thu Sep 02 2021 - 21:30:01 UTC

Original text of this message