david/ipxe
Archived
1
0
This repository has been archived on 2020-12-06. You can view files and clone it, but cannot push or open issues or pull requests.
ipxe/src
Michael Brown 632e57f0f3 [efi] Do not copy garbage bytes into SNP device path MAC address
The SNP device path includes the network device's MAC address within
the MAC_ADDR_DEVICE_PATH.MacAddress field.  We check that the
link-layer address will fit within this field, and then perform the
copy using the length of the destination buffer.

At 32 bytes, the MacAddress field is actually larger than the current
maximum iPXE link-layer address.  The copy therefore overflows the
source buffer, resulting in trailing garbage bytes being appended to
the device path's MacAddress.  This is invisible in debug messages,
since the DevicePathToText protocol will render only the length
implied by the interface type.

Fix by copying only the actual length of the link-layer address (which
we have already verified will not overflow the destination buffer).

Debugged-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-06-22 09:07:20 +01:00
..
arch [pci] Support systems with multiple PCI root bridges 2016-06-09 09:36:28 +01:00
bin Rename .cvsignore files to .gitignore 2007-06-09 22:57:00 +01:00
config [cmdline] Add "ntp" command 2016-06-13 15:57:16 +01:00
core [time] Allow system clock to be adjusted at runtime 2016-06-13 15:29:05 +01:00
crypto [arm] Avoid instruction references to symbols defined via ".equ" 2016-05-08 00:08:48 +01:00
doc [build] Rename gPXE to iPXE 2010-04-19 23:43:39 +01:00
drivers [smsc75xx] Allow up to 100ms for reset to complete 2016-06-20 14:26:37 +01:00
hci [cmdline] Add "ntp" command 2016-06-13 15:57:16 +01:00
image [build] Allow assembler section type character to vary by architecture 2016-03-13 11:20:53 +00:00
include [virtio] Renumber virtio_pci_region flags 2016-06-20 14:20:21 +01:00
interface [efi] Do not copy garbage bytes into SNP device path MAC address 2016-06-22 09:07:20 +01:00
libgcc [libgcc] Provide __divmoddi4() 2016-05-05 23:42:57 +01:00
net [ntp] Add simple NTP client 2016-06-13 15:55:49 +01:00
scripts [efi] Centralise architecture-independent EFI Makefile and linker script 2016-03-12 21:47:13 +00:00
tests [pci] Support systems with multiple PCI root bridges 2016-06-09 09:36:28 +01:00
usr [cmdline] Add "ntp" command 2016-06-13 15:57:16 +01:00
util [build] Remove nested "my" declaration 2016-06-03 18:09:54 +01:00
.gitignore [build] Add support for local configuration files 2010-03-26 19:07:22 +00:00
doxygen.cfg [build] Remove PACKED macro 2010-05-29 23:49:47 +01:00
Makefile [build] Remove unnecessary dependency on zlib 2016-05-02 23:09:49 +01:00
Makefile.efi [efi] Centralise architecture-independent EFI Makefile and linker script 2016-03-12 21:47:13 +00:00
Makefile.housekeeping [build] Remove unnecessary dependency on zlib 2016-05-02 23:09:49 +01:00