virtiofsd: check input buffer size in fuse_lowlevel.c ops
authorStefan Hajnoczi <stefanha@redhat.com>
Thu, 28 Feb 2019 16:38:31 +0000 (16:38 +0000)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Thu, 23 Jan 2020 16:41:36 +0000 (16:41 +0000)
commit70995754416eb4491c31607fe380a83cfd25a087
tree525f670e00cdac6bf2808ce6a261b6936b01464d
parent0ba8c3c6fce8fe949d59c1fd84d98d220ef9e759
virtiofsd: check input buffer size in fuse_lowlevel.c ops

Each FUSE operation involves parsing the input buffer.  Currently the
code assumes the input buffer is large enough for the expected
arguments.  This patch uses fuse_mbuf_iter to check the size.

Most operations are simple to convert.  Some are more complicated due to
variable-length inputs or different sizes depending on the protocol
version.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Sergio Lopez <slp@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
tools/virtiofsd/fuse_lowlevel.c