Safe Programming Flashcards

(15 cards)

1
Q

safety problems

A

languages that allow unsafe operations (unchecked mem access, injection attacks, privilege elevation)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

safe languages

A

ASP and prolog only let you describe the answer

rust has memory safety features

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Rust

A

provides memory safety without a GC

ownership system prevents memory errors at compile time

no null pointers (uses Option<T>)</T>

zero-cost abstractions

no data races
no buffer overflows, bounds checking
no use-after-free

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

rust ownership

A

enables compile time tracking of allocations, the compiler can know exactly when a value has no more references so it can add in code to drop the value at that point

tracks which variables own a value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

MISRA C

A

motor industry software reliability association

promote code safety, security and portability
avoid undefined behaviour and implementation-defined features (features that differ between compilers)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

AUTOSAR C++14

A

automotive open system architecture

based on MIRSA 2008

promotes focus on deterministic behaviour, restrictions on dynamic memory, exceptions and templates

widely used in automotive industry

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

CWE

A

common weakness enumeration

community developed list of software weaknesses

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

spoofing

A

pretending to be something or someone you are not

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

tampering

A

modifying something on disk, on a network or in memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

repudiation

A

claiming that you didn’t do something or were not responsible

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

information disclosure

A

providing information to someone not authorised to see it

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

denial of service

A

absorbing resources needed to provide service

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

elevation of privilege

A

allowing someone to do something they are not authorised to do

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

WASM

A

a text and binary code format for a stack-based VM

made as a compilation target for high-level languages

“a safe, portable, low-level code format designed for efficient exectuion and compact representation”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

WASM security

A

sandboxed environment, each application runs in its own sandbox, communicated externally using APIs

each module is subject to the security policies of its embedding (browser = same-origin policy, non-browser = POSIX security model)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly