SlideShare una empresa de Scribd logo
1 de 24
Descargar para leer sin conexión
Drew Moseley
Solutions Architect
Mender.io
Software Updates for Connected Devices
Key Considerations
Session overview
1. Survey: state of updating embedded software today
○ 30+ interviews
2. Environment and criteria for embedded updater
3. Solution strategies for updating embedded devices
About me
Drew Moseley
○ 10 years in Embedded Linux/Yocto development.
○ Longer than that in general Embedded Software.
○ Project Lead and Solutions Architect.
drew.moseley@mender.io
https://twitter.com/drewmoseley
https://www.linkedin.com/in/drewmoseley/
https://twitter.com/mender_io
Mender.io
○ Over-the-air updater for Embedded Linux
○ Open source (Apache License, v2)
○ Dual A/B rootfs layout (client)
○ Remote deployment management (server)
○ Under active development
Connected devices must be remotely updatable
● There will be bugs, vulnerabilities
○ 1-25 per 1000 lines of code*
● … and new features
● … after device is deployed to the field
*Source: Steve McConnell, Code Complete
Critical- and high-severity security bugs in Linux
Source: Ars Technica
● Power loss during update
○ Atomic?
○ Automated rollback?
● Secure communication
● Signed updates
● Homegrown seems easy
○ Is it really? (hint: no)
Tesla hacked by security researchers
in September 2016
“Cryptographic validation of firmware
updates is something we’ve wanted to do
for a while[…]” - Tesla’s CTO JB Straubel
Vulnerability in Deutsche Telekom’s updater exploited
https://krebsonsecurity.com/2016/11/new-mirai-worm-knocks-900k-germans-offline/
We need robust and secure OTA updates
Do you deploy updates today? How?
Includes one-by-one (standalone)
Image-based or package-based deployment?
● “Atomic”
● “Consistent”
● “Fast installation”
● “Easy to develop”
● “Uses less bandwidth”
Development time and frequency of use
● Q: How long did you spend for initial development for homegrown updater?
○ A: 3-6 months
○ Maintenance time additional
● Q: How frequently do you deploy remote updates?
○ A: 6 times / year
● Bottom line: most systems need improvements
○ Interest in OTA has picked up
○ Internet of Things “IoT” is the biggest driver
The embedded environment
● Remote
○ Expensive to reach physically
● Long expected lifetime
○ 5 - 10 years
● Unreliable power
○ Battery
○ Suddenly unplugged
● Unreliable network
○ Intermittent connectivity
○ Low bandwidth
○ Insecure
What can
go wrong?
Network requirements are different than for smartphone
B
A
N
D
W
I
D
T
H
● Low cost
○ Hardware
○ Data transfer
● Small size
● Low data speed
● High connectivity
$30
$700
● Expensive
● High data speed
● 3G, 4G, 5G, wifi
Key criteria for embedded updates
1. Robust and secure
2. Integrates with existing
environments
3. Easy to get started
4. Bandwidth consumption
5. Downtime during update
1. Robust and secure
Drivers:
● Power or network loss any time
● Hostile deployment
environment
Requirements:
● Atomic installation
● Consistent deployments across
devices
● Sanity check after update
● Ensure authenticity of update
2. Integrates with existing environments
Drivers:
● Add OTA capability to existing projects
● Device specific use cases
● Overcome developer resistance
Requirements:
● Easy to integrate
● Standalone and managed mode
● Extensible
○ Plugins for custom actions
○ Custom installers
○ Multiple architectures and Operating Systems
○ Users & System designers can control the workflow
3. Easy to get started
Drivers:
● Quick to get started
● Overcome developer resistance
Requirements:
● Reference implementation
● Test reports
● Continuous Integration (publicly available?)
● Case studies
● Good documentation
4 & 5. Bandwidth & downtime during update
Drivers:
● Network expense
● User frustration
Requirements:
● Generally lower is better
● Customizable polling
interval
● Maintenance windows
● Low CPU overhead
Generic embedded updater workflow
Detect update
(secure channel)
Download
(secure channel)
Integrity
(e.g. checksum)
Authenticate
(e.g. signature)
DecryptExtract
Install Failure recovery
(e.g. roll back)
Compatibility
check
Sanity checks
Post-install
actions
Pre-install
actions
Must-have
Environment-specificChoose a
strategy
(re)Start*
*E.g. reboot, restart service, start container
Installer Strategies (1/4)
In-place Installation: Updater deploys
to a running environment
1. Robust and secure - poor
○ Atomicity: difficult or impossible
○ Consistency: difficult
2. Integrates with existing
environments - good
○ Packages provided by distribution
○ Scripting for building packages
3. Easy to get started - good
○ Tightly integrated with distribution
4. Bandwidth consumption - good
○ Transfers only updated files
5. Downtime - good
Bootloader
Kernel, initramfs
User space
Updater
Installer strategies (2/4)
Asymmetric maintenance mode
1. Robust and secure - poor
○ Atomicity requires extra work
○ Consistency: good on successful update
2. Integrates with existing environments -
fair
○ No runtime modification
○ Requires boot loader modifications
3. Easy to get started - fair
○ Requires extensive boot loader modifications
4. Bandwidth consumption* - poor
○ Full image
○ Two transfers in the case of roll-back
5. Downtime - poor
○ System is down during update.
○ Two updates in the case of roll-back
Bootloader
Kernel, initramfs
User space
Updater
*Can mitigate: compressed/delta
Installer strategies 3/4
Symmetric dual A/B rootfs
1. Robust and secure - good
○ Fully atomic and consistent
2. Integrates with existing environments -
fair
○ OS, kernel, apps unchanged
○ 2x rootfs storage
○ Runtime client needed
○ Minor boot loader modifications
3. Easy to get started - good
○ Application/system code unchanged
4. Bandwidth consumption* - poor
○ Full image
○ Only one transfer even with roll-back
5. Downtime - good
○ Asynchronous Install
○ 1 reboot downtime (or 2 with roll-back)
Bootloader
Kernel,
initramfs A
User space A
Updater A
*Can mitigate: compressed/delta
User space B
Kernel,
initramfs B
Updater B
Installer strategies 4/4
Gateway
Remote device
(sensor, ECU, etc.)
Updater
Gateway device acts as proxy
● Different scenario
○ Smaller devices (no client)
○ Complements other
strategies
● Local installations (ie not
internet based).
● Gateway must handle
robustness and security
Comparison of installer strategies
1. In-place 2. Boot to
maintenance mode
3. Dual A/B rootfs
Atomic/Consistent
Workflow integration
Bandwidth
Downtime
Deployment - Managed Mode
● Centrally manage remote devices
○ Reporting
○ Scalability
○ Integration with device
management infrastructure
● Operator connects to and controls
clients
○ Device groupings
○ Campaign management
Ensure your devices can be updated remotely
● Rest assured you can fix that
undiscovered bug!
● Consider your update strategy
early in your design cycle
● Choose installer strategy that fits
your environment the best
● Use third party or open source
tools where possible
○ Home grown is more difficult
than it seems
Thank You!
Q&A
@drewmoseley
https://mender.io
drew.moseley@mender.io

Más contenido relacionado

La actualidad más candente

Andy Davis' Black Hat USA Presentation Revealing embedded fingerprints
Andy Davis' Black Hat USA Presentation Revealing embedded fingerprintsAndy Davis' Black Hat USA Presentation Revealing embedded fingerprints
Andy Davis' Black Hat USA Presentation Revealing embedded fingerprints
NCC Group
 
Distributech_Presentation DTECH_2013
Distributech_Presentation DTECH_2013Distributech_Presentation DTECH_2013
Distributech_Presentation DTECH_2013
Dorian Hernandez
 

La actualidad más candente (20)

Free OpManager training_Part 1- Discovery & classification
Free OpManager training_Part 1- Discovery & classificationFree OpManager training_Part 1- Discovery & classification
Free OpManager training_Part 1- Discovery & classification
 
Identify and mitigate high risk port vulnerabilities
Identify and mitigate high risk port vulnerabilitiesIdentify and mitigate high risk port vulnerabilities
Identify and mitigate high risk port vulnerabilities
 
Cloud Architecture
Cloud ArchitectureCloud Architecture
Cloud Architecture
 
Network Management (CEN166) Project Presentation By Matthew Utin
Network Management (CEN166) Project Presentation By Matthew UtinNetwork Management (CEN166) Project Presentation By Matthew Utin
Network Management (CEN166) Project Presentation By Matthew Utin
 
Monitoring network performance- Part 3_Free OpManager training
Monitoring network performance- Part 3_Free OpManager training Monitoring network performance- Part 3_Free OpManager training
Monitoring network performance- Part 3_Free OpManager training
 
Free OpManager training_ Part 2-server monitoring
Free OpManager training_ Part 2-server monitoringFree OpManager training_ Part 2-server monitoring
Free OpManager training_ Part 2-server monitoring
 
DHS ICS Security Presentation
DHS ICS Security PresentationDHS ICS Security Presentation
DHS ICS Security Presentation
 
Wireshark
WiresharkWireshark
Wireshark
 
Andy Davis' Black Hat USA Presentation Revealing embedded fingerprints
Andy Davis' Black Hat USA Presentation Revealing embedded fingerprintsAndy Davis' Black Hat USA Presentation Revealing embedded fingerprints
Andy Davis' Black Hat USA Presentation Revealing embedded fingerprints
 
Distributech_Presentation DTECH_2013
Distributech_Presentation DTECH_2013Distributech_Presentation DTECH_2013
Distributech_Presentation DTECH_2013
 
Firewall and IPtables
Firewall and IPtablesFirewall and IPtables
Firewall and IPtables
 
Tcp ip management & security
Tcp ip management & securityTcp ip management & security
Tcp ip management & security
 
CNIT 125 Ch 5 Communication & Network Security (part 2 of 2)
CNIT 125 Ch 5 Communication & Network Security (part 2 of 2)CNIT 125 Ch 5 Communication & Network Security (part 2 of 2)
CNIT 125 Ch 5 Communication & Network Security (part 2 of 2)
 
Wireshark Basic Presentation
Wireshark Basic PresentationWireshark Basic Presentation
Wireshark Basic Presentation
 
Industrial Control System Security Overview
Industrial Control System Security OverviewIndustrial Control System Security Overview
Industrial Control System Security Overview
 
Bettercap
BettercapBettercap
Bettercap
 
Server Hardening Primer - Eric Vanderburg - JURINNOV
Server Hardening Primer - Eric Vanderburg - JURINNOVServer Hardening Primer - Eric Vanderburg - JURINNOV
Server Hardening Primer - Eric Vanderburg - JURINNOV
 
Wireshark
WiresharkWireshark
Wireshark
 
MITM Attacks with Ettercap : TTU CyberEagles Club
MITM Attacks with Ettercap : TTU CyberEagles ClubMITM Attacks with Ettercap : TTU CyberEagles Club
MITM Attacks with Ettercap : TTU CyberEagles Club
 
Firewall
FirewallFirewall
Firewall
 

Similar a Software Updates for Connected Devices - OSCON 2018

Similar a Software Updates for Connected Devices - OSCON 2018 (20)

Mender; the open-source software update solution
Mender; the open-source software update solutionMender; the open-source software update solution
Mender; the open-source software update solution
 
Mender: The open-source software update solution
Mender: The open-source software update solutionMender: The open-source software update solution
Mender: The open-source software update solution
 
Deploy Eclipse hawBit in Production
Deploy Eclipse hawBit in ProductionDeploy Eclipse hawBit in Production
Deploy Eclipse hawBit in Production
 
Iot development from prototype to production
Iot development from prototype to productionIot development from prototype to production
Iot development from prototype to production
 
IoT Development from Prototype to Production
IoT Development from Prototype to ProductionIoT Development from Prototype to Production
IoT Development from Prototype to Production
 
Mender.io | Securing the Connected Car
Mender.io | Securing the Connected CarMender.io | Securing the Connected Car
Mender.io | Securing the Connected Car
 
Last Conference 2017: Big Data in a Production Environment: Lessons Learnt
Last Conference 2017: Big Data in a Production Environment: Lessons LearntLast Conference 2017: Big Data in a Production Environment: Lessons Learnt
Last Conference 2017: Big Data in a Production Environment: Lessons Learnt
 
Why the yocto project for my io t project elc_edinburgh_2018
Why the yocto project for my io t project elc_edinburgh_2018Why the yocto project for my io t project elc_edinburgh_2018
Why the yocto project for my io t project elc_edinburgh_2018
 
The ultimate guide to software updates on embedded linux devices
The ultimate guide to software updates on embedded linux devicesThe ultimate guide to software updates on embedded linux devices
The ultimate guide to software updates on embedded linux devices
 
PLNOG19 - Piotr Marecki - Espresso: Scalable and Programmable Peering Edge
 PLNOG19 - Piotr Marecki - Espresso: Scalable and Programmable Peering Edge PLNOG19 - Piotr Marecki - Espresso: Scalable and Programmable Peering Edge
PLNOG19 - Piotr Marecki - Espresso: Scalable and Programmable Peering Edge
 
IoT: Contrasting Yocto/Buildroot to binary OSes
IoT: Contrasting Yocto/Buildroot to binary OSesIoT: Contrasting Yocto/Buildroot to binary OSes
IoT: Contrasting Yocto/Buildroot to binary OSes
 
Securing the Connected Car - SCaLE 2018
Securing the Connected Car - SCaLE 2018Securing the Connected Car - SCaLE 2018
Securing the Connected Car - SCaLE 2018
 
Rise of the machines: Continuous Delivery at SEEK - YOW! Night Summary Slides
Rise of the machines: Continuous Delivery at SEEK - YOW! Night Summary SlidesRise of the machines: Continuous Delivery at SEEK - YOW! Night Summary Slides
Rise of the machines: Continuous Delivery at SEEK - YOW! Night Summary Slides
 
Strategies for developing and deploying your embedded applications and images
Strategies for developing and deploying your embedded applications and imagesStrategies for developing and deploying your embedded applications and images
Strategies for developing and deploying your embedded applications and images
 
OpenFlow @ Google
OpenFlow @ GoogleOpenFlow @ Google
OpenFlow @ Google
 
NTTドコモ様 導入事例 OpenStack Summit 2016 Barcelona 講演「Expanding and Deepening NTT D...
NTTドコモ様 導入事例 OpenStack Summit 2016 Barcelona 講演「Expanding and Deepening NTT D...NTTドコモ様 導入事例 OpenStack Summit 2016 Barcelona 講演「Expanding and Deepening NTT D...
NTTドコモ様 導入事例 OpenStack Summit 2016 Barcelona 講演「Expanding and Deepening NTT D...
 
How to Monitor DOCSIS Devices Using SNMP, InfluxDB, and Telegraf
How to Monitor DOCSIS Devices Using SNMP, InfluxDB, and TelegrafHow to Monitor DOCSIS Devices Using SNMP, InfluxDB, and Telegraf
How to Monitor DOCSIS Devices Using SNMP, InfluxDB, and Telegraf
 
Software update for IoT: the current state of play
Software update for IoT: the current state of playSoftware update for IoT: the current state of play
Software update for IoT: the current state of play
 
GRANT DELP724
GRANT DELP724GRANT DELP724
GRANT DELP724
 
Software update for IoT Embedded World 2017
Software update for IoT Embedded World 2017Software update for IoT Embedded World 2017
Software update for IoT Embedded World 2017
 

Más de Mender.io

Más de Mender.io (10)

A million ways to provision embedded linux devices
A million ways to provision embedded linux devicesA million ways to provision embedded linux devices
A million ways to provision embedded linux devices
 
Embedded linux build systems
Embedded linux build systems  Embedded linux build systems
Embedded linux build systems
 
Integrate IoT cloud analytics and over the-air (ota) updates with google and ...
Integrate IoT cloud analytics and over the-air (ota) updates with google and ...Integrate IoT cloud analytics and over the-air (ota) updates with google and ...
Integrate IoT cloud analytics and over the-air (ota) updates with google and ...
 
Configuring wifi in open embedded builds
Configuring wifi in open embedded buildsConfiguring wifi in open embedded builds
Configuring wifi in open embedded builds
 
IoT Prototyping using BBB and Debian
IoT Prototyping using BBB and DebianIoT Prototyping using BBB and Debian
IoT Prototyping using BBB and Debian
 
Linux IOT Botnet Wars and the Lack of Basic Security Hardening - OSCON 2018
Linux IOT Botnet Wars and the Lack of Basic Security Hardening - OSCON 2018Linux IOT Botnet Wars and the Lack of Basic Security Hardening - OSCON 2018
Linux IOT Botnet Wars and the Lack of Basic Security Hardening - OSCON 2018
 
Embedded Linux Build Systems - Texas Linux Fest 2018
Embedded Linux Build Systems - Texas Linux Fest 2018Embedded Linux Build Systems - Texas Linux Fest 2018
Embedded Linux Build Systems - Texas Linux Fest 2018
 
Linux IoT Botnet Wars - ESC Boston 2018
Linux IoT Botnet Wars - ESC Boston 2018Linux IoT Botnet Wars - ESC Boston 2018
Linux IoT Botnet Wars - ESC Boston 2018
 
Linux IoT Botnet Wars and the lack of basic security hardening
Linux IoT Botnet Wars and the lack of basic security hardeningLinux IoT Botnet Wars and the lack of basic security hardening
Linux IoT Botnet Wars and the lack of basic security hardening
 
Mender.io | Develop embedded applications faster | Comparing C and Golang
Mender.io | Develop embedded applications faster | Comparing C and GolangMender.io | Develop embedded applications faster | Comparing C and Golang
Mender.io | Develop embedded applications faster | Comparing C and Golang
 

Último

%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 

Último (20)

WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
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
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
%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
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 

Software Updates for Connected Devices - OSCON 2018

  • 1. Drew Moseley Solutions Architect Mender.io Software Updates for Connected Devices Key Considerations
  • 2. Session overview 1. Survey: state of updating embedded software today ○ 30+ interviews 2. Environment and criteria for embedded updater 3. Solution strategies for updating embedded devices
  • 3. About me Drew Moseley ○ 10 years in Embedded Linux/Yocto development. ○ Longer than that in general Embedded Software. ○ Project Lead and Solutions Architect. drew.moseley@mender.io https://twitter.com/drewmoseley https://www.linkedin.com/in/drewmoseley/ https://twitter.com/mender_io Mender.io ○ Over-the-air updater for Embedded Linux ○ Open source (Apache License, v2) ○ Dual A/B rootfs layout (client) ○ Remote deployment management (server) ○ Under active development
  • 4. Connected devices must be remotely updatable ● There will be bugs, vulnerabilities ○ 1-25 per 1000 lines of code* ● … and new features ● … after device is deployed to the field *Source: Steve McConnell, Code Complete Critical- and high-severity security bugs in Linux Source: Ars Technica
  • 5. ● Power loss during update ○ Atomic? ○ Automated rollback? ● Secure communication ● Signed updates ● Homegrown seems easy ○ Is it really? (hint: no) Tesla hacked by security researchers in September 2016 “Cryptographic validation of firmware updates is something we’ve wanted to do for a while[…]” - Tesla’s CTO JB Straubel Vulnerability in Deutsche Telekom’s updater exploited https://krebsonsecurity.com/2016/11/new-mirai-worm-knocks-900k-germans-offline/ We need robust and secure OTA updates
  • 6. Do you deploy updates today? How? Includes one-by-one (standalone)
  • 7. Image-based or package-based deployment? ● “Atomic” ● “Consistent” ● “Fast installation” ● “Easy to develop” ● “Uses less bandwidth”
  • 8. Development time and frequency of use ● Q: How long did you spend for initial development for homegrown updater? ○ A: 3-6 months ○ Maintenance time additional ● Q: How frequently do you deploy remote updates? ○ A: 6 times / year ● Bottom line: most systems need improvements ○ Interest in OTA has picked up ○ Internet of Things “IoT” is the biggest driver
  • 9. The embedded environment ● Remote ○ Expensive to reach physically ● Long expected lifetime ○ 5 - 10 years ● Unreliable power ○ Battery ○ Suddenly unplugged ● Unreliable network ○ Intermittent connectivity ○ Low bandwidth ○ Insecure What can go wrong?
  • 10. Network requirements are different than for smartphone B A N D W I D T H ● Low cost ○ Hardware ○ Data transfer ● Small size ● Low data speed ● High connectivity $30 $700 ● Expensive ● High data speed ● 3G, 4G, 5G, wifi
  • 11. Key criteria for embedded updates 1. Robust and secure 2. Integrates with existing environments 3. Easy to get started 4. Bandwidth consumption 5. Downtime during update
  • 12. 1. Robust and secure Drivers: ● Power or network loss any time ● Hostile deployment environment Requirements: ● Atomic installation ● Consistent deployments across devices ● Sanity check after update ● Ensure authenticity of update
  • 13. 2. Integrates with existing environments Drivers: ● Add OTA capability to existing projects ● Device specific use cases ● Overcome developer resistance Requirements: ● Easy to integrate ● Standalone and managed mode ● Extensible ○ Plugins for custom actions ○ Custom installers ○ Multiple architectures and Operating Systems ○ Users & System designers can control the workflow
  • 14. 3. Easy to get started Drivers: ● Quick to get started ● Overcome developer resistance Requirements: ● Reference implementation ● Test reports ● Continuous Integration (publicly available?) ● Case studies ● Good documentation
  • 15. 4 & 5. Bandwidth & downtime during update Drivers: ● Network expense ● User frustration Requirements: ● Generally lower is better ● Customizable polling interval ● Maintenance windows ● Low CPU overhead
  • 16. Generic embedded updater workflow Detect update (secure channel) Download (secure channel) Integrity (e.g. checksum) Authenticate (e.g. signature) DecryptExtract Install Failure recovery (e.g. roll back) Compatibility check Sanity checks Post-install actions Pre-install actions Must-have Environment-specificChoose a strategy (re)Start* *E.g. reboot, restart service, start container
  • 17. Installer Strategies (1/4) In-place Installation: Updater deploys to a running environment 1. Robust and secure - poor ○ Atomicity: difficult or impossible ○ Consistency: difficult 2. Integrates with existing environments - good ○ Packages provided by distribution ○ Scripting for building packages 3. Easy to get started - good ○ Tightly integrated with distribution 4. Bandwidth consumption - good ○ Transfers only updated files 5. Downtime - good Bootloader Kernel, initramfs User space Updater
  • 18. Installer strategies (2/4) Asymmetric maintenance mode 1. Robust and secure - poor ○ Atomicity requires extra work ○ Consistency: good on successful update 2. Integrates with existing environments - fair ○ No runtime modification ○ Requires boot loader modifications 3. Easy to get started - fair ○ Requires extensive boot loader modifications 4. Bandwidth consumption* - poor ○ Full image ○ Two transfers in the case of roll-back 5. Downtime - poor ○ System is down during update. ○ Two updates in the case of roll-back Bootloader Kernel, initramfs User space Updater *Can mitigate: compressed/delta
  • 19. Installer strategies 3/4 Symmetric dual A/B rootfs 1. Robust and secure - good ○ Fully atomic and consistent 2. Integrates with existing environments - fair ○ OS, kernel, apps unchanged ○ 2x rootfs storage ○ Runtime client needed ○ Minor boot loader modifications 3. Easy to get started - good ○ Application/system code unchanged 4. Bandwidth consumption* - poor ○ Full image ○ Only one transfer even with roll-back 5. Downtime - good ○ Asynchronous Install ○ 1 reboot downtime (or 2 with roll-back) Bootloader Kernel, initramfs A User space A Updater A *Can mitigate: compressed/delta User space B Kernel, initramfs B Updater B
  • 20. Installer strategies 4/4 Gateway Remote device (sensor, ECU, etc.) Updater Gateway device acts as proxy ● Different scenario ○ Smaller devices (no client) ○ Complements other strategies ● Local installations (ie not internet based). ● Gateway must handle robustness and security
  • 21. Comparison of installer strategies 1. In-place 2. Boot to maintenance mode 3. Dual A/B rootfs Atomic/Consistent Workflow integration Bandwidth Downtime
  • 22. Deployment - Managed Mode ● Centrally manage remote devices ○ Reporting ○ Scalability ○ Integration with device management infrastructure ● Operator connects to and controls clients ○ Device groupings ○ Campaign management
  • 23. Ensure your devices can be updated remotely ● Rest assured you can fix that undiscovered bug! ● Consider your update strategy early in your design cycle ● Choose installer strategy that fits your environment the best ● Use third party or open source tools where possible ○ Home grown is more difficult than it seems