Commit Graph

532 Commits

Author SHA1 Message Date
Steve Langasek
e2979f2c5f Fix nul termination errors in filenames passed to tftp
Fix various errors in the tftp string handling, to ensure we always have
properly nul-terminated strings.
2013-09-24 12:05:28 -04:00
Steve Langasek
2d8cfca2ce Build with -Werror to catch future prototype mismatches. 2013-09-24 12:05:25 -04:00
Steve Langasek
fbc486b50d 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.
2013-09-24 12:05:21 -04:00
Peter Jones
bea90083d2 Add MokListRT option rom entry.
Signed-off-by: Peter Jones <pjones@redhat.com>
2013-09-23 13:24:48 -04:00
Peter Jones
43df9d24f2 Update TODO with missing description.
Signed-off-by: Peter Jones <pjones@redhat.com>
2013-09-23 11:05:08 -04:00
Peter Jones
71da4f9be4 Made TODO represent the present.
Signed-off-by: Peter Jones <pjones@redhat.com>
2013-09-23 10:48:41 -04:00
Peter Jones
cb59de3847 Make SHIM_LOCK_GUID a first-class object with a symbol.
Right now the CA is checking if shim builds expose a particular version
of the shim protocol.  To do this, they're looking for SHIM_LOCK_GUID's
value in the resulting binary.

Currently, with SHIM_LOCK_GUID as a macro that gets assigned to local
variables, that means they have to compensate for mov instructions mixed
in with the actual value.  This is completely absurd, so promote it to a
first-class object with a symbol to make it both easy to find and
continuous.

Signed-off-by: Peter Jones <pjones@redhat.com>
2013-09-23 10:40:49 -04:00
Steve Langasek
eb32f5bab0 releasing package shim version 0.4-0ubuntu4 2013-09-23 00:30:04 -07:00
Steve Langasek
84a3bbdf33 debian/patches/netboot-cleanup: roll-up of miscellaneous fixes to
the netboot code.
2013-09-23 00:29:29 -07:00
Steve Langasek
0c74470db4 debian/patches/tftp-proper-nul-termination: fix nul termination
errors in filenames passed to tftp.
2013-09-20 17:05:30 -05:00
Steve Langasek
c43e3c7c0e Fix remaining compiler warnings in netboot.c. 2013-09-20 18:03:50 +00:00
Steve Langasek
990ce02ddd typo 2013-09-20 18:01:37 +00:00
Steve Langasek
5a187fadda Build with -Werror to catch future prototype mismatches. 2013-09-20 12:55:24 -05:00
Steve Langasek
4d21772d2a Commit missing .pc bits 2013-09-20 17:53:06 +00:00
Steve Langasek
50ab550ada debian/patches/fix-tftp-prototype: pass the right arguments to
EFI_PXE_BASE_CODE_TFTP_READ_FILE.
2013-09-20 11:23:28 -05:00
Peter Jones
e75294e569 Don't print things on the screen by default when everything works.
There's no point to this text, and it generally confuses people.

Signed-off-by: Peter Jones <pjones@redhat.com>
2013-09-16 09:27:08 -04:00
Peter Jones
b32a3ce14c Don't print that fallback isn't found in should_use_fallback()
The call can simply fail if it isn't found - which will be the case on
removeable install media.

Signed-off-by: Peter Jones <pjones@redhat.com>
2013-09-16 09:27:08 -04:00
Stéphane Graber
4c13d15aab releasing version 0.4-0ubuntu3 2013-08-08 17:12:20 +02:00
Stéphane Graber
0929c5e5f5 Fix for LP: #1087501 2013-08-08 17:12:06 +02:00
Steve Langasek
44ecc6a350 debian/patches/no-output-by-default.patch: Don't print any
informational messages.  Closes LP: #1074302.
2013-07-03 22:48:01 +00:00
Steve Langasek
0c50644a00 Install MokManager.efi.signed in the package. 2013-07-03 12:02:10 -07:00
Steve Langasek
6657ac38fc releasing version 0.4-0ubuntu2 2013-07-02 20:30:47 +00:00
Steve Langasek
15d7c608de Add missing build-dependency on openssl. 2013-07-02 20:30:43 +00:00
Steve Langasek
63eea134e0 releasing version 0.4-0ubuntu1 2013-07-02 12:53:29 -07:00
Steve Langasek
84ac2e5551 Only one new upstream release, no need to say it twice ;) 2013-07-02 12:53:23 -07:00
Steve Langasek
e77adb281e Bump the versioned build-dep on gnu-efi to one that supports current shim 2013-07-02 15:31:11 +00:00
Steve Langasek
1b5fb6c04f Merge upstream release 0.4 2013-07-02 15:29:48 +00:00
Steve Langasek
bfab8d6791 Import upstream version 0.4 2013-07-02 15:24:04 +00:00
Peter Jones
928886457e Fix some pointer casting issues.
This also fixes the size of an empty vendor_cert or dbx_cert.

Signed-off-by: Peter Jones <shim-owner@fedoraproject.org>
2013-06-11 14:59:48 -04:00
Peter Jones
d141608bf8 Bump version to 0.4
Since I've finally merged in the "sections" branch, best to increment
the version number.

Signed-off-by: Peter Jones <pjones@redhat.com>
2013-06-10 17:51:57 -04:00
Peter Jones
ff1409c37b Make DBX be included in build if the environment is set right.
Signed-off-by: Peter Jones <pjones@redhat.com>
2013-06-10 17:51:57 -04:00
Peter Jones
f80edcbe7d Make .vendor_cert get the right flags set.
Signed-off-by: Peter Jones <pjones@redhat.com>
2013-06-10 17:36:23 -04:00
Peter Jones
63bdfd8501 add a .gitignore
Signed-off-by: Peter Jones <pjones@redhat.com>
2013-06-10 17:36:22 -04:00
Peter Jones
c682b514bf Move embedded certificates to their own section.
With this change, the embedded certificate and dbx lists (vendor_cert,
vendor_cert_size, vendor_dbx, and vendor_dbx_size) wind up being in a
section named .vendor_cert, and so will look something like:
------
fenchurch:~/devel/github.com/shim$ objdump -h shim.efi

shim.efi:     file format pei-x86-64

Sections:
Idx Name          Size      VMA               LMA               File off  Algn
  0 .eh_frame     000174a8  0000000000005000  0000000000005000  00000400  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  1 .text         000aa7e1  000000000001d000  000000000001d000  00017a00  2**4
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  2 .reloc        0000000a  00000000000c8000  00000000000c8000  000c2200  2**0
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  3 .data         00031228  00000000000c9000  00000000000c9000  000c2400  2**5
                  CONTENTS, ALLOC, LOAD, DATA
  4 .vendor_cert  00000375  00000000000fb000  00000000000fb000  000f3800  2**0
                  CONTENTS, READONLY
  5 .dynamic      000000f0  00000000000fc000  00000000000fc000  000f3c00  2**3
                  CONTENTS, ALLOC, LOAD, DATA
  6 .rela         0002afa8  00000000000fd000  00000000000fd000  000f3e00  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  7 .dynsym       0000f1f8  0000000000128000  0000000000128000  0011ee00  2**3
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
------

This simplifies a security audit, because it means that different
versions of shim with substantially the same code with different keys
will be more easily comperable, and therefore logic differences may be
more easily identified.

This also means that if there's a trusted build you want to use, you can
remove the certificates, implant new ones, and have it signed, and the
code sections won't change.

Signed-off-by: Peter Jones <pjones@redhat.com>
2013-06-10 17:35:33 -04:00
Peter Jones
6b4255de12 vendor_cert_size's size in the binary should be 4, not -4.
The thing about subtraction is that the minuend needs to be before the
subtrahend in the text.

Signed-off-by: Peter Jones <pjones@redhat.com>
2013-06-10 17:35:33 -04:00
Peter Jones
1de10962e7 Remove FALLBACK_OBJS during clean as well.
Signed-off-by: Peter Jones <pjones@redhat.com>
2013-06-10 17:34:55 -04:00
Peter Jones
acf2e8ed1a Make sure all the Makefiles use the same arguments for mmx/sse/ms_abi.
Signed-off-by: Peter Jones <pjones@redhat.com>
2013-06-10 16:38:05 -04:00
Peter Jones
6cd79ef950 EFI_PXE_BASE_CODE_DHCPV6_PACKET is in gnu-efi-3.0t 2013-05-31 15:34:11 -04:00
Peter Jones
632503aa07 Don't use MMX and SSE registers, they aren't initialized.
GCC 4.8.0 will try to use these by default, and you'll wind up looping
across the (uninitialized!) trap handler for uninitialized instructions.

Signed-off-by: Peter Jones <pjones@redhat.com>
2013-05-31 15:34:11 -04:00
Peter Jones
8e7e92beb8 Bump version to 0.3
Signed-off-by: Peter Jones <pjones@redhat.com>
2013-05-16 11:03:32 -04:00
Peter Jones
aa55fcf149 Use MS ABI instead of terrible wrappers.
This means that we now require gnu-efi 3.0s

Signed-off-by: Peter Jones <pjones@redhat.com>
2013-05-16 10:21:15 -04:00
Peter Jones
5bb3e64ed8 Use the correct define on Open.
The value here doesn't actually change any, but we should still use the
right name.

Signed-off-by: Peter Jones <pjones@redhat.com>
2013-05-15 13:38:44 -04:00
Peter Jones
c9d11306e4 Add some error messages when things don't work.
Signed-off-by: Peter Jones <pjones@redhat.com>
2013-05-15 13:38:27 -04:00
Peter Jones
2e7fc28d92 Remove some unnecessary code.
Signed-off-by: Peter Jones <pjones@redhat.com>
2013-05-15 13:38:00 -04:00
Peter Jones
35b0b55b3e Fix some minor type errors.
Signed-off-by: Peter Jones <pjones@redhat.com>
2013-05-15 13:37:15 -04:00
Peter Jones
40cf2a423d Pass parameters correctly when booting.
Signed-off-by: Peter Jones <pjones@redhat.com>
2013-05-14 13:10:52 -04:00
Peter Jones
8807e36aae [fallback] Try to execute the first new boot option.
I'm told rebooting is sometimes unreliable when called here, and we'll
get bootx64.efi loaded anyway.  I'll just assume that's true and try to
load the first option, since it's clearly what we'd prefer happens next.

Signed-off-by: Peter Jones <pjones@redhat.com>
2013-05-02 14:58:44 -04:00
Peter Jones
4f80140b53 Explain byte order handling better.
Signed-off-by: Peter Jones <pjones@redhat.com>
2013-04-30 14:21:41 -04:00
Gary Ching-Pang Lin
39baf6dff7 Don't update BootOrder until all csv files are processed 2013-04-30 09:46:23 -04:00
Gary Ching-Pang Lin
117b1214d8 Reset the system after restoring the boot entries 2013-04-30 09:46:23 -04:00