diff options
| author | Ian Jackson <ian.jackson@eu.citrix.com> | 2013-06-14 16:43:19 +0100 |
|---|---|---|
| committer | Ian Jackson <Ian.Jackson@eu.citrix.com> | 2013-06-14 16:43:19 +0100 |
| commit | b06e277b1fc08c7da3befeb3ac3950e1d941585d (patch) | |
| tree | 70cd8fdac9c9924ff581a803c19503382b7919c5 /tools/lib/sys_string.h | |
| parent | 3baaa4ffcd3e7dd6227f9bdf817f90e5b75aeda2 (diff) | |
| download | xen-b06e277b1fc08c7da3befeb3ac3950e1d941585d.tar.gz xen-b06e277b1fc08c7da3befeb3ac3950e1d941585d.tar.bz2 xen-b06e277b1fc08c7da3befeb3ac3950e1d941585d.zip | |
libxc: Add range checking to xc_dom_binloader
This is a simple binary image loader with its own metadata format.
However, it is too careless with image-supplied values.
Add the following checks:
* That the image is bigger than the metadata table; otherwise the
pointer arithmetic to calculate the metadata table location may
yield undefined and dangerous values.
* When clamping the end of the region to search, that we do not
calculate pointers beyond the end of the image. The C
specification does not permit this and compilers are becoming ever
more determined to miscompile code when they can "prove" various
falsehoods based on assertions from the C spec.
* That the supplied image is big enough for the text we are allegedly
copying from it. Otherwise we might have a read overrun and copy
the results (perhaps a lot of secret data) into the guest.
This is part of the fix to a security issue, XSA-55.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/lib/sys_string.h')
0 files changed, 0 insertions, 0 deletions
