virtiofsd: validate path components
commit25dae28c58d7e706b5d5db99042c9db3cef2e657
authorStefan Hajnoczi <stefanha@redhat.com>
Tue, 26 Feb 2019 17:58:59 +0000 (26 17:58 +0000)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Thu, 23 Jan 2020 16:41:36 +0000 (23 16:41 +0000)
tree7e5cfc815d3541e43703e8af81e23e3015edce63
parent5fe319a7b19c9c328e6e061bffcf1ff6cc8b89ce
virtiofsd: validate path components

Several FUSE requests contain single path components.  A correct FUSE
client sends well-formed path components but there is currently no input
validation in case something went wrong or the client is malicious.

Refuse ".", "..", and paths containing '/' when we expect a path
component.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
tools/virtiofsd/passthrough_ll.c