Commit 4827466
committed
fix(memory): validate memory region state before resuming
When the region state is invalid or corrupted (like when generated by
the fuzzer), it is possible that a DRAM slot is unplugged, leading to
segfaults when accessing guest memory (ie from vmgenid device).
To avoid these crashes, validate the region state and allow the DRAM
region (not hot-pluggable) to only contain one plugged slot.
Signed-off-by: Riccardo Mancini <[email protected]>1 parent 6436c65 commit 4827466
1 file changed
+19
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
| 58 | + | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
234 | | - | |
235 | | - | |
236 | | - | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
237 | 251 | | |
238 | 252 | | |
239 | 253 | | |
| |||
0 commit comments