mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 21:55:20 +00:00
vmm: Ignore and warn TAP FDs sent via the HTTP request body
Valid FDs can only be sent from another process via `SCM_RIGHTS`. Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
parent
f3522e85fc
commit
ce75865e2c
@ -105,6 +105,10 @@ impl EndpointHandler for VmActionHandler {
|
||||
),
|
||||
AddNet(_) => {
|
||||
let mut net_cfg: NetConfig = serde_json::from_slice(body.raw())?;
|
||||
if net_cfg.fds.is_some() {
|
||||
warn!("Ignoring FDs sent via the HTTP request body");
|
||||
net_cfg.fds = None;
|
||||
}
|
||||
// Update network config with optional files that might have
|
||||
// been sent through control message.
|
||||
if !files.is_empty() {
|
||||
|
Loading…
Reference in New Issue
Block a user