diff options
| author | Sean Christopherson <[email protected]> | 2024-08-29 19:14:13 +0000 |
|---|---|---|
| committer | Sean Christopherson <[email protected]> | 2024-09-10 03:15:34 +0000 |
| commit | 025dde582bbf31e7618f9283594ef5e2408e384b (patch) | |
| tree | d722a6ec8fd040e4029ec6b43336d31131b88799 /lib/crypto/mpi/mpi-mul.c | |
| parent | KVM: Write the per-page "segment" when clearing (part of) a guest page (diff) | |
| download | kernel-025dde582bbf31e7618f9283594ef5e2408e384b.tar.gz kernel-025dde582bbf31e7618f9283594ef5e2408e384b.zip | |
KVM: Harden guest memory APIs against out-of-bounds accesses
When reading or writing a guest page, WARN and bail if offset+len would
result in a read to a different page so that KVM bugs are more likely to
be detected, and so that any such bugs are less likely to escalate to an
out-of-bounds access. E.g. if userspace isn't using guard pages and the
target page is at the end of a memslot.
Note, KVM already hardens itself in similar APIs, e.g. in the "cached"
variants, it's just the vanilla APIs that are playing with fire.
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sean Christopherson <[email protected]>
Diffstat (limited to 'lib/crypto/mpi/mpi-mul.c')
0 files changed, 0 insertions, 0 deletions
