Operating Systems 2026F Lecture 19: Difference between revisions

From Soma-notes
Created page with "==Video== Video from the lectures given on November 26th and 27th, 2026 are now available: * [https://homeostasis.scs.carleton.ca/~soma/os-2026f/lectures/comp3000-2026f-lec19a-20261126.mp4 Lecture 19A] * [https://homeostasis.scs.carleton.ca/~soma/os-2026f/lectures/comp3000-2026f-lec19b-20261127.mp4 Lecture 19B] ==Notes== ===Lecture 19A=== <pre> </pre> ===Lecture 19B=== <pre> </pre>"
 
 
(One intermediate revision by the same user not shown)
Line 10: Line 10:


<pre>
<pre>
Lecture 19A
-----------
Security, Operating Systems, and AI
Threat models
- every defense assumes a certain kind of offense
So you need to know what you are protecting yourself from
T1: Paying customers of compute time
- shared computer
- each user's usage was billed
- assumption: everyone was an employee and basically trustworthy
Here's where we get user accounts, user quotas
- passwords could be very weak, often shared
This is the world of mainframes (1960's)
T2: Users who share a computer
- everyone is basically trustworthy
- don't care about usage, will yell at users
  who are using too much
- copied mainframe user accounts
- made up really simple file permissions
    - needed to be efficient
- but didn't bother with the accounting
Where do we start getting REAL operating system security?
- the military & intelligence organizations
  wanted to use computers to do sensitive operations
- but they had to share computers because they were expensive
- worried about malicious users (spies), making sure
  users had limited access
When dealing with classified information, it should be possible for higher classification levels to access lower classification levels, but not vice versa
- sharing only goes one way
So what do you need to support classified data?
- some way of labeling data appropriately (fancier permissions)
- need to also make sure existing access controls cannot be bypassed
Trusted computer base (TCB)
- the part of the computer system that has to function correctly
  for security properties to hold
So how do you make sure the TCB is secure?
- make it as small as possible
- make sure only trustworthy people can change it
  (development and in production)
- at the highest levels, formal verification
  - prove the TCB is secure (in some model)
In practice, the systems with the most trustworthy TCBs never really got deployed. They existed, but
- were very expensive
- very painful to use (poor usability)
- didn't run the right software
What happened instead is the government, just like everyone else, started using commercial off-the-shelf software (COTS)
- i.e., Windows
So when did the world start taking computer security seriously
(sort of?)
- when the web took off!
Heard of the Morris worm? was before the Web, and didn't really change the world of computer security
- but the web did
- especially with e-commerce
So how did we start securing the Internet?
One big one was firewalls
- both for organizations and for individual computers
What is a firewall?
- mechanism to block certain kinds of network traffic
Operating systems got them built-in, but also were put on networks as appliances
But why did we need firewalls in the first place?
- because network protocols from the 1980's and early 90's
  assumed the network was trustworthy
  - because they were mostly LANs
Windows (used to?) have a service called WinPopup
- anyone on the network could pop up a window on your screen
But firewalls were not enough!
We got encryption
- TLS, ssh
But that wasn't enough either
- secure communications, but not secure systems
What about malicious code?
- was a problem from before the Internet
To address malicious code, we developed anti-malware systems
- "antivirus" initially, but have become more general
- they just can stop known types of malware
What about when new malware comes out?
- update the signatures!
But again, not enough. So what did we do?
Patch the vulnerabilities!
- and we did!
Modern Windows is pretty darn secure...except that regular users can install whatever they want
- and the operating system will let them change things
  that shouldn't be changed
So what did we really change to make systems more secure?
- we took away control from users
This has happened in embedded systems and in smartphones (and some tablets)
- Android, iOS
Both Android and iOS are very UNIX-like underneath
- Android has Linux, iOS has Mach/XNU from macOS
- HOWEVER, the security policies are very very different
Regular users can't install any software they want
- all software must have the right digital signature
- and the user can't decide which signatures are trustworthy
And how do we make sure only the "right" software runs?
- trusted computing
Trusted computing is just
- patch all the bugs
- implement protections againt certain classes of bugs
  (mainly memory corruption)
- only run signed code, from boot time onwards
  - check the signatures all the time
So are we secure? Not really!
- bugs still exist because code is complex and keeps changing
- and people can still be exploited from within the systems
  we've created
In many ways, secure computing has created solutions that are a bad or worse than the problems they were meant to address
- end users don't control the devices they own
- those devices operate without their interests in mind
  (violate privacy routinely)
- and there's nothing end users can do about it
So where does AI come into this?
- breaking the old paradigm of patching vulnerabilities
- not offering any new path forward
How do you deal with adaptive adversaries with arbitrary amount of resources?
First, try to learn from systems that deal with similar problems
- living systems, i.e. biology
But also embrace what AI brings
- custom software!
</pre>
</pre>


Line 15: Line 179:


<pre>
<pre>
Lecture 19B
-----------
Security & Operating systems
- bit of a history
- from the perspective of threat models
Computer security started with time sharing systems
- people sharing computers at the same time brought risks
UNIX is definitely not the oldest time-sharing system
- its name is a play off of MULTICS
Early time sharing systems assumed users were mostly benign
- wanted to stop accidental interference rather than
  malicious activity
- but some systems did care about accounting
UNIX was not designed to have strong security
- was meant for sharing surplus computers amongst colleagues
Computer security became a thing when government agencies got interested in them
- intelligence, military
Problem for them was sharing computing resources involved risks
- especially for classified data, which they wanted to analyze
- how to allow high privilege (classification) users access less privileged data, but not vice versa?
So big concern was how can we make systems that will faithfully implement security policies?
Invented the notion of a trusted computer base (TCB)
- part of the system that must work correctly for
  security policies to be faithfully enforced
How can we get a secure TCB?
- make it as small as possible
- make sure it is developed by trustworthy individuals
- ideally, formally verify its properties
  (with respect to some model)
High assurance systems were a failure in the marketplace
- too expensive
- hard to use
- lacked functionality
So even with compromises (going from the Orange Book to the Common Criteria), assurance standards really didn't push the state of the art.
- government moved to commercial off-the-shelf software
  (COTS), e.g., Windows
What did was real problems. Which came when the Internet took off with the development of the World Wide Web starting in 1993.
Work on the Internet started in the 1970's, but was more of a niche thing for academics and some parts of the government. Commercial interest came with the Web
The Internet changed the equation because now computers were interacting with untrustworthy entities, and there came the motivation: money.
- e-commerce
But the signs there were issues started before this.
- Morris worm (1988)
But it was things like Code Red and SQL Slammer worms that made people really pay attention
So what were the solutions? Depended on the problem
Insecure network services? Firewalls!
- all kinds of network protocols developed for LANs
  didn't make sense on WANs (the Internet)
WinPopup shouldn't be exposed to the Internet
Network and host-based firewalls mostly block applications
that aren't ready for untrusted input
How do we stop malicious software?
- was a problem before networking, networking just made it worse
- anti-malware software detects and blocks known forms of malware
And what about software vulnerabilities?
- we patch, fast!
And we developed cryptography
- untrustworthy networks
- SSL->TLS, ssh
But cryptography didn't stop attacks, and then we had to deal with attacks on the cryptography itself
We also developed technologies to make it harder to compromise computers, i.e., ways to "harden" systems
- mostly to stop code injection attacks
- ASLR, no-execute memory
So Windows, despite its origins, is very secure from a software engineering perspective
- but users are allowed to install whatever they want
What has replaced this is locked down systems
- embedded systems
- smartphone operating systems (Android, iOS)
In other words, we get trusted computing + sandboxing
- signed code all the way up from the bootloader
- apps isolated from each other
And even with all of this, systems still get compromised all the time
So what's the path forward?
We need fundamentally different approaches
Realize vulnerabilities only matter because they are widespread
- the fault is COTS
How could you change this? with AI enabling custom code!
- get specialization & diversity
And we need adaptive defenses
- and this isn't AI necessarily
- it is more about feedback loops
  - systems watching themselves, each other
  - knowing what is "normal" rather than outright malicious
Computers need to get better at deciding who and what to trust
- without just delegating that decision to people
</pre>
</pre>

Latest revision as of 16:53, 27 November 2026

Video

Video from the lectures given on November 26th and 27th, 2026 are now available:

Notes

Lecture 19A

Lecture 19A
-----------

Security, Operating Systems, and AI

Threat models
 - every defense assumes a certain kind of offense

So you need to know what you are protecting yourself from

T1: Paying customers of compute time
 - shared computer
 - each user's usage was billed
 - assumption: everyone was an employee and basically trustworthy

Here's where we get user accounts, user quotas
 - passwords could be very weak, often shared

This is the world of mainframes (1960's)


T2: Users who share a computer
 - everyone is basically trustworthy
 - don't care about usage, will yell at users
   who are using too much

 - copied mainframe user accounts
 - made up really simple file permissions
    - needed to be efficient
 - but didn't bother with the accounting


Where do we start getting REAL operating system security?
 - the military & intelligence organizations
   wanted to use computers to do sensitive operations
 - but they had to share computers because they were expensive
 - worried about malicious users (spies), making sure
   users had limited access

When dealing with classified information, it should be possible for higher classification levels to access lower classification levels, but not vice versa
 - sharing only goes one way

So what do you need to support classified data?
 - some way of labeling data appropriately (fancier permissions)
 - need to also make sure existing access controls cannot be bypassed

Trusted computer base (TCB)
 - the part of the computer system that has to function correctly
   for security properties to hold

So how do you make sure the TCB is secure?
 - make it as small as possible
 - make sure only trustworthy people can change it
   (development and in production)
 - at the highest levels, formal verification
   - prove the TCB is secure (in some model)

In practice, the systems with the most trustworthy TCBs never really got deployed. They existed, but
 - were very expensive
 - very painful to use (poor usability)
 - didn't run the right software

What happened instead is the government, just like everyone else, started using commercial off-the-shelf software (COTS)
 - i.e., Windows

So when did the world start taking computer security seriously
(sort of?)
 - when the web took off!

Heard of the Morris worm? was before the Web, and didn't really change the world of computer security
 - but the web did
 - especially with e-commerce

So how did we start securing the Internet?

One big one was firewalls
 - both for organizations and for individual computers

What is a firewall?
 - mechanism to block certain kinds of network traffic

Operating systems got them built-in, but also were put on networks as appliances

But why did we need firewalls in the first place?
 - because network protocols from the 1980's and early 90's
   assumed the network was trustworthy
   - because they were mostly LANs

Windows (used to?) have a service called WinPopup
 - anyone on the network could pop up a window on your screen

But firewalls were not enough!

We got encryption
 - TLS, ssh

But that wasn't enough either
 - secure communications, but not secure systems

What about malicious code?
 - was a problem from before the Internet

To address malicious code, we developed anti-malware systems
 - "antivirus" initially, but have become more general
 - they just can stop known types of malware

What about when new malware comes out?
 - update the signatures!

But again, not enough. So what did we do?

Patch the vulnerabilities!
 - and we did!

Modern Windows is pretty darn secure...except that regular users can install whatever they want
 - and the operating system will let them change things
   that shouldn't be changed

So what did we really change to make systems more secure?
 - we took away control from users

This has happened in embedded systems and in smartphones (and some tablets)
 - Android, iOS

Both Android and iOS are very UNIX-like underneath
 - Android has Linux, iOS has Mach/XNU from macOS
 - HOWEVER, the security policies are very very different

Regular users can't install any software they want
 - all software must have the right digital signature
 - and the user can't decide which signatures are trustworthy

And how do we make sure only the "right" software runs?
 - trusted computing

Trusted computing is just
 - patch all the bugs
 - implement protections againt certain classes of bugs
   (mainly memory corruption)
 - only run signed code, from boot time onwards
   - check the signatures all the time

So are we secure? Not really!
 - bugs still exist because code is complex and keeps changing
 - and people can still be exploited from within the systems
   we've created

In many ways, secure computing has created solutions that are a bad or worse than the problems they were meant to address
 - end users don't control the devices they own
 - those devices operate without their interests in mind
   (violate privacy routinely)
 - and there's nothing end users can do about it

So where does AI come into this?
 - breaking the old paradigm of patching vulnerabilities
 - not offering any new path forward

How do you deal with adaptive adversaries with arbitrary amount of resources?

First, try to learn from systems that deal with similar problems
 - living systems, i.e. biology

But also embrace what AI brings
 - custom software!

Lecture 19B

Lecture 19B
-----------

Security & Operating systems
 - bit of a history
 - from the perspective of threat models

Computer security started with time sharing systems
 - people sharing computers at the same time brought risks

UNIX is definitely not the oldest time-sharing system
 - its name is a play off of MULTICS

Early time sharing systems assumed users were mostly benign
 - wanted to stop accidental interference rather than
   malicious activity
 - but some systems did care about accounting

UNIX was not designed to have strong security
 - was meant for sharing surplus computers amongst colleagues

Computer security became a thing when government agencies got interested in them
 - intelligence, military

Problem for them was sharing computing resources involved risks
 - especially for classified data, which they wanted to analyze
 - how to allow high privilege (classification) users access less privileged data, but not vice versa?

So big concern was how can we make systems that will faithfully implement security policies?

Invented the notion of a trusted computer base (TCB)
 - part of the system that must work correctly for
   security policies to be faithfully enforced

How can we get a secure TCB?
 - make it as small as possible
 - make sure it is developed by trustworthy individuals
 - ideally, formally verify its properties
   (with respect to some model)

High assurance systems were a failure in the marketplace
 - too expensive
 - hard to use
 - lacked functionality

So even with compromises (going from the Orange Book to the Common Criteria), assurance standards really didn't push the state of the art.
 - government moved to commercial off-the-shelf software
   (COTS), e.g., Windows

What did was real problems. Which came when the Internet took off with the development of the World Wide Web starting in 1993.

Work on the Internet started in the 1970's, but was more of a niche thing for academics and some parts of the government. Commercial interest came with the Web

The Internet changed the equation because now computers were interacting with untrustworthy entities, and there came the motivation: money.
 - e-commerce

But the signs there were issues started before this.
 - Morris worm (1988)

But it was things like Code Red and SQL Slammer worms that made people really pay attention

So what were the solutions? Depended on the problem

Insecure network services? Firewalls!
 - all kinds of network protocols developed for LANs
   didn't make sense on WANs (the Internet)

WinPopup shouldn't be exposed to the Internet

Network and host-based firewalls mostly block applications
that aren't ready for untrusted input

How do we stop malicious software?
 - was a problem before networking, networking just made it worse
 - anti-malware software detects and blocks known forms of malware

And what about software vulnerabilities?
 - we patch, fast!

And we developed cryptography
 - untrustworthy networks
 - SSL->TLS, ssh

But cryptography didn't stop attacks, and then we had to deal with attacks on the cryptography itself

We also developed technologies to make it harder to compromise computers, i.e., ways to "harden" systems
 - mostly to stop code injection attacks
 - ASLR, no-execute memory


So Windows, despite its origins, is very secure from a software engineering perspective
 - but users are allowed to install whatever they want

What has replaced this is locked down systems
 - embedded systems
 - smartphone operating systems (Android, iOS)

In other words, we get trusted computing + sandboxing
 - signed code all the way up from the bootloader
 - apps isolated from each other

And even with all of this, systems still get compromised all the time

So what's the path forward?

We need fundamentally different approaches

Realize vulnerabilities only matter because they are widespread
 - the fault is COTS

How could you change this? with AI enabling custom code!
 - get specialization & diversity

And we need adaptive defenses
 - and this isn't AI necessarily
 - it is more about feedback loops
   - systems watching themselves, each other
   - knowing what is "normal" rather than outright malicious

Computers need to get better at deciding who and what to trust
 - without just delegating that decision to people