Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 1452455 Details for
Bug 1592148
pxeboot shim crash using newer edk2 firmware
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch to move DEFAULT_LOADER_CHAR into writable data section
0001-Fix-attempted-write-to-a-string-literal.patch (text/plain), 2.56 KB, created by
Mark Salter
on 2018-06-17 21:27:17 UTC
(
hide
)
Description:
Patch to move DEFAULT_LOADER_CHAR into writable data section
Filename:
MIME Type:
Creator:
Mark Salter
Created:
2018-06-17 21:27:17 UTC
Size:
2.56 KB
patch
obsolete
>From 3a95f63bcd574b4555d9487d6718267f40ffc87c Mon Sep 17 00:00:00 2001 >From: Mark Salter <msalter@redhat.com> >Date: Sun, 17 Jun 2018 00:13:12 -0400 >Subject: [PATCH] Fix attempted write to a string literal > >Newer versions of edk2 mark text sections read-only. This uncovers >a problem where shim code tries to write to a string literal. This >now leads to a permission fault when translate_slashes is called >to work on DEFAULT_LOADER_CHAR. So put DEFAULT_LOADER_CHAR into >.data to avoid the problem. > >Signed-off-by: Mark Salter <msalter@redhat.com> >--- > httpboot.c | 2 +- > netboot.c | 4 ++-- > shim.c | 2 ++ > shim.h | 2 ++ > 4 files changed, 7 insertions(+), 3 deletions(-) > >diff --git a/httpboot.c b/httpboot.c >index 4cfa3aa..e9743be 100644 >--- a/httpboot.c >+++ b/httpboot.c >@@ -695,7 +695,7 @@ httpboot_fetch_buffer (EFI_HANDLE image, VOID **buffer, UINT64 *buf_size) > if (!uri) > return EFI_NOT_READY; > >- next_loader = translate_slashes(DEFAULT_LOADER_CHAR); >+ next_loader = translate_slashes(default_loader_char); > > /* Create the URI for the next loader based on the original URI */ > efi_status = generate_next_uri(uri, next_loader, &next_uri); >diff --git a/netboot.c b/netboot.c >index 58babfb..d8436dd 100644 >--- a/netboot.c >+++ b/netboot.c >@@ -189,7 +189,7 @@ static BOOLEAN extract_tftp_info(CHAR8 *url) > CHAR8 *start, *end; > CHAR8 ip6str[40]; > CHAR8 ip6inv[16]; >- CHAR8 *template = (CHAR8 *)translate_slashes(DEFAULT_LOADER_CHAR); >+ CHAR8 *template = (CHAR8 *)translate_slashes(default_loader_char); > > // to check against str2ip6() errors > memset(ip6inv, 0, sizeof(ip6inv)); >@@ -254,7 +254,7 @@ static EFI_STATUS parseDhcp6() > > static EFI_STATUS parseDhcp4() > { >- CHAR8 *template = (CHAR8 *)translate_slashes(DEFAULT_LOADER_CHAR); >+ CHAR8 *template = (CHAR8 *)translate_slashes(default_loader_char); > INTN template_len = strlen(template) + 1; > EFI_PXE_BASE_CODE_DHCPV4_PACKET* pkt_v4 = (EFI_PXE_BASE_CODE_DHCPV4_PACKET *)&pxe->Mode->DhcpAck.Dhcpv4; > >diff --git a/shim.c b/shim.c >index 0015534..8be41d3 100644 >--- a/shim.c >+++ b/shim.c >@@ -76,6 +76,8 @@ UINT32 vendor_dbx_size; > UINT8 *vendor_cert; > UINT8 *vendor_dbx; > >+char default_loader_char[] = DEFAULT_LOADER_CHAR; >+ > /* > * indicator of how an image has been verified > */ >diff --git a/shim.h b/shim.h >index a25a660..36b1085 100644 >--- a/shim.h >+++ b/shim.h >@@ -175,6 +175,8 @@ extern UINT8 user_insecure_mode; > extern UINT8 ignore_db; > extern UINT8 in_protocol; > >+extern char default_loader_char[]; >+ > #define perror_(file, line, func, fmt, ...) ({ \ > UINTN __perror_ret = 0; \ > if (!in_protocol) \ >-- >2.18.0.rc2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1592148
: 1452455