From: bugzilla-daemon@bugzilla.kernel.org
To: kvm@vger.kernel.org
Subject: [Bug 204177] New: PT: Missing filtering on the MSRs
Date: Sun, 14 Jul 2019 16:08:46 +0000 [thread overview]
Message-ID: <bug-204177-28872@https.bugzilla.kernel.org/> (raw)
https://bugzilla.kernel.org/show_bug.cgi?id=204177
Bug ID: 204177
Summary: PT: Missing filtering on the MSRs
Product: Virtualization
Version: unspecified
Kernel Version: 5.*
Hardware: Intel
OS: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: kvm
Assignee: virtualization_kvm@kernel-bugs.osdl.org
Reporter: max@m00nbsd.net
Regression: No
In vmx.c::vmx_get_msr(), there is some missing filtering on the PT (RTIT) MSRs.
For example RTIT_CR3_MATCH:
case MSR_IA32_RTIT_CR3_MATCH:
if ((pt_mode != PT_MODE_HOST_GUEST) ||
(vmx->pt_desc.guest.ctl & RTIT_CTL_TRACEEN) ||
!intel_pt_validate_cap(vmx->pt_desc.caps,
PT_CAP_cr3_filtering))
return 1;
vmx->pt_desc.guest.cr3_match = data;
break;
Here, 'cr3_match' is set to the value given by the guest. Later, in
pt_load_msr(), there is a blunt WRMSR:
wrmsrl(MSR_IA32_RTIT_CR3_MATCH, ctx->cr3_match);
The Intel SDM indicates that
"IA32_RTIT_CR3_MATCH[4:0] are reserved and must be 0; an attempt to
set those bits using WRMSR causes a #GP."
Given that KVM does not ensure that the aforementioned bits are zero, it seems
that the guest could #GP the host.
--
You are receiving this mail because:
You are watching the assignee of the bug.
next reply other threads:[~2019-07-14 16:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-14 16:08 bugzilla-daemon [this message]
2026-01-10 19:22 ` [Bug 204177] ProcessorTrace: missing filtering on the MSRs bugzilla-daemon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-204177-28872@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@bugzilla.kernel.org \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox