diff options
author | Jim Mattson <jmattson@google.com> | 2021-06-02 13:52:24 -0700 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-06-09 17:25:37 -0400 |
commit | 218bf772bddd221489c38dde6ef8e917131161f6 (patch) | |
tree | dd4cbdfa4caa3660908846cbc154b34514fe006b /tools/testing/selftests/kvm/lib/test_util.c | |
parent | 4422829e8053068e0225e4d0ef42dc41ea7c9ef5 (diff) | |
download | linux-218bf772bddd221489c38dde6ef8e917131161f6.tar.bz2 |
kvm: LAPIC: Restore guard to prevent illegal APIC register access
Per the SDM, "any access that touches bytes 4 through 15 of an APIC
register may cause undefined behavior and must not be executed."
Worse, such an access in kvm_lapic_reg_read can result in a leak of
kernel stack contents. Prior to commit 01402cf81051 ("kvm: LAPIC:
write down valid APIC registers"), such an access was explicitly
disallowed. Restore the guard that was removed in that commit.
Fixes: 01402cf81051 ("kvm: LAPIC: write down valid APIC registers")
Signed-off-by: Jim Mattson <jmattson@google.com>
Reported-by: syzbot <syzkaller@googlegroups.com>
Message-Id: <20210602205224.3189316-1-jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/lib/test_util.c')
0 files changed, 0 insertions, 0 deletions