SlideShare a Scribd company logo
1 of 15
Download to read offline
DMAFV: Testing Device Drivers
against DMA Faults
○Masanori Misono†
, Toshiki Hatanaka, Takahiro Shinagawa
The University of Tokyo
The 37th ACM Symposium On Applied Computing (ACM SAC 2022), Apr 2022
†
Currently at TU Munich
Background (1/2)
● Device and device driver interaction
○ PIO/MMIO
○ DMA
2
Device Driver
Background (2/2)
● Devices can be malfunction or even malicious
● Device drivers should check values from devices
3
Device Driver
Anomaly values
Existing Methods (1/3)
● Static Analysis / Symbolic Execution
○ Pros
■ No need for actual devices
○ Cons
■ Require source code
■ False positives
4
Existing Methods (2/3)
● In-kernel page-fault based fault injection (PeriScope [NDSS’19])
○ Pros
■ Fine-grained monitoring
● MMIO and DMA region
○ Cons
■ OS-dependent
5
Device Driver
Kernel
Memory
Device memory region
Existing Methods (3/3)
● Hypervisor-based fault injection (FaultVisor, FaultVisor2 [SAC’16, CloudCom’18])
○ Pros
■ OS-independent
■ No need for source code
○ Cons
■ No DMA region support
6
Hypervisor
Device Driver
Memory
Device MMIO region
DMAFV
● Test DMA region using hypervisor-based fault injection
● Insight
○ Device holds DMA region information in its registers
7
Overview (1/2) DMA region detection
8
Hypervisor
Device Driver
DMA
Region
① Detect device’s DMA region by
consulting its registers
Memory
Device
Device MMIO register
Overview (2/2) Fault Injection
9
Hypervisor
Device Driver
DMA
Region
Memory
Device
② Perform fault injection by
trapping device driver’s memory
accesses to the DMA region
Device MMIO register
Example: NVMe device
● Use DMA-based command queues
● Addresses of queues are stored in device’s MMIO registers
○ ex) Admin command queue (ACQ) base address register
10
Memory ACQ
NVMe
ACQ
base
Prototype Implementation
● Hypervisor
○ BitVisor [VEE’09]
● Target Device
○ NVMe
● Implement NVMe’s command queue detector and fault injection scheme
11
Testing the Linux’s NVMe Device Driver
● Linux 4.20
● Fault injection during loading and
unloading device drivers
● DMAFV found a null-pointer
dereference
12
Overhead Evaluation (NVMe)
13
Future Work
● Automatic DMA region detection
● Test other OSs / hypervisors device drivers
14
Summary
● Checking values from devices in device drivers are crucial for security
● Existing methods lack OS-independent DMA-value tests
DMAFV:
● A novel way to test device drivers against DMA faults
○ Using hypervisor-based fault injection
○ Detect DMA region by consulting device’s registers
● Found a null pointer dereference bug in the Linux’s NVMe driver
15

More Related Content

Similar to DMAFV: Testing Device Drivers against DMA Faults

Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012
DefCamp
 
VMS Troubleshooting Guide
VMS Troubleshooting GuideVMS Troubleshooting Guide
VMS Troubleshooting Guide
Michael Dotson
 
Tolerating Hardware Device Failures in Software
Tolerating Hardware Device Failures in SoftwareTolerating Hardware Device Failures in Software
Tolerating Hardware Device Failures in Software
asimkadav
 
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Opersys inc.
 
SECURITY SOFTWARE RESOLIUTIONS (SSR) .docx
SECURITY SOFTWARE RESOLIUTIONS (SSR)                              .docxSECURITY SOFTWARE RESOLIUTIONS (SSR)                              .docx
SECURITY SOFTWARE RESOLIUTIONS (SSR) .docx
bagotjesusa
 

Similar to DMAFV: Testing Device Drivers against DMA Faults (20)

Unit 3 CO.pptx
Unit 3 CO.pptxUnit 3 CO.pptx
Unit 3 CO.pptx
 
Faults inside System Software
Faults inside System SoftwareFaults inside System Software
Faults inside System Software
 
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012
Hunting and Exploiting Bugs in Kernel Drivers - DefCamp 2012
 
Cloud Security with LibVMI
Cloud Security with LibVMICloud Security with LibVMI
Cloud Security with LibVMI
 
VMS Troubleshooting Guide
VMS Troubleshooting GuideVMS Troubleshooting Guide
VMS Troubleshooting Guide
 
Tolerating Hardware Device Failures in Software
Tolerating Hardware Device Failures in SoftwareTolerating Hardware Device Failures in Software
Tolerating Hardware Device Failures in Software
 
Towards Isolated Execution at the Machine Level
Towards Isolated Execution at the Machine LevelTowards Isolated Execution at the Machine Level
Towards Isolated Execution at the Machine Level
 
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
 
BMCArmor: A Hardware Protection Scheme for Bare-metal Clouds
BMCArmor: A Hardware Protection Scheme for Bare-metal CloudsBMCArmor: A Hardware Protection Scheme for Bare-metal Clouds
BMCArmor: A Hardware Protection Scheme for Bare-metal Clouds
 
Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...
Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...
Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...
 
Pcp
PcpPcp
Pcp
 
CPU Architecture
CPU ArchitectureCPU Architecture
CPU Architecture
 
SECURITY SOFTWARE RESOLIUTIONS (SSR) .docx
SECURITY SOFTWARE RESOLIUTIONS (SSR)                              .docxSECURITY SOFTWARE RESOLIUTIONS (SSR)                              .docx
SECURITY SOFTWARE RESOLIUTIONS (SSR) .docx
 
UWE Linux Boot Camp 2007: Hacking embedded Linux on the cheap
UWE Linux Boot Camp 2007: Hacking embedded Linux on the cheapUWE Linux Boot Camp 2007: Hacking embedded Linux on the cheap
UWE Linux Boot Camp 2007: Hacking embedded Linux on the cheap
 
Presentation1
Presentation1Presentation1
Presentation1
 
Inside Android's UI
Inside Android's UIInside Android's UI
Inside Android's UI
 
syzbot and the tale of million kernel bugs
syzbot and the tale of million kernel bugssyzbot and the tale of million kernel bugs
syzbot and the tale of million kernel bugs
 
Inside Android's UI / ABS 2013
Inside Android's UI / ABS 2013Inside Android's UI / ABS 2013
Inside Android's UI / ABS 2013
 
Embedded systems development Defcon 19
Embedded systems development Defcon 19Embedded systems development Defcon 19
Embedded systems development Defcon 19
 
Paper sharing_Edge based intrusion detection for IOT devices
Paper sharing_Edge based intrusion detection for IOT devicesPaper sharing_Edge based intrusion detection for IOT devices
Paper sharing_Edge based intrusion detection for IOT devices
 

More from Shinagawa Laboratory, The University of Tokyo

More from Shinagawa Laboratory, The University of Tokyo (9)

Deriving Optimal Deep Learning Models for Image-based Malware Classification
Deriving Optimal Deep Learning Models for Image-based Malware ClassificationDeriving Optimal Deep Learning Models for Image-based Malware Classification
Deriving Optimal Deep Learning Models for Image-based Malware Classification
 
遅延レイヤ取得による高互換コンテナ起動高速化手法
遅延レイヤ取得による高互換コンテナ起動高速化手法遅延レイヤ取得による高互換コンテナ起動高速化手法
遅延レイヤ取得による高互換コンテナ起動高速化手法
 
ライブマイグレーションにおけるサブページ書き込み保護の評価
ライブマイグレーションにおけるサブページ書き込み保護の評価ライブマイグレーションにおけるサブページ書き込み保護の評価
ライブマイグレーションにおけるサブページ書き込み保護の評価
 
A Robust and Flexible Operating System Compatibility Architecture
A Robust and Flexible Operating System Compatibility ArchitectureA Robust and Flexible Operating System Compatibility Architecture
A Robust and Flexible Operating System Compatibility Architecture
 
FaultVisor2: Testing Hypervisor Device Drivers against Real Hardware Failures
FaultVisor2: Testing Hypervisor Device Drivers against Real Hardware FailuresFaultVisor2: Testing Hypervisor Device Drivers against Real Hardware Failures
FaultVisor2: Testing Hypervisor Device Drivers against Real Hardware Failures
 
Distributed Denial of Service Attack Prevention at Source Machines
Distributed Denial of Service Attack Prevention at Source MachinesDistributed Denial of Service Attack Prevention at Source Machines
Distributed Denial of Service Attack Prevention at Source Machines
 
The Quick Migration of File Servers
The Quick Migration of File ServersThe Quick Migration of File Servers
The Quick Migration of File Servers
 
Unified Hardware Abstraction Layer with Device Masquerade
Unified Hardware Abstraction Layer with Device MasqueradeUnified Hardware Abstraction Layer with Device Masquerade
Unified Hardware Abstraction Layer with Device Masquerade
 
VM-aware Adaptive Storage Cache Prefetching
VM-aware Adaptive Storage Cache PrefetchingVM-aware Adaptive Storage Cache Prefetching
VM-aware Adaptive Storage Cache Prefetching
 

Recently uploaded

AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 

Recently uploaded (20)

AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 

DMAFV: Testing Device Drivers against DMA Faults

  • 1. DMAFV: Testing Device Drivers against DMA Faults ○Masanori Misono† , Toshiki Hatanaka, Takahiro Shinagawa The University of Tokyo The 37th ACM Symposium On Applied Computing (ACM SAC 2022), Apr 2022 † Currently at TU Munich
  • 2. Background (1/2) ● Device and device driver interaction ○ PIO/MMIO ○ DMA 2 Device Driver
  • 3. Background (2/2) ● Devices can be malfunction or even malicious ● Device drivers should check values from devices 3 Device Driver Anomaly values
  • 4. Existing Methods (1/3) ● Static Analysis / Symbolic Execution ○ Pros ■ No need for actual devices ○ Cons ■ Require source code ■ False positives 4
  • 5. Existing Methods (2/3) ● In-kernel page-fault based fault injection (PeriScope [NDSS’19]) ○ Pros ■ Fine-grained monitoring ● MMIO and DMA region ○ Cons ■ OS-dependent 5 Device Driver Kernel Memory Device memory region
  • 6. Existing Methods (3/3) ● Hypervisor-based fault injection (FaultVisor, FaultVisor2 [SAC’16, CloudCom’18]) ○ Pros ■ OS-independent ■ No need for source code ○ Cons ■ No DMA region support 6 Hypervisor Device Driver Memory Device MMIO region
  • 7. DMAFV ● Test DMA region using hypervisor-based fault injection ● Insight ○ Device holds DMA region information in its registers 7
  • 8. Overview (1/2) DMA region detection 8 Hypervisor Device Driver DMA Region ① Detect device’s DMA region by consulting its registers Memory Device Device MMIO register
  • 9. Overview (2/2) Fault Injection 9 Hypervisor Device Driver DMA Region Memory Device ② Perform fault injection by trapping device driver’s memory accesses to the DMA region Device MMIO register
  • 10. Example: NVMe device ● Use DMA-based command queues ● Addresses of queues are stored in device’s MMIO registers ○ ex) Admin command queue (ACQ) base address register 10 Memory ACQ NVMe ACQ base
  • 11. Prototype Implementation ● Hypervisor ○ BitVisor [VEE’09] ● Target Device ○ NVMe ● Implement NVMe’s command queue detector and fault injection scheme 11
  • 12. Testing the Linux’s NVMe Device Driver ● Linux 4.20 ● Fault injection during loading and unloading device drivers ● DMAFV found a null-pointer dereference 12
  • 14. Future Work ● Automatic DMA region detection ● Test other OSs / hypervisors device drivers 14
  • 15. Summary ● Checking values from devices in device drivers are crucial for security ● Existing methods lack OS-independent DMA-value tests DMAFV: ● A novel way to test device drivers against DMA faults ○ Using hypervisor-based fault injection ○ Detect DMA region by consulting device’s registers ● Found a null pointer dereference bug in the Linux’s NVMe driver 15