Page MenuHomeFreeBSD

mitigate against CVE-2017-5715 by clearing registers upon returning from the guest
ClosedPublic

Authored by tychon on Jan 15 2018, 5:15 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 4, 1:04 PM
Unknown Object (File)
Fri, Apr 19, 2:22 PM
Unknown Object (File)
Mon, Apr 8, 11:58 AM
Unknown Object (File)
Mar 31 2024, 7:38 AM
Unknown Object (File)
Mar 29 2024, 1:04 PM
Unknown Object (File)
Feb 15 2024, 8:16 PM
Unknown Object (File)
Feb 13 2024, 2:08 AM
Unknown Object (File)
Jan 20 2024, 4:50 AM

Details

Reviewers
grehan
rgrimes
Group Reviewers
bhyve
Summary

Provide some mitigation against CVE-2017-5715 by clearing registers
upon returning from the guest which aren't immediately clobbered by
the host. This eradicates any remaining guest contents limitings
their usefulness in an exploit gadget.

This was inspired by this linux commit:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5b6c02f38315b720c593c6079364855d276886aa

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 14387

Event Timeline

Tested the SVM codepath with a Win10 guest on an AMD Sempron APU.

This revision is now accepted and ready to land.Jan 15 2018, 6:09 PM
rgrimes added a subscriber: rgrimes.

Looks good to me, but a future refactor would be nice, #define VMX_GUEST_CLOBBER_INTEL and VMX_GUEST_CLOBBER_AMD and invoke them at the right place. Makes the *_support.S files less different from each other.

Committed in rS328011 (which incorrectly referenced D13573)