public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Limit bogus archive parsed_size
@ 2020-03-09 10:46 gdb-buildbot
2020-03-09 10:46 ` Failures on Fedora-i686, branch master gdb-buildbot
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: gdb-buildbot @ 2020-03-09 10:46 UTC (permalink / raw)
To: gdb-testers
*** TEST RESULTS FOR COMMIT b570b954bc5c1d6a6edb363c7bdba814bc1fd174 ***
commit b570b954bc5c1d6a6edb363c7bdba814bc1fd174
Author: Alan Modra <amodra@gmail.com>
AuthorDate: Tue Feb 25 12:48:43 2020 +1030
Commit: Alan Modra <amodra@gmail.com>
CommitDate: Wed Feb 26 10:37:13 2020 +1030
Limit bogus archive parsed_size
Archive element size is given by data in the archive, and thus is
subject to attack by fuzzers. The only harm this allows is allocation
of huge amounts of memory, but some systems don't handle that well.
So limit archive element size to archive file size.
* bfdio.c (bfd_get_file_size): Ignore bogus archive element sizes.
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 7e8e454632..5855df7c6b 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,7 @@
+2020-02-26 Alan Modra <amodra@gmail.com>
+
+ * bfdio.c (bfd_get_file_size): Ignore bogus archive element sizes.
+
2020-02-25 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/25584
diff --git a/bfd/bfdio.c b/bfd/bfdio.c
index 49e0958526..71ac17ec51 100644
--- a/bfd/bfdio.c
+++ b/bfd/bfdio.c
@@ -25,6 +25,7 @@
#include <limits.h>
#include "bfd.h"
#include "libbfd.h"
+#include "aout/ar.h"
#ifndef S_IXUSR
#define S_IXUSR 0100 /* Execute by owner. */
@@ -460,11 +461,24 @@ DESCRIPTION
ufile_ptr
bfd_get_file_size (bfd *abfd)
{
+ ufile_ptr file_size, archive_size = (ufile_ptr) -1;
+
if (abfd->my_archive != NULL
&& !bfd_is_thin_archive (abfd->my_archive))
- return arelt_size (abfd);
+ {
+ struct areltdata *adata = (struct areltdata *) abfd->arelt_data;
+ archive_size = adata->parsed_size;
+ /* If the archive is compressed we can't compare against file size. */
+ if (memcmp (((struct ar_hdr *) adata->arch_header)->ar_fmag,
+ "Z\012", 2) == 0)
+ return archive_size;
+ abfd = abfd->my_archive;
+ }
- return bfd_get_size (abfd);
+ file_size = bfd_get_size (abfd);
+ if (archive_size < file_size)
+ return archive_size;
+ return file_size;
}
/*
^ permalink raw reply [flat|nested] 7+ messages in thread
* Failures on Fedora-i686, branch master
2020-03-09 10:46 [binutils-gdb] Limit bogus archive parsed_size gdb-buildbot
@ 2020-03-09 10:46 ` gdb-buildbot
2020-03-09 11:48 ` Failures on Fedora-x86_64-m64, " gdb-buildbot
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: gdb-buildbot @ 2020-03-09 10:46 UTC (permalink / raw)
To: gdb-testers
Buildername:
Fedora-i686
Worker:
fedora-x86-64-4
Full Build URL:
https://gdb-buildbot.osci.io/#builders/18/builds/2312
Author:
Alan Modra <amodra@gmail.com>
Commit tested:
b570b954bc5c1d6a6edb363c7bdba814bc1fd174
Subject of commit:
Limit bogus archive parsed_size
Testsuite logs (gdb.sum, gdb.log and others):
https://gdb-buildbot.osci.io/results/Fedora-i686/b5/b570b954bc5c1d6a6edb363c7bdba814bc1fd174/
*** Diff to previous build ***
==============================================
PASS -> FAIL: gdb.base/reread.exp: opts= "-fPIE" "ldflags=-pie" : second pass: run to foo
==============================================
*** Complete list of XFAILs for this builder ***
To obtain the list of XFAIL tests for this builder, go to:
<https://gdb-buildbot.osci.io/results/Fedora-i686/b5/b570b954bc5c1d6a6edb363c7bdba814bc1fd174//xfail.gz>
You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:
<https://gdb-buildbot.osci.io/results/Fedora-i686/b5/b570b954bc5c1d6a6edb363c7bdba814bc1fd174//xfail.table.gz>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Failures on Fedora-x86_64-m64, branch master
2020-03-09 10:46 [binutils-gdb] Limit bogus archive parsed_size gdb-buildbot
2020-03-09 10:46 ` Failures on Fedora-i686, branch master gdb-buildbot
@ 2020-03-09 11:48 ` gdb-buildbot
2020-03-09 12:26 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " gdb-buildbot
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: gdb-buildbot @ 2020-03-09 11:48 UTC (permalink / raw)
To: gdb-testers
Buildername:
Fedora-x86_64-m64
Worker:
fedora-x86-64-4
Full Build URL:
https://gdb-buildbot.osci.io/#builders/3/builds/2369
Author:
Alan Modra <amodra@gmail.com>
Commit tested:
b570b954bc5c1d6a6edb363c7bdba814bc1fd174
Subject of commit:
Limit bogus archive parsed_size
Testsuite logs (gdb.sum, gdb.log and others):
https://gdb-buildbot.osci.io/results/Fedora-x86_64-m64/b5/b570b954bc5c1d6a6edb363c7bdba814bc1fd174/
*** Diff to previous build ***
==============================================
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: multi_scope: second thread: print i02
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: multi_scope: second thread: print i12
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: multi_scope: second thread: print i22
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 1st call: 2nd thread: print k
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 1st call: 2nd thread: print r
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 1st call: 2nd thread: print z
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 2nd call: 2nd thread: print k
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 2nd call: 2nd thread: print r
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 2nd call: 2nd thread: print z
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: inner_threads: 2nd stop: print i
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: inner_threads: 2nd stop: print j
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: outer_threads: outer stop: print i
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: outer_threads: outer stop: print j
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: single_scope: second thread: print i3
==============================================
*** Complete list of XFAILs for this builder ***
To obtain the list of XFAIL tests for this builder, go to:
<https://gdb-buildbot.osci.io/results/Fedora-x86_64-m64/b5/b570b954bc5c1d6a6edb363c7bdba814bc1fd174//xfail.gz>
You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:
<https://gdb-buildbot.osci.io/results/Fedora-x86_64-m64/b5/b570b954bc5c1d6a6edb363c7bdba814bc1fd174//xfail.table.gz>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch master
2020-03-09 10:46 [binutils-gdb] Limit bogus archive parsed_size gdb-buildbot
2020-03-09 10:46 ` Failures on Fedora-i686, branch master gdb-buildbot
2020-03-09 11:48 ` Failures on Fedora-x86_64-m64, " gdb-buildbot
@ 2020-03-09 12:26 ` gdb-buildbot
2020-03-09 12:28 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: gdb-buildbot @ 2020-03-09 12:26 UTC (permalink / raw)
To: gdb-testers
Buildername:
Fedora-x86_64-native-extended-gdbserver-m64
Worker:
fedora-x86-64-4
Full Build URL:
https://gdb-buildbot.osci.io/#builders/2/builds/2204
Author:
Alan Modra <amodra@gmail.com>
Commit tested:
b570b954bc5c1d6a6edb363c7bdba814bc1fd174
Subject of commit:
Limit bogus archive parsed_size
Testsuite logs (gdb.sum, gdb.log and others):
https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m64/b5/b570b954bc5c1d6a6edb363c7bdba814bc1fd174/
*** Diff to previous build ***
==============================================
new FAIL: gdb.base/break-interp.exp: LDprelinkNOdebugSEP: BINprelinkNOdebugNOpieNO: INNER: symbol-less: entry point reached
new FAIL: gdb.base/break-interp.exp: LDprelinkNOdebugSEP: BINprelinkNOdebugNOpieYES: INNER: symbol-less: entry point reached
PASS -> FAIL: gdb.base/reread.exp: opts= "-fPIE" "ldflags=-pie" : second pass: run to foo
UNRESOLVED -> FAIL: gdb.mi/mi-exec-run.exp: inferior-tty=main: mi=main: force-fail=1: run failure detected
UNRESOLVED -> FAIL: gdb.mi/mi-exec-run.exp: inferior-tty=main: mi=separate: force-fail=1: run failure detected
UNRESOLVED -> FAIL: gdb.mi/mi-exec-run.exp: inferior-tty=separate: mi=main: force-fail=1: run failure detected
UNRESOLVED -> FAIL: gdb.mi/mi-exec-run.exp: inferior-tty=separate: mi=separate: force-fail=1: run failure detected
FAIL -> UNRESOLVED: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: inferior 1 exited
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: multi_scope: second thread: print i02
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: multi_scope: second thread: print i12
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: multi_scope: second thread: print i22
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 1st call: 2nd thread: print k
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 1st call: 2nd thread: print r
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 1st call: 2nd thread: print z
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 2nd call: 1st thread: print k
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 2nd call: 1st thread: print r
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 2nd call: 1st thread: print z
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: inner_threads: 3rd stop: print i
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: inner_threads: 3rd stop: print j
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: outer_threads: outer stop: print i
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: outer_threads: outer stop: print j
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=off: cond_bp_target=0: inferior 1 exited
==============================================
*** Complete list of XFAILs for this builder ***
To obtain the list of XFAIL tests for this builder, go to:
<https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m64/b5/b570b954bc5c1d6a6edb363c7bdba814bc1fd174//xfail.gz>
You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:
<https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m64/b5/b570b954bc5c1d6a6edb363c7bdba814bc1fd174//xfail.table.gz>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master
2020-03-09 10:46 [binutils-gdb] Limit bogus archive parsed_size gdb-buildbot
` (2 preceding siblings ...)
2020-03-09 12:26 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " gdb-buildbot
@ 2020-03-09 12:28 ` gdb-buildbot
2020-03-10 20:57 ` Failures on Fedora-x86_64-native-gdbserver-m64, " gdb-buildbot
2020-03-12 1:01 ` Failures on Fedora-x86_64-native-gdbserver-m32, " gdb-buildbot
5 siblings, 0 replies; 7+ messages in thread
From: gdb-buildbot @ 2020-03-09 12:28 UTC (permalink / raw)
To: gdb-testers
Buildername:
Fedora-x86_64-native-extended-gdbserver-m32
Worker:
fedora-x86-64-1
Full Build URL:
https://gdb-buildbot.osci.io/#builders/4/builds/2204
Author:
Alan Modra <amodra@gmail.com>
Commit tested:
b570b954bc5c1d6a6edb363c7bdba814bc1fd174
Subject of commit:
Limit bogus archive parsed_size
Testsuite logs (gdb.sum, gdb.log and others):
https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m32/b5/b570b954bc5c1d6a6edb363c7bdba814bc1fd174/
*** Diff to previous build ***
==============================================
new FAIL: gdb.base/corefile-buildid.exp: exec sepdebug: info files
new FAIL: gdb.base/corefile-buildid.exp: exec: info files
new FAIL: gdb.base/corefile-buildid.exp: shared sepdebug: info files
new FAIL: gdb.base/corefile-buildid.exp: shared: info files
new FAIL: gdb.base/corefile-buildid.exp: symlink exec sepdebug: info files
new FAIL: gdb.base/corefile-buildid.exp: symlink exec: info files
new FAIL: gdb.base/corefile-buildid.exp: symlink shared sepdebug: info files
new FAIL: gdb.base/corefile-buildid.exp: symlink shared: info files
new FAIL: gdb.base/corefile.exp: core-file warning-free
PASS -> UNRESOLVED: gdb.base/reread.exp: opts= "" "" : second pass: breakpoint foo in first file
PASS -> UNRESOLVED: gdb.base/reread.exp: opts= "-fPIE" "ldflags=-pie" : second pass: breakpoint foo in first file
FAIL -> UNRESOLVED: gdb.mi/mi-exec-run.exp: inferior-tty=main: mi=main: force-fail=1: run failure detected
FAIL -> UNRESOLVED: gdb.mi/mi-exec-run.exp: inferior-tty=main: mi=separate: force-fail=1: run failure detected
FAIL -> UNRESOLVED: gdb.mi/mi-exec-run.exp: inferior-tty=separate: mi=main: force-fail=1: run failure detected
FAIL -> UNRESOLVED: gdb.mi/mi-exec-run.exp: inferior-tty=separate: mi=separate: force-fail=1: run failure detected
new FAIL: gdb.multi/multi-re-run.exp: re_run_inf=1: iter=2: continue until exit
new FAIL: gdb.multi/multi-re-run.exp: re_run_inf=1: iter=2: print re_run_var_1
new FAIL: gdb.multi/multi-re-run.exp: re_run_inf=2: iter=2: continue until exit
new FAIL: gdb.multi/multi-re-run.exp: re_run_inf=2: iter=2: print re_run_var_2
PASS -> FAIL: gdb.multi/multi-term-settings.exp: inf1_how=attach: inf2_how=attach: stop with control-c
FAIL -> UNRESOLVED: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: inferior 1 exited
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=off: cond_bp_target=0: inferior 1 exited
new KFAIL: gdb.threads/watchthreads2.exp: gdb can drop watchpoints in multithreaded app
==============================================
*** Complete list of XFAILs for this builder ***
To obtain the list of XFAIL tests for this builder, go to:
<https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m32/b5/b570b954bc5c1d6a6edb363c7bdba814bc1fd174//xfail.gz>
You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:
<https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m32/b5/b570b954bc5c1d6a6edb363c7bdba814bc1fd174//xfail.table.gz>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Failures on Fedora-x86_64-native-gdbserver-m64, branch master
2020-03-09 10:46 [binutils-gdb] Limit bogus archive parsed_size gdb-buildbot
` (3 preceding siblings ...)
2020-03-09 12:28 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot
@ 2020-03-10 20:57 ` gdb-buildbot
2020-03-12 1:01 ` Failures on Fedora-x86_64-native-gdbserver-m32, " gdb-buildbot
5 siblings, 0 replies; 7+ messages in thread
From: gdb-buildbot @ 2020-03-10 20:57 UTC (permalink / raw)
To: gdb-testers
Buildername:
Fedora-x86_64-native-gdbserver-m64
Worker:
fedora-x86-64-2
Full Build URL:
https://gdb-buildbot.osci.io/#builders/22/builds/2205
Author:
Alan Modra <amodra@gmail.com>
Commit tested:
b570b954bc5c1d6a6edb363c7bdba814bc1fd174
Subject of commit:
Limit bogus archive parsed_size
Testsuite logs (gdb.sum, gdb.log and others):
https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m64/b5/b570b954bc5c1d6a6edb363c7bdba814bc1fd174/
*** Diff to previous build ***
==============================================
new FAIL: gdb.base/gdb-caching-proc.exp: show print elements
PASS -> FAIL: gdb.threads/interrupted-hand-call.exp: continue until exit
==============================================
*** Complete list of XFAILs for this builder ***
To obtain the list of XFAIL tests for this builder, go to:
<https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m64/b5/b570b954bc5c1d6a6edb363c7bdba814bc1fd174//xfail.gz>
You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:
<https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m64/b5/b570b954bc5c1d6a6edb363c7bdba814bc1fd174//xfail.table.gz>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Failures on Fedora-x86_64-native-gdbserver-m32, branch master
2020-03-09 10:46 [binutils-gdb] Limit bogus archive parsed_size gdb-buildbot
` (4 preceding siblings ...)
2020-03-10 20:57 ` Failures on Fedora-x86_64-native-gdbserver-m64, " gdb-buildbot
@ 2020-03-12 1:01 ` gdb-buildbot
5 siblings, 0 replies; 7+ messages in thread
From: gdb-buildbot @ 2020-03-12 1:01 UTC (permalink / raw)
To: gdb-testers
Buildername:
Fedora-x86_64-native-gdbserver-m32
Worker:
fedora-x86-64-3
Full Build URL:
https://gdb-buildbot.osci.io/#builders/24/builds/2206
Author:
Alan Modra <amodra@gmail.com>
Commit tested:
b570b954bc5c1d6a6edb363c7bdba814bc1fd174
Subject of commit:
Limit bogus archive parsed_size
Testsuite logs (gdb.sum, gdb.log and others):
https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m32/b5/b570b954bc5c1d6a6edb363c7bdba814bc1fd174/
*** Diff to previous build ***
==============================================
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=off: cond_bp_target=0: inferior 1 exited
==============================================
*** Complete list of XFAILs for this builder ***
To obtain the list of XFAIL tests for this builder, go to:
<https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m32/b5/b570b954bc5c1d6a6edb363c7bdba814bc1fd174//xfail.gz>
You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:
<https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m32/b5/b570b954bc5c1d6a6edb363c7bdba814bc1fd174//xfail.table.gz>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-03-12 1:01 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-09 10:46 [binutils-gdb] Limit bogus archive parsed_size gdb-buildbot
2020-03-09 10:46 ` Failures on Fedora-i686, branch master gdb-buildbot
2020-03-09 11:48 ` Failures on Fedora-x86_64-m64, " gdb-buildbot
2020-03-09 12:26 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " gdb-buildbot
2020-03-09 12:28 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot
2020-03-10 20:57 ` Failures on Fedora-x86_64-native-gdbserver-m64, " gdb-buildbot
2020-03-12 1:01 ` Failures on Fedora-x86_64-native-gdbserver-m32, " gdb-buildbot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).