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 926020 Details for
Bug 1128637
GDB auto-loading declined message in crash reports
[?]
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]
A patch fixing this issue
0045-gdb-disable-loading-of-auto-loaded-files.patch (text/plain), 4.35 KB, created by
Jakub Filak
on 2014-08-12 10:45:26 UTC
(
hide
)
Description:
A patch fixing this issue
Filename:
MIME Type:
Creator:
Jakub Filak
Created:
2014-08-12 10:45:26 UTC
Size:
4.35 KB
patch
obsolete
>From 94372fd37058b8ab0327c04a497f07849ae49909 Mon Sep 17 00:00:00 2001 >From: Jakub Filak <jfilak@redhat.com> >Date: Mon, 9 Jun 2014 17:13:09 +0200 >Subject: [ABRT PATCH 45/45] gdb: disable loading of auto-loaded files > >https://sourceware.org/gdb/onlinedocs/gdb/Auto_002dloading.html > >There are two main reasons for doing so: >1. we cannot trust anybody > - the auto-loaded file may change the output format > - security? >2. bugs in such a files (#817) > >Signed-off-by: Jakub Filak <jfilak@redhat.com> >--- > src/lib/hooklib.c | 40 +++++++++++++++++++++------------------- > 1 file changed, 21 insertions(+), 19 deletions(-) > >diff --git a/src/lib/hooklib.c b/src/lib/hooklib.c >index 4a50727..21ad9e0 100644 >--- a/src/lib/hooklib.c >+++ b/src/lib/hooklib.c >@@ -252,10 +252,12 @@ char *get_backtrace(const char *dump_dir_name, unsigned timeout_sec, const char > /* Let user know what's going on */ > log(_("Generating backtrace")); > >- char *args[21]; >+ char *args[23]; > args[0] = (char*)"gdb"; > args[1] = (char*)"-batch"; > args[2] = (char*)"-ex"; >+ args[3] = (char*)"set auto-load off"; >+ args[4] = (char*)"-ex"; > struct strbuf *set_debug_file_directory = strbuf_new(); > if(debuginfo_dirs == NULL) > { >@@ -278,7 +280,7 @@ char *get_backtrace(const char *dump_dir_name, unsigned timeout_sec, const char > p = colon_or_nul; > } > } >- args[3] = strbuf_free_nobuf(set_debug_file_directory); >+ args[5] = strbuf_free_nobuf(set_debug_file_directory); > > /* "file BINARY_FILE" is needed, without it gdb cannot properly > * unwind the stack. Currently the unwind information is located >@@ -300,27 +302,27 @@ char *get_backtrace(const char *dump_dir_name, unsigned timeout_sec, const char > * TODO: check mtimes on COREFILE and BINARY_FILE and not supply > * BINARY_FILE if it is newer (to at least avoid gdb complaining). > */ >- args[4] = (char*)"-ex"; >- args[5] = xasprintf("file %s", executable); >- free(executable); >- > args[6] = (char*)"-ex"; >- args[7] = xasprintf("core-file %s/"FILENAME_COREDUMP, dump_dir_name); >+ args[7] = xasprintf("file %s", executable); >+ free(executable); > > args[8] = (char*)"-ex"; >- /*args[9] = ... see below */ >+ args[9] = xasprintf("core-file %s/"FILENAME_COREDUMP, dump_dir_name); >+ > args[10] = (char*)"-ex"; >- args[11] = (char*)"info sharedlib"; >- /* glibc's abort() stores its message in __abort_msg variable */ >+ /*args[11] = ... see below */ > args[12] = (char*)"-ex"; >- args[13] = (char*)"print (char*)__abort_msg"; >+ args[13] = (char*)"info sharedlib"; >+ /* glibc's abort() stores its message in __abort_msg variable */ > args[14] = (char*)"-ex"; >- args[15] = (char*)"print (char*)__glib_assert_msg"; >+ args[15] = (char*)"print (char*)__abort_msg"; > args[16] = (char*)"-ex"; >- args[17] = (char*)"info all-registers"; >+ args[17] = (char*)"print (char*)__glib_assert_msg"; > args[18] = (char*)"-ex"; >- args[19] = (char*)"disassemble"; >- args[20] = NULL; >+ args[19] = (char*)"info all-registers"; >+ args[20] = (char*)"-ex"; >+ args[21] = (char*)"disassemble"; >+ args[22] = NULL; > > /* Get the backtrace, but try to cap its size */ > /* Limit bt depth. With no limit, gdb sometimes OOMs the machine */ >@@ -330,9 +332,9 @@ char *get_backtrace(const char *dump_dir_name, unsigned timeout_sec, const char > char *bt = NULL; > while (1) > { >- args[9] = xasprintf("%s backtrace %u%s", thread_apply_all, bt_depth, full); >+ args[11] = xasprintf("%s backtrace %u%s", thread_apply_all, bt_depth, full); > bt = exec_vp(args, /*redirect_stderr:*/ 1, timeout_sec, NULL); >- free(args[9]); >+ free(args[11]); > if ((bt && strnlen(bt, 256*1024) < 256*1024) || bt_depth <= 32) > { > break; >@@ -357,7 +359,7 @@ char *get_backtrace(const char *dump_dir_name, unsigned timeout_sec, const char > * End of assembler dump. > * (IOW: "empty" dump) > */ >- args[19] = (char*)"disassemble $pc-20, $pc+64"; >+ args[21] = (char*)"disassemble $pc-20, $pc+64"; > > if (bt_depth <= 64 && thread_apply_all[0] != '\0') > { >@@ -373,9 +375,9 @@ char *get_backtrace(const char *dump_dir_name, unsigned timeout_sec, const char > } > } > >- free(args[3]); > free(args[5]); > free(args[7]); >+ free(args[9]); > return bt; > } > >-- >1.8.3.1 >
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 1128637
:
926020
|
959542