Skip to content
Snippets Groups Projects
Commit d36a5c22 authored by Christian Schoenebeck's avatar Christian Schoenebeck Committed by Greg Kurz
Browse files

9pfs: validate count sent by client with T_readdir


A good 9p client sends T_readdir with "count" parameter that's sufficiently
smaller than client's initially negotiated msize (maximum message size).
We perform a check for that though to avoid the server to be interrupted
with a "Failed to encode VirtFS reply type 41" transport error message by
bad clients. This count value constraint uses msize - 11, because 11 is the
header size of R_readdir.

Signed-off-by: default avatarChristian Schoenebeck <qemu_oss@crudebyte.com>
Reviewed-by: default avatarGreg Kurz <groug@kaod.org>
Message-Id: <3990d3891e8ae2074709b56449e96ab4b4b93b7d.1579567020.git.qemu_oss@crudebyte.com>
[groug: added comment ]
Signed-off-by: default avatarGreg Kurz <groug@kaod.org>
parent e16453a3
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment