SlideShare une entreprise Scribd logo
1  sur  20
Télécharger pour lire hors ligne
XSM-Flask
XSM
Overview
 XSM: Xen Security Framework – enable administrator fine grained control.
 Defines permissible interactions between domains, hypervisor and resources.
 MAC : Mandatory access Control based mechanism rather than DAC.
 Decisions are based on Security Labels rather than users. Labelling defines security
attributes for entities.
 Permissions for “Subject” interacts with “Objects” via policy
 Subject: processes in the system or VMs.
 Object: files, sockets, ports, Devices, IO resources.
 Objects controlled by security policy are labelled with set of attributes: security
context.
 Defined as:
 Scontext = system_u:system_r:dom0_t (user:role:source_type) -- SSID
 Tcontext = system_u:system_r:domU_t (user:role:target_type) -- TSID
 Target Class
 Subject and object belong to a class.
 Each Class can have upto 32 permissions represented as bitmask in 32 bit int.
 Source Context
 Target Context
Eg . #define SECCLASS_XEN 1
#define SECCLASS_XEN2 2
#define SECCLASS_DOMAIN 3
#define SECCLASS_DOMAIN2 4
Eg. av_permissions.h
#define XEN_SETTIME (1UL << 0)
#define XEN2_RESOURCE_Op (1UL << 0)
#define DOMAIN_SETVCPU_CONTEXT (1UL << 0)
#define DOMAIN_CREATE (1UL << 4)
Architecture
 Aim:
 Defence in depth
 Minimal performance impact.
 Flexibility
 Components:
 Policy: Policy is a set of rules governing access and labelling decisions that are
specified in the configuration files.
 Allow dom0_t domU_t:domain { setvcpucontext maxvcpus, setdomainmaxmem}
 Allow dom0_t domU_t:resource {add, remove }
 Policy Controlling Entity/ Object Manger: that requests permissions.
 Security Server: provides a centralized point where all the security decisions are
made
 Access Vector Cache: Stores previously computed access decisions.
 Consuleted only on Cache misses.
 Used to speed up performance.
 Components form rules in policy.
 We try to Answer: Its about answering the question “ Can x do y to z” and
enforcing the result.
 PolciyDB: DB to hold the permissions based on policy. Referred by the security
Server.
 Separation of policy decision making logic and policy enforcement logic .
Client
Policy Enforcement.
Policy DB
Security Server
Decision Making Control flow
 Access rules defined.
 Policy compiled and loaded using toolstack.
 Domains created with appropriate security label.
 Access made, permission requested.
 AVC is checked
 If cached hit, return the access decision.
 If cache miss, consult Security Server
 Security Server consults policy decision and hands out Access Vector
consisting of all possible results.
 Result returned to the requester.
 Access vector cached in the cache.
“
”
Representation : Decision Making process can be thought of as based on a table
with subject running down on left edge, object across top and each cell
represent an action that a subject can take on object.
SID 1 PCI (tSID 4) domU (tSID 5) IO Mem(tSID 6) Object n
SID1 Action Action
Dom0 (sSID2) Create Action
domU (sSID3) Access Read
Subject n(sSID n) Action Action Action
Decision Making Control Flow
Policy Enforcement
Code.
Request Access
TSID
Policy
DB
Access Vector Cache
Stores decisions made by
the security server
Domain Created with
SecLabel
Security Server
Makes decision based on
the security policy.
Security Policy
Query
permissions
Cache Miss
Permissions
Answers
permissions
A bit of code structure.
 Eg .
Initial_sids
sid dom0 gen_context (system_u:system_r:dom0_t, s0)
sid domU gen_context (system_u:system_domU_t, s0)
 How we define a Class and its relevant permissions : access_vector
class xen
{
# XENPF_settime
settime
# XEN_SYSCTL_tbuf_op
tbufcontrol
# CONSOLEIO_read, XEN_SYSCTL_readconsole
readconsole
}
class domain
{
# XEN_DOMCTL_setvcpucontext
setvcpucontext
# XEN_DOMCTL_pausedomain
pause
# XEN_DOMCTL_unpausedomain
unpause
# XEN_DOMCTL_create
create }
 Eg. hooks.c flask_domain_create()
 {
 avc_current_has_perm(ssid, tsid, SECCLASS_DOMAIN, DOMAIN_CREATE)
 }
 //ssid : sid for the requesting domain
 //tsid : sid of target domain i.e domain to be created
 //SECCLASS_DOMAIN: target class
 //DOMAIN_CREATE: Permissions
Dom0.te
#allow dom0 to use these domctls on itself. For domctls acting on other
#domains, see the definitions of create_domain and manage_domain.
allow dom0_t dom0_t:domain { setvcpucontext max_vcpus setaffinity getaffinity getscheduler
getdomaininfo …. }
allow dom0_t dom0_t:resource { add remove };
domU.te
create_domain(dom0_t, domU_t)
define(`create_domain', `
allow $1 $2:domain { create max_vcpus setdomainmaxmem setaddrsize ..}’
allow $1 $2:domain2 { set_cpuid settsc setscheduler setclaim.. };
allow $1 $2:mmu { map_read map_write adjust memorymap physmap pinpage mmuext_op updatemp };
…
')
Problem Statement
 All subjects or objects are grouped into “types” eg.
 dom_t for domain
 resource_t for resources
 Event_t for events.
 Security label includes “type”.
 Xen defines number of operations that are common across domains e.g.
 Memory mapping
 Pci passthrough
 Resource access
 But these are undesirable to allow every domain to perform on other.
 To enforce isolation, we have two approaches.
 declare different type for each domain.
 Or to duplicate permissions for each domain.
 Both approaches restricts flexibility or make XSM hooks complex.
 Lets take few examples
 New type as intr_dom_t; //introspection domain.
 Allowed pci_passthrough and introspection capability.
 But every introspection domain doesn’t need pci_passthrough capability.
 Only solution: Create a new type which doesn’t have PCI Passthrough capability but has
only introspection domain.
 All resource sharing domain doesn’t need access to all the resources. S
 Left again with only option to create a new type for each resource sharing domain.
 A big static monolithic blob of policy. Not amendable at runtime.
Proposed Solution
 Two Way Approach
 Be restrictive and more specific.
 Flexible policy:
 Supporting wide variety of security policy
 Each policy catering to specific set of requirements.
 Dynamically grant and revoke privileges
 Support policy changes Dynamically.
 Be restrictive and more specific.
 Restrict under the umbrella policy so that you don’t violate it.
 Be specific to a domain within a type.
 Example: Umbrella policy: allow domU_t domu_t:resource { add, del }
Sub policy : allow domU_t domU_t:uuid:resource { add }
Subset Subset
Umbrella Policy
 Runtime Grant and revoke privileges.
 We have single big monolithic policy
 Not possible to runtime grant, share or revoke permissions.
 Requires compilation and reload of whole policy whenever change in permission is
needed.
 xl grant <Source SID> <Source UUID>
<Target SID> <Target UUID>
<Target Class> grant <resource> <permissions>
Source SID Source UUID Target SID Target UUID Resource Grant
x xUUID Z zUUID Iomem 0xA
– 0xE
1
High level approach
 Introduce uuid which will be unique to each domain.
 Toolstack assigns uuid to each domain.
 Uuid to be part of the security context and label along with a type.
 <user:role:type:uud>
 Uuid to be considered while security server takes it decision.
 Xl loadpolicy <Source SID> <Source UUID>
<Target SID> <Target UUID>
<Target Class> restrict <resource >
 Modify the access bitmap to update the permissions
 Clear the AVC .
 (Security Server must provide interfaces to change policy)
Toolstackt XAPI DB
Set the security
label based on the
type of domain to
be created.
Dynamically load
the policy based
on the domain
XenServer
CommunicatewithXenserverfordomaincreationand
managementvihypercalls. Decision Making
Machine (Security
Server)
Challenges
 Ensure effective atomicity in interleaving policy changes : old access rights
are discarded. (“atomicity,” i.e., the ability of the system to ensure that all
operations in the system are controlled with respect to the current security
policy. )
 Revocation mechanism must guarantee that all the migrated permissions are
revoked.
 Revocation more difficult to control for operations in progress.
 Inconsistency between security policy and runtime policyDB.
 Distributed environments.
Comments / Questions ??

Contenu connexe

Tendances

Kernel Mode Threats and Practical Defenses
Kernel Mode Threats and Practical DefensesKernel Mode Threats and Practical Defenses
Kernel Mode Threats and Practical Defenses
Priyanka Aash
 
Building a Distributed Block Storage System on Xen
Building a Distributed Block Storage System on XenBuilding a Distributed Block Storage System on Xen
Building a Distributed Block Storage System on Xen
The Linux Foundation
 

Tendances (20)

Xen Project 15 Years down the Line
Xen Project 15 Years down the LineXen Project 15 Years down the Line
Xen Project 15 Years down the Line
 
XPDS14 - Zero-Footprint Guest Memory Introspection from Xen - Mihai Dontu, Bi...
XPDS14 - Zero-Footprint Guest Memory Introspection from Xen - Mihai Dontu, Bi...XPDS14 - Zero-Footprint Guest Memory Introspection from Xen - Mihai Dontu, Bi...
XPDS14 - Zero-Footprint Guest Memory Introspection from Xen - Mihai Dontu, Bi...
 
Platform Security Summit 18: Xen Security Weather Report 2018
Platform Security Summit 18: Xen Security Weather Report 2018Platform Security Summit 18: Xen Security Weather Report 2018
Platform Security Summit 18: Xen Security Weather Report 2018
 
Rootlinux17: An introduction to Xen Project Virtualisation
Rootlinux17:  An introduction to Xen Project VirtualisationRootlinux17:  An introduction to Xen Project Virtualisation
Rootlinux17: An introduction to Xen Project Virtualisation
 
XPDDS18: Xen Project Weather Report 2018
XPDDS18: Xen Project Weather Report 2018XPDDS18: Xen Project Weather Report 2018
XPDDS18: Xen Project Weather Report 2018
 
Xen and Client Virtualization: the case of XenClient XT
Xen and Client Virtualization: the case of XenClient XTXen and Client Virtualization: the case of XenClient XT
Xen and Client Virtualization: the case of XenClient XT
 
µ-Xen
µ-Xenµ-Xen
µ-Xen
 
LFNW2014 Advanced Security Features of Xen Project Hypervisor
LFNW2014 Advanced Security Features of Xen Project HypervisorLFNW2014 Advanced Security Features of Xen Project Hypervisor
LFNW2014 Advanced Security Features of Xen Project Hypervisor
 
Docker security: Rolling out Trust in your container
Docker security: Rolling out Trust in your containerDocker security: Rolling out Trust in your container
Docker security: Rolling out Trust in your container
 
Virtualization with KVM (Kernel-based Virtual Machine)
Virtualization with KVM (Kernel-based Virtual Machine)Virtualization with KVM (Kernel-based Virtual Machine)
Virtualization with KVM (Kernel-based Virtual Machine)
 
XDF18: Heterogeneous Real-Time SoC Software Architecture - Stefano Stabellini...
XDF18: Heterogeneous Real-Time SoC Software Architecture - Stefano Stabellini...XDF18: Heterogeneous Real-Time SoC Software Architecture - Stefano Stabellini...
XDF18: Heterogeneous Real-Time SoC Software Architecture - Stefano Stabellini...
 
Kernel Mode Threats and Practical Defenses
Kernel Mode Threats and Practical DefensesKernel Mode Threats and Practical Defenses
Kernel Mode Threats and Practical Defenses
 
Scale14x: Are today's foss security practices robust enough in the cloud era ...
Scale14x: Are today's foss security practices robust enough in the cloud era ...Scale14x: Are today's foss security practices robust enough in the cloud era ...
Scale14x: Are today's foss security practices robust enough in the cloud era ...
 
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
 
XPDS16: Hypervisor-based Security: Vicarious Learning via Introspektioneerin...
XPDS16:  Hypervisor-based Security: Vicarious Learning via Introspektioneerin...XPDS16:  Hypervisor-based Security: Vicarious Learning via Introspektioneerin...
XPDS16: Hypervisor-based Security: Vicarious Learning via Introspektioneerin...
 
XPDS16: AMD's virtualization memory encryption technology - Brijesh Singh, A...
XPDS16:  AMD's virtualization memory encryption technology - Brijesh Singh, A...XPDS16:  AMD's virtualization memory encryption technology - Brijesh Singh, A...
XPDS16: AMD's virtualization memory encryption technology - Brijesh Singh, A...
 
Docker Security and Content Trust
Docker Security and Content TrustDocker Security and Content Trust
Docker Security and Content Trust
 
Building a Distributed Block Storage System on Xen
Building a Distributed Block Storage System on XenBuilding a Distributed Block Storage System on Xen
Building a Distributed Block Storage System on Xen
 
Understanding container security
Understanding container securityUnderstanding container security
Understanding container security
 
Ten layers of container security for CloudCamp Nov 2017
Ten layers of container security  for CloudCamp Nov 2017Ten layers of container security  for CloudCamp Nov 2017
Ten layers of container security for CloudCamp Nov 2017
 

En vedette

XPDS16: Display Handler, a Client Display Framework for Xen - Brendan Kerrig...
XPDS16:  Display Handler, a Client Display Framework for Xen - Brendan Kerrig...XPDS16:  Display Handler, a Client Display Framework for Xen - Brendan Kerrig...
XPDS16: Display Handler, a Client Display Framework for Xen - Brendan Kerrig...
The Linux Foundation
 

En vedette (20)

XPDS16: Display Handler, a Client Display Framework for Xen - Brendan Kerrig...
XPDS16:  Display Handler, a Client Display Framework for Xen - Brendan Kerrig...XPDS16:  Display Handler, a Client Display Framework for Xen - Brendan Kerrig...
XPDS16: Display Handler, a Client Display Framework for Xen - Brendan Kerrig...
 
XPDS16: Xenbedded: Xen-based client virtualization for phones and tablets - ...
XPDS16:  Xenbedded: Xen-based client virtualization for phones and tablets - ...XPDS16:  Xenbedded: Xen-based client virtualization for phones and tablets - ...
XPDS16: Xenbedded: Xen-based client virtualization for phones and tablets - ...
 
XPDS14 - Xen on ARM: Status and Performance - Stefano Stabellini, Citrix
XPDS14 - Xen on ARM: Status and Performance - Stefano Stabellini, CitrixXPDS14 - Xen on ARM: Status and Performance - Stefano Stabellini, Citrix
XPDS14 - Xen on ARM: Status and Performance - Stefano Stabellini, Citrix
 
CIF16: Unikernels, Meet Docker! Containing Unikernels (Richard Mortier, Anil ...
CIF16: Unikernels, Meet Docker! Containing Unikernels (Richard Mortier, Anil ...CIF16: Unikernels, Meet Docker! Containing Unikernels (Richard Mortier, Anil ...
CIF16: Unikernels, Meet Docker! Containing Unikernels (Richard Mortier, Anil ...
 
1 Day Arm 2007
1 Day Arm 20071 Day Arm 2007
1 Day Arm 2007
 
CIF16: Unikernels: The Past, the Present, the Future ( Russell Pavlicek, Xen ...
CIF16: Unikernels: The Past, the Present, the Future ( Russell Pavlicek, Xen ...CIF16: Unikernels: The Past, the Present, the Future ( Russell Pavlicek, Xen ...
CIF16: Unikernels: The Past, the Present, the Future ( Russell Pavlicek, Xen ...
 
CIF16: Unikernel.org (Amir Chaudhry, Docker Inc)
CIF16: Unikernel.org (Amir Chaudhry, Docker Inc)CIF16: Unikernel.org (Amir Chaudhry, Docker Inc)
CIF16: Unikernel.org (Amir Chaudhry, Docker Inc)
 
Linaro connect : Introduction to Xen on ARM
Linaro connect : Introduction to Xen on ARMLinaro connect : Introduction to Xen on ARM
Linaro connect : Introduction to Xen on ARM
 
ARM Fundamentals
ARM FundamentalsARM Fundamentals
ARM Fundamentals
 
XPDS16: Live scalability for vGPU using gScale - Xiao Zheng, Intel
XPDS16: Live scalability for vGPU using gScale - Xiao Zheng, IntelXPDS16: Live scalability for vGPU using gScale - Xiao Zheng, Intel
XPDS16: Live scalability for vGPU using gScale - Xiao Zheng, Intel
 
XPDS16: Xen Orchestra: building a Cloud on top of Xen - Olivier Lambert & Jul...
XPDS16: Xen Orchestra: building a Cloud on top of Xen - Olivier Lambert & Jul...XPDS16: Xen Orchestra: building a Cloud on top of Xen - Olivier Lambert & Jul...
XPDS16: Xen Orchestra: building a Cloud on top of Xen - Olivier Lambert & Jul...
 
XPDS16: Making Migration More Secure - John Shackleton, Adventium Labs
XPDS16: Making Migration More Secure - John Shackleton, Adventium LabsXPDS16: Making Migration More Secure - John Shackleton, Adventium Labs
XPDS16: Making Migration More Secure - John Shackleton, Adventium Labs
 
XPDS16: Live Migration of vGPU - Xiao Zheng, Intel Asia-Pacific Research & De...
XPDS16: Live Migration of vGPU - Xiao Zheng, Intel Asia-Pacific Research & De...XPDS16: Live Migration of vGPU - Xiao Zheng, Intel Asia-Pacific Research & De...
XPDS16: Live Migration of vGPU - Xiao Zheng, Intel Asia-Pacific Research & De...
 
XPDS16: Xen Development Update
XPDS16: Xen Development UpdateXPDS16: Xen Development Update
XPDS16: Xen Development Update
 
XPDS16: Consideration of Real Time GPU Scheduling of XenGT in Automotive Embe...
XPDS16: Consideration of Real Time GPU Scheduling of XenGT in Automotive Embe...XPDS16: Consideration of Real Time GPU Scheduling of XenGT in Automotive Embe...
XPDS16: Consideration of Real Time GPU Scheduling of XenGT in Automotive Embe...
 
XPDS16: libvirt and Tools: What's New and What's Next - James Fehlig, SUSE
XPDS16: libvirt and Tools: What's New and What's Next - James Fehlig, SUSEXPDS16: libvirt and Tools: What's New and What's Next - James Fehlig, SUSE
XPDS16: libvirt and Tools: What's New and What's Next - James Fehlig, SUSE
 
The ARM Architecture: ARM : ARM Architecture
The ARM Architecture: ARM : ARM ArchitectureThe ARM Architecture: ARM : ARM Architecture
The ARM Architecture: ARM : ARM Architecture
 
Fosdem17 - Mixed License FOSS Projects
Fosdem17 - Mixed License FOSS ProjectsFosdem17 - Mixed License FOSS Projects
Fosdem17 - Mixed License FOSS Projects
 
Fosdem 17 - Towards a HVM-like Dom0 for Xen
Fosdem 17 - Towards a HVM-like Dom0 for XenFosdem 17 - Towards a HVM-like Dom0 for Xen
Fosdem 17 - Towards a HVM-like Dom0 for Xen
 
XPDS16: Patch review for non-maintainers - George Dunlap, Citrix Systems R&D...
 XPDS16: Patch review for non-maintainers - George Dunlap, Citrix Systems R&D... XPDS16: Patch review for non-maintainers - George Dunlap, Citrix Systems R&D...
XPDS16: Patch review for non-maintainers - George Dunlap, Citrix Systems R&D...
 

Similaire à XPDS16: XSM-Flask, current limitations and Ongoing work. - Anshul Makkar, Ctirix Systems UK Ltd.

Windows Remote Management - EN
Windows Remote Management - ENWindows Remote Management - EN
Windows Remote Management - EN
Kirill Nikolaev
 
Ch18 OS
Ch18 OSCh18 OS
Ch18 OS
C.U
 
21CSC202J Operating Systems-Unit-V.pptx.pdf
21CSC202J Operating Systems-Unit-V.pptx.pdf21CSC202J Operating Systems-Unit-V.pptx.pdf
21CSC202J Operating Systems-Unit-V.pptx.pdf
anusri1904
 

Similaire à XPDS16: XSM-Flask, current limitations and Ongoing work. - Anshul Makkar, Ctirix Systems UK Ltd. (20)

Windows Remote Management - EN
Windows Remote Management - ENWindows Remote Management - EN
Windows Remote Management - EN
 
SELinux introduction
SELinux introductionSELinux introduction
SELinux introduction
 
Linux Security
Linux SecurityLinux Security
Linux Security
 
Ch18 OS
Ch18 OSCh18 OS
Ch18 OS
 
OSCh18
OSCh18OSCh18
OSCh18
 
OS_Ch18
OS_Ch18OS_Ch18
OS_Ch18
 
Hadoop HDFS Concepts
Hadoop HDFS ConceptsHadoop HDFS Concepts
Hadoop HDFS Concepts
 
Se linux course1
Se linux course1Se linux course1
Se linux course1
 
Chapter 14 - Protection
Chapter 14 - ProtectionChapter 14 - Protection
Chapter 14 - Protection
 
Up is Down, Black is White: Using SCCM for Wrong and Right
Up is Down, Black is White: Using SCCM for Wrong and RightUp is Down, Black is White: Using SCCM for Wrong and Right
Up is Down, Black is White: Using SCCM for Wrong and Right
 
chroot and SELinux
chroot and SELinuxchroot and SELinux
chroot and SELinux
 
Dear Hacker: Infrastructure Security Reality Check
Dear Hacker: Infrastructure Security Reality CheckDear Hacker: Infrastructure Security Reality Check
Dear Hacker: Infrastructure Security Reality Check
 
Security on a Container Platform
Security on a Container PlatformSecurity on a Container Platform
Security on a Container Platform
 
2008 08-12 SELinux: A Key Component in Secure Infrastructures
2008 08-12 SELinux: A Key Component in Secure Infrastructures2008 08-12 SELinux: A Key Component in Secure Infrastructures
2008 08-12 SELinux: A Key Component in Secure Infrastructures
 
Hadoop HDFS Concepts
Hadoop HDFS ConceptsHadoop HDFS Concepts
Hadoop HDFS Concepts
 
21CSC202J Operating Systems-Unit-V.pptx.pdf
21CSC202J Operating Systems-Unit-V.pptx.pdf21CSC202J Operating Systems-Unit-V.pptx.pdf
21CSC202J Operating Systems-Unit-V.pptx.pdf
 
Level 4
Level 4Level 4
Level 4
 
AdvFS Storage (domain) Threshold Alerts
AdvFS Storage (domain) Threshold AlertsAdvFS Storage (domain) Threshold Alerts
AdvFS Storage (domain) Threshold Alerts
 
2008-10-15 Red Hat Deep Dive Sessions: SELinux
2008-10-15 Red Hat Deep Dive Sessions: SELinux2008-10-15 Red Hat Deep Dive Sessions: SELinux
2008-10-15 Red Hat Deep Dive Sessions: SELinux
 
WAFFLE: Windows Authentication in Java
WAFFLE: Windows Authentication in JavaWAFFLE: Windows Authentication in Java
WAFFLE: Windows Authentication in Java
 

Plus de The Linux Foundation

Plus de The Linux Foundation (20)

ELC2019: Static Partitioning Made Simple
ELC2019: Static Partitioning Made SimpleELC2019: Static Partitioning Made Simple
ELC2019: Static Partitioning Made Simple
 
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
 
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
 
XPDDS19 Keynote: Unikraft Weather Report
XPDDS19 Keynote:  Unikraft Weather ReportXPDDS19 Keynote:  Unikraft Weather Report
XPDDS19 Keynote: Unikraft Weather Report
 
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
 
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, XilinxXPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
 
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
 
XPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
XPDDS19: Memories of a VM Funk - Mihai Donțu, BitdefenderXPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
XPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
 
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
OSSJP/ALS19:  The Road to Safety Certification: Overcoming Community Challeng...OSSJP/ALS19:  The Road to Safety Certification: Overcoming Community Challeng...
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
 
OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
 OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making... OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
 
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, CitrixXPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
 
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltdXPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
 
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
 
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&DXPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
 
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM SystemsXPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
 
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
 
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
 
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
 
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSEXPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
 
XPDDS19: Implementing AMD MxGPU - Jonathan Farrell, Assured Information Security
XPDDS19: Implementing AMD MxGPU - Jonathan Farrell, Assured Information SecurityXPDDS19: Implementing AMD MxGPU - Jonathan Farrell, Assured Information Security
XPDDS19: Implementing AMD MxGPU - Jonathan Farrell, Assured Information Security
 

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Dernier (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

XPDS16: XSM-Flask, current limitations and Ongoing work. - Anshul Makkar, Ctirix Systems UK Ltd.

  • 2. Overview  XSM: Xen Security Framework – enable administrator fine grained control.  Defines permissible interactions between domains, hypervisor and resources.  MAC : Mandatory access Control based mechanism rather than DAC.  Decisions are based on Security Labels rather than users. Labelling defines security attributes for entities.  Permissions for “Subject” interacts with “Objects” via policy  Subject: processes in the system or VMs.  Object: files, sockets, ports, Devices, IO resources.  Objects controlled by security policy are labelled with set of attributes: security context.  Defined as:  Scontext = system_u:system_r:dom0_t (user:role:source_type) -- SSID  Tcontext = system_u:system_r:domU_t (user:role:target_type) -- TSID
  • 3.  Target Class  Subject and object belong to a class.  Each Class can have upto 32 permissions represented as bitmask in 32 bit int.  Source Context  Target Context Eg . #define SECCLASS_XEN 1 #define SECCLASS_XEN2 2 #define SECCLASS_DOMAIN 3 #define SECCLASS_DOMAIN2 4 Eg. av_permissions.h #define XEN_SETTIME (1UL << 0) #define XEN2_RESOURCE_Op (1UL << 0) #define DOMAIN_SETVCPU_CONTEXT (1UL << 0) #define DOMAIN_CREATE (1UL << 4)
  • 4. Architecture  Aim:  Defence in depth  Minimal performance impact.  Flexibility  Components:  Policy: Policy is a set of rules governing access and labelling decisions that are specified in the configuration files.  Allow dom0_t domU_t:domain { setvcpucontext maxvcpus, setdomainmaxmem}  Allow dom0_t domU_t:resource {add, remove }  Policy Controlling Entity/ Object Manger: that requests permissions.  Security Server: provides a centralized point where all the security decisions are made
  • 5.  Access Vector Cache: Stores previously computed access decisions.  Consuleted only on Cache misses.  Used to speed up performance.  Components form rules in policy.  We try to Answer: Its about answering the question “ Can x do y to z” and enforcing the result.  PolciyDB: DB to hold the permissions based on policy. Referred by the security Server.  Separation of policy decision making logic and policy enforcement logic . Client Policy Enforcement. Policy DB Security Server
  • 6. Decision Making Control flow  Access rules defined.  Policy compiled and loaded using toolstack.  Domains created with appropriate security label.  Access made, permission requested.  AVC is checked  If cached hit, return the access decision.  If cache miss, consult Security Server  Security Server consults policy decision and hands out Access Vector consisting of all possible results.  Result returned to the requester.  Access vector cached in the cache.
  • 7. “ ” Representation : Decision Making process can be thought of as based on a table with subject running down on left edge, object across top and each cell represent an action that a subject can take on object. SID 1 PCI (tSID 4) domU (tSID 5) IO Mem(tSID 6) Object n SID1 Action Action Dom0 (sSID2) Create Action domU (sSID3) Access Read Subject n(sSID n) Action Action Action
  • 8. Decision Making Control Flow Policy Enforcement Code. Request Access TSID Policy DB Access Vector Cache Stores decisions made by the security server Domain Created with SecLabel Security Server Makes decision based on the security policy. Security Policy Query permissions Cache Miss Permissions Answers permissions
  • 9. A bit of code structure.  Eg . Initial_sids sid dom0 gen_context (system_u:system_r:dom0_t, s0) sid domU gen_context (system_u:system_domU_t, s0)  How we define a Class and its relevant permissions : access_vector class xen { # XENPF_settime settime # XEN_SYSCTL_tbuf_op tbufcontrol # CONSOLEIO_read, XEN_SYSCTL_readconsole readconsole }
  • 10. class domain { # XEN_DOMCTL_setvcpucontext setvcpucontext # XEN_DOMCTL_pausedomain pause # XEN_DOMCTL_unpausedomain unpause # XEN_DOMCTL_create create }  Eg. hooks.c flask_domain_create()  {  avc_current_has_perm(ssid, tsid, SECCLASS_DOMAIN, DOMAIN_CREATE)  }  //ssid : sid for the requesting domain  //tsid : sid of target domain i.e domain to be created  //SECCLASS_DOMAIN: target class  //DOMAIN_CREATE: Permissions
  • 11. Dom0.te #allow dom0 to use these domctls on itself. For domctls acting on other #domains, see the definitions of create_domain and manage_domain. allow dom0_t dom0_t:domain { setvcpucontext max_vcpus setaffinity getaffinity getscheduler getdomaininfo …. } allow dom0_t dom0_t:resource { add remove }; domU.te create_domain(dom0_t, domU_t) define(`create_domain', ` allow $1 $2:domain { create max_vcpus setdomainmaxmem setaddrsize ..}’ allow $1 $2:domain2 { set_cpuid settsc setscheduler setclaim.. }; allow $1 $2:mmu { map_read map_write adjust memorymap physmap pinpage mmuext_op updatemp }; … ')
  • 12. Problem Statement  All subjects or objects are grouped into “types” eg.  dom_t for domain  resource_t for resources  Event_t for events.  Security label includes “type”.  Xen defines number of operations that are common across domains e.g.  Memory mapping  Pci passthrough  Resource access  But these are undesirable to allow every domain to perform on other.
  • 13.  To enforce isolation, we have two approaches.  declare different type for each domain.  Or to duplicate permissions for each domain.  Both approaches restricts flexibility or make XSM hooks complex.  Lets take few examples  New type as intr_dom_t; //introspection domain.  Allowed pci_passthrough and introspection capability.  But every introspection domain doesn’t need pci_passthrough capability.  Only solution: Create a new type which doesn’t have PCI Passthrough capability but has only introspection domain.  All resource sharing domain doesn’t need access to all the resources. S  Left again with only option to create a new type for each resource sharing domain.  A big static monolithic blob of policy. Not amendable at runtime.
  • 14. Proposed Solution  Two Way Approach  Be restrictive and more specific.  Flexible policy:  Supporting wide variety of security policy  Each policy catering to specific set of requirements.  Dynamically grant and revoke privileges  Support policy changes Dynamically.
  • 15.  Be restrictive and more specific.  Restrict under the umbrella policy so that you don’t violate it.  Be specific to a domain within a type.  Example: Umbrella policy: allow domU_t domu_t:resource { add, del } Sub policy : allow domU_t domU_t:uuid:resource { add } Subset Subset Umbrella Policy
  • 16.  Runtime Grant and revoke privileges.  We have single big monolithic policy  Not possible to runtime grant, share or revoke permissions.  Requires compilation and reload of whole policy whenever change in permission is needed.  xl grant <Source SID> <Source UUID> <Target SID> <Target UUID> <Target Class> grant <resource> <permissions> Source SID Source UUID Target SID Target UUID Resource Grant x xUUID Z zUUID Iomem 0xA – 0xE 1
  • 17. High level approach  Introduce uuid which will be unique to each domain.  Toolstack assigns uuid to each domain.  Uuid to be part of the security context and label along with a type.  <user:role:type:uud>  Uuid to be considered while security server takes it decision.  Xl loadpolicy <Source SID> <Source UUID> <Target SID> <Target UUID> <Target Class> restrict <resource >  Modify the access bitmap to update the permissions  Clear the AVC .  (Security Server must provide interfaces to change policy)
  • 18. Toolstackt XAPI DB Set the security label based on the type of domain to be created. Dynamically load the policy based on the domain XenServer CommunicatewithXenserverfordomaincreationand managementvihypercalls. Decision Making Machine (Security Server)
  • 19. Challenges  Ensure effective atomicity in interleaving policy changes : old access rights are discarded. (“atomicity,” i.e., the ability of the system to ensure that all operations in the system are controlled with respect to the current security policy. )  Revocation mechanism must guarantee that all the migrated permissions are revoked.  Revocation more difficult to control for operations in progress.  Inconsistency between security policy and runtime policyDB.  Distributed environments.