diff options
Diffstat (limited to 'src/arch')
| -rw-r--r-- | src/arch/i386/image/pxe_image.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/arch/i386/image/pxe_image.c b/src/arch/i386/image/pxe_image.c index 9e634f149..77fa0469a 100644 --- a/src/arch/i386/image/pxe_image.c +++ b/src/arch/i386/image/pxe_image.c @@ -84,6 +84,14 @@ int pxe_load ( struct image *image ) { size_t memsz = image->len; int rc; + /* Images too large to fit in base memory cannot be PXE + * images. We include this check to help prevent unrecognised + * images from being marked as PXE images, since PXE images + * have no signature we can check against. + */ + if ( filesz > ( 0xa0000 - 0x7c00 ) ) + return -ENOEXEC; + /* There are no signature checks for PXE; we will accept anything */ if ( ! image->type ) image->type = &pxe_image_type; |
