plan9fox/sys
cinap_lenrek 6aa7ebcf49 kernel: make exec clear errstr, stop side-channels and truncate on utf8 boundary
make exec() clear the per process error string
to avoid spurious errors and confusion.

the errstr() syscall used to always swap the
maximum buffer size with memmove(), which is
problematic as this gives access to the garbage
beyond the NUL byte. worse, newproc(), werrstr()
and rerrstr() only clear the first byte of the
input buffer. so random stack rubble could be
leaked across processes.

we change the errstr() syscall to not copy
beyond the NUL byte.

the manpage also documents that errstr() should
truncate on a utf8 boundary so we use utfecpy()
to ensure proper NUL termination.
2019-09-04 02:40:41 +02:00
..
doc
games/lib fortunes: Open source may not be safe if it has no super excellent moderator. 2019-03-17 23:13:27 -04:00
include auth/rsa2asn1: implement private key export with -a flag (thanks kvik) 2019-08-30 07:34:35 +02:00
lib /sys/lib/dist/mkfile: adjust 2GB for pi3 and zynq img 2019-08-24 16:35:03 +02:00
man rsa(2): document asn1encodeRSApriv() and asn1encodeRSApub() functions 2019-08-30 07:35:54 +02:00
src kernel: make exec clear errstr, stop side-channels and truncate on utf8 boundary 2019-09-04 02:40:41 +02:00