|
@@ -84,6 +84,14 @@ int pxe_load ( struct image *image ) {
|
84
|
84
|
size_t memsz = image->len;
|
85
|
85
|
int rc;
|
86
|
86
|
|
|
87
|
+ /* Images too large to fit in base memory cannot be PXE
|
|
88
|
+ * images. We include this check to help prevent unrecognised
|
|
89
|
+ * images from being marked as PXE images, since PXE images
|
|
90
|
+ * have no signature we can check against.
|
|
91
|
+ */
|
|
92
|
+ if ( filesz > ( 0xa0000 - 0x7c00 ) )
|
|
93
|
+ return -ENOEXEC;
|
|
94
|
+
|
87
|
95
|
/* There are no signature checks for PXE; we will accept anything */
|
88
|
96
|
if ( ! image->type )
|
89
|
97
|
image->type = &pxe_image_type;
|