You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extended the documentation for the serial console by adding one more
threat along with the mitigation, and adding some more details to the
existing one.
Added threat model documentation for the RTC device.
Signed-off-by: Andreea Florescu <fandree@amazon.com>
Copy file name to clipboardExpand all lines: README.md
+27-11Lines changed: 27 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,23 @@ the driver to an `io::Write` object (`out`), which can be, for example,
42
42
A `Trigger` object is the currently used mechanism for notifying the driver
43
43
about in/out events that need to be handled.
44
44
45
+
## Threat model
46
+
47
+
Trusted actors:
48
+
* host kernel
49
+
50
+
Untrusted actors:
51
+
* guest kernel
52
+
* guest drivers
53
+
54
+
The untrusted actors can change the state of the device through reads and
55
+
writes on the Bus at the address where the device resides.
56
+
57
+
|#NR |Threat |Mitigation |
58
+
|--- |--- |--- |
59
+
|1 | A malicious guest generates large memory allocations by flooding the serial console input. [CVE-2020-27173](https://nvd.nist.gov/vuln/detail/CVE-2020-27173)|The serial console limits the number of elements in the FIFO corresponding to the serial console input to `FIFO_SIZE` (=64), returning a FIFO Full error when the limit is reached. This error MUST be handled by the crate customer. When the serial console input is connected to an event loop, the customer MUST ensure that the loop is not flooded with events coming from untrusted sources when no space is available in the FIFO. |
60
+
|2 |A malicious guest can fill up the host disk by generating a high amount of data to be written to the serial output. |Mitigation is not possible at the emulation layer because we are not controlling the output (`Writer`). This needs to be mitigated at the VMM level by adding a rate limiting mechanism. We recommend using as output a resource that has a fixed size (e.g. ring buffer or a named pipe). |
61
+
45
62
### Usage
46
63
47
64
The interaction between the serial console and its driver, at the emulation
@@ -74,23 +91,22 @@ Note that because the Match Register is the only possible source of an event,
74
91
and the Match Register is not currently implemented, no event handling
75
92
is required.
76
93
77
-
## Threat model
94
+
###Threat model
78
95
79
96
Trusted actors:
80
-
- host kernel.
97
+
* host kernel
81
98
82
99
Untrusted actors:
83
-
- guest kernel,
84
-
- guest drivers.
100
+
* guest kernel
101
+
* guest drivers
85
102
86
-
For the serial console, there is no monitoring of the amount of data that is
87
-
written to the `out` object.
103
+
The untrusted actors can change the state of the device through reads and
104
+
writes on the Bus at the address where the device resides.
88
105
89
-
*Threat*: A malicious guest can fill up the host disk by generating a high
90
-
amount of data to be written to the serial output.
91
-
*Mitigation*: There is no mitigation implemented at the serial console emulation
92
-
level. To mitigate this at the VMM level, it is recommended to use as output a
93
-
resource that has a fixed size (e.g. ring buffer or a named pipe).
106
+
|#NR |Threat |Mitigation |
107
+
|--- |--- |--- |
108
+
|1 |A malicious guest writes invalid values in the Load Register to cause overflows on subsequent reads of the Data Register. |The arithmetic operations in the RTC are checked for overflows. When such a situation occurs, the state of the device is reset. |
109
+
|2 |A malicious guest performs reads and writes from invalid offsets (that do not correspond to the RTC registers) to cause crashes or to get access to data. |Reads and writes of invalid offsets are denied by the emulation, and an `invalid_read/write` event is called. These events can be implemented by VMMs, and extend them to generate alarms (and for example stop the execution of the malicious guest). |
0 commit comments