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
ff27b00f5a
commit
499e8433c3
@ -105,6 +105,10 @@ impl EndpointHandler for VmActionHandler {
|
|||||||
),
|
),
|
||||||
AddNet(_) => {
|
AddNet(_) => {
|
||||||
let mut net_cfg: NetConfig = serde_json::from_slice(body.raw())?;
|
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
|
// Update network config with optional files that might have
|
||||||
// been sent through control message.
|
// been sent through control message.
|
||||||
if !files.is_empty() {
|
if !files.is_empty() {
|
||||||
|
Loading…
Reference in New Issue
Block a user