Xen Test Framework
tests
xsa-472-1
main.c
Go to the documentation of this file.
1
15
#include <xtf.h>
16
17
const
char
test_title
[] =
"XSA-472-1 PoC"
;
18
19
#define HV_X64_MSR_REFERENCE_TSC 0x40000021
20
21
void
test_main
(
void
)
22
{
23
/* Test if HV_X64_MSR_REFERENCE_TSC checks for valid mapping. */
24
wrmsr
(
HV_X64_MSR_REFERENCE_TSC
, ~0UL);
25
26
/*
27
* If we're still alive here, Xen didn't crash, so the NULL pointer
28
* dereference is not present.
29
*/
30
xtf_success
(
"Success: Not vulnerable to XSA-470 (CVE-2025-27466)\n"
);
31
}
32
33
/*
34
* Local variables:
35
* mode: C
36
* c-file-style: "BSD"
37
* c-basic-offset: 4
38
* tab-width: 4
39
* indent-tabs-mode: nil
40
* End:
41
*/
test_main
void test_main(void)
To be implemented by each test, as its entry point.
Definition:
main.c:301
test_title
const char test_title[]
The title of the test.
Definition:
main.c:13
wrmsr
static void wrmsr(uint32_t idx, uint64_t val)
Thin wrapper around an wrmsr instruction.
Definition:
msr.h:55
xtf_success
void xtf_success(const char *fmt,...)
Report test success.
Definition:
report.c:38
HV_X64_MSR_REFERENCE_TSC
#define HV_X64_MSR_REFERENCE_TSC
Definition:
main.c:19
Generated by
1.9.4