mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
Addresses a number of argument handling bugs in the flask_op hypercall in the XSM:Flask module. Thanks to Rafal Wojtczuk at McAfee for reporting the issues and Tim Deegan at Citrix for providing an initial patch. This patch addresses the following issues: - bounds checking and validation on input arguments to flask_op - updated ABI/API, size and cmd are now uint32_t - updated userspace tools and libraries to account for ABI/API changes - implemented all copies using from/to guest, better portability - implemented upper bounds checking on op->cmd, op->size - implemented sanity checking on op->size and op->buf - implemented bit vector for checking from/to usage on op->cmd Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
23 lines
666 B
C
23 lines
666 B
C
/*
|
|
*
|
|
* Authors: Michael LeMay, <mdlemay@epoch.ncsc.mil>
|
|
* George Coker, <gscoker@alpha.ncsc.mil>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2,
|
|
* as published by the Free Software Foundation.
|
|
*/
|
|
|
|
#ifndef __FLASK_H__
|
|
#define __FLASK_H__
|
|
|
|
#include <stdint.h>
|
|
#include <xen/xen.h>
|
|
#include <xen/xsm/flask_op.h>
|
|
|
|
int flask_load(int xc_handle, char *buf, uint32_t size);
|
|
int flask_context_to_sid(int xc_handle, char *buf, uint32_t size, uint32_t *sid);
|
|
int flask_sid_to_context(int xc_handle, int sid, char *buf, uint32_t size);
|
|
|
|
#endif /* __FLASK_H__ */
|