diff options
| -rw-r--r-- | .pc/applied-patches | 1 | ||||
| -rw-r--r-- | debian/changelog | 7 | ||||
| -rw-r--r-- | debian/patches/fix-tftp-prototype | 42 | ||||
| -rw-r--r-- | debian/patches/series | 1 | ||||
| -rw-r--r-- | netboot.c | 4 | ||||
| -rw-r--r-- | shim.c | 2 |
6 files changed, 54 insertions, 3 deletions
diff --git a/.pc/applied-patches b/.pc/applied-patches index c07f3b5c..6e35cc4f 100644 --- a/.pc/applied-patches +++ b/.pc/applied-patches @@ -3,3 +3,4 @@ second-stage-path sbsigntool-not-pesign no-output-by-default.patch no-print-on-unsigned +fix-tftp-prototype diff --git a/debian/changelog b/debian/changelog index b323a2b3..a32df9ce 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +shim (0.4-0ubuntu4) UNRELEASED; urgency=low + + * debian/patches/fix-tftp-prototype: pass the right arguments to + EFI_PXE_BASE_CODE_TFTP_READ_FILE. + + -- Steve Langasek <steve.langasek@ubuntu.com> Fri, 20 Sep 2013 14:43:23 +0000 + shim (0.4-0ubuntu3) saucy; urgency=low [ Steve Langasek ] diff --git a/debian/patches/fix-tftp-prototype b/debian/patches/fix-tftp-prototype new file mode 100644 index 00000000..ba500cb5 --- /dev/null +++ b/debian/patches/fix-tftp-prototype @@ -0,0 +1,42 @@ +Description: pass the right arguments to EFI_PXE_BASE_CODE_TFTP_READ_FILE + A wrong pointer was being passed to EFI_PXE_BASE_CODE_TFTP_READ_FILE, + preventing us from getting the file size back from the tftp call, ensuring + that we don't have enough information to properly secureboot-validate the + retrieved image. +Author: Steve Langasek <steve.langasek@ubuntu.com> + +=== modified file 'netboot.c' +--- a/netboot.c 2013-05-31 19:34:11 +0000 ++++ b/netboot.c 2013-09-20 16:07:27 +0000 +@@ -326,7 +326,7 @@ + return rc; + } + +-EFI_STATUS FetchNetbootimage(EFI_HANDLE image_handle, VOID **buffer, UINTN *bufsiz) ++EFI_STATUS FetchNetbootimage(EFI_HANDLE image_handle, VOID **buffer, UINT64 *bufsiz) + { + EFI_STATUS rc; + EFI_PXE_BASE_CODE_TFTP_OPCODE read = EFI_PXE_BASE_CODE_TFTP_READ_FILE; +@@ -344,7 +344,7 @@ + + try_again: + rc = uefi_call_wrapper(pxe->Mtftp, 10, pxe, read, *buffer, overwrite, +- &bufsiz, &blksz, &tftp_addr, full_path, NULL, nobuffer); ++ bufsiz, &blksz, &tftp_addr, full_path, NULL, nobuffer); + + if (rc == EFI_BUFFER_TOO_SMALL) { + /* try again, doubling buf size */ + +=== modified file 'shim.c' +--- a/shim.c 2013-08-08 15:12:06 +0000 ++++ b/shim.c 2013-09-20 16:12:39 +0000 +@@ -1161,7 +1161,7 @@ + EFI_DEVICE_PATH *path; + CHAR16 *PathName = NULL; + void *sourcebuffer = NULL; +- UINTN sourcesize = 0; ++ UINT64 sourcesize = 0; + void *data = NULL; + int datasize; + + diff --git a/debian/patches/series b/debian/patches/series index c07f3b5c..6e35cc4f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,3 +3,4 @@ second-stage-path sbsigntool-not-pesign no-output-by-default.patch no-print-on-unsigned +fix-tftp-prototype @@ -326,7 +326,7 @@ EFI_STATUS parseNetbootinfo(EFI_HANDLE image_handle) return rc; } -EFI_STATUS FetchNetbootimage(EFI_HANDLE image_handle, VOID **buffer, UINTN *bufsiz) +EFI_STATUS FetchNetbootimage(EFI_HANDLE image_handle, VOID **buffer, UINT64 *bufsiz) { EFI_STATUS rc; EFI_PXE_BASE_CODE_TFTP_OPCODE read = EFI_PXE_BASE_CODE_TFTP_READ_FILE; @@ -344,7 +344,7 @@ EFI_STATUS FetchNetbootimage(EFI_HANDLE image_handle, VOID **buffer, UINTN *bufs try_again: rc = uefi_call_wrapper(pxe->Mtftp, 10, pxe, read, *buffer, overwrite, - &bufsiz, &blksz, &tftp_addr, full_path, NULL, nobuffer); + bufsiz, &blksz, &tftp_addr, full_path, NULL, nobuffer); if (rc == EFI_BUFFER_TOO_SMALL) { /* try again, doubling buf size */ @@ -1161,7 +1161,7 @@ EFI_STATUS start_image(EFI_HANDLE image_handle, CHAR16 *ImagePath) EFI_DEVICE_PATH *path; CHAR16 *PathName = NULL; void *sourcebuffer = NULL; - UINTN sourcesize = 0; + UINT64 sourcesize = 0; void *data = NULL; int datasize; |
