plan9port/src/lib9pclient
Günther Noack 878b30c0bc fspread: fix buffer overflow
Without this fix, fspread is trusting the server to return as much
data as requested, or less. If a server responds with more data
though, fspread writes beyond the bounds of the buffer to fill, which
is passed in by the caller. It depends on the caller of fspread()
where that buffer is, so there are various possible attack vectors.

In the Plan9 kernel, I found this implemented in devmnt.c, where
overly large responses are truncated to the size requested before
copying, so I assume that this strategy works here too.

This also affects fsread() and fsreadn(), which are based on
fspread().
2021-04-05 05:19:49 -04:00
..
access.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
auth.c add auth 2005-02-08 21:03:12 +00:00
close.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
COPYRIGHT
create.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
dirread.c delete 9P2000.u 2010-12-07 13:34:11 -05:00
fs.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
fsimpl.h delete 9P2000.u 2010-12-07 13:34:11 -05:00
mkfile add print 2006-02-08 21:21:01 +00:00
ns.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
open.c more functions 2006-07-23 02:55:34 +00:00
openfd.c more functions 2006-07-23 02:55:34 +00:00
print.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
read.c fspread: fix buffer overflow 2021-04-05 05:19:49 -04:00
remove.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
seek.c add fsseek 2005-01-18 18:11:39 +00:00
stat.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00
walk.c more functions 2006-07-23 02:55:34 +00:00
write.c do not add to void* 2005-03-15 19:50:16 +00:00
wstat.c Trivial changes: whitespace and modes. 2020-01-10 14:54:30 +00:00