Commit 37f66bb
KVM: emulator: more strict rsm checks.
Don't ignore return values in rsm_load_state_64/32 to avoid
loading invalid state from SMM state area if it was tampered with
by the guest.
This is primarly intended to avoid letting guest set bits in EFER
(like EFER.SVME when nesting is disabled) by manipulating SMM save area.
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20200827171145.374620-8-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>1 parent 3ebb5d2 commit 37f66bb
1 file changed
Lines changed: 17 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2505 | 2505 | | |
2506 | 2506 | | |
2507 | 2507 | | |
2508 | | - | |
| 2508 | + | |
| 2509 | + | |
| 2510 | + | |
| 2511 | + | |
2509 | 2512 | | |
2510 | | - | |
| 2513 | + | |
| 2514 | + | |
| 2515 | + | |
2511 | 2516 | | |
2512 | 2517 | | |
2513 | 2518 | | |
| |||
2560 | 2565 | | |
2561 | 2566 | | |
2562 | 2567 | | |
2563 | | - | |
| 2568 | + | |
| 2569 | + | |
| 2570 | + | |
| 2571 | + | |
2564 | 2572 | | |
2565 | | - | |
| 2573 | + | |
| 2574 | + | |
| 2575 | + | |
2566 | 2576 | | |
2567 | 2577 | | |
2568 | 2578 | | |
2569 | 2579 | | |
2570 | 2580 | | |
2571 | 2581 | | |
2572 | | - | |
| 2582 | + | |
| 2583 | + | |
| 2584 | + | |
2573 | 2585 | | |
2574 | 2586 | | |
2575 | 2587 | | |
| |||
0 commit comments