[Bug gold/28876] gold should error out when creating a direct reference to protected function

2022-02-09 Thread pinskia at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=28876

Andrew Pinski  changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu.org
   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=37611

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/28875] ld should warn or error out about creating copy relocs & direct external references for protected symbols

2022-02-09 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28875

H.J. Lu  changed:

   What|Removed |Added

   Target Milestone|--- |2.39

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/28875] ld should warn or error out about creating copy relocs & direct external references for protected symbols

2022-02-09 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28875

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1
   Assignee|unassigned at sourceware dot org   |hjl.tools at gmail dot 
com
   Last reconfirmed||2022-02-10

--- Comment #1 from H.J. Lu  ---
Created attachment 13964
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13964=edit
A patch

Try this.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/28875] ld should warn or error out about creating copy relocs & direct external references for protected symbols

2022-02-09 Thread pinskia at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=28875

Andrew Pinski  changed:

   What|Removed |Added

   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=19520

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/28875] ld should warn or error out about creating copy relocs & direct external references for protected symbols

2022-02-09 Thread pinskia at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=28875

Andrew Pinski  changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu.org
   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=37611

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Issue 40903 in oss-fuzz: binutils:fuzz_dlltool: Use-of-uninitialized-value in xstrdup

2022-02-09 Thread sheriffbot via monorail
Updates:
Labels: -restrict-view-commit -deadline-approaching Deadline-Exceeded

Comment #4 on issue 40903 by sheriffbot: binutils:fuzz_dlltool: 
Use-of-uninitialized-value in xstrdup
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40903#c4

This bug has exceeded our disclosure deadline. It has been opened to the public.

- Your friendly Sheriffbot

-- 
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.

[Bug ld/28875] ld should warn or error out about creating copy relocs & direct external references for protected symbols

2022-02-09 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28875

H.J. Lu  changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug gold/28876] New: gold should error out when creating a direct reference to protected function

2022-02-09 Thread thiago at kde dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=28876

Bug ID: 28876
   Summary: gold should error out when creating a direct reference
to protected function
   Product: binutils
   Version: 2.38
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: gold
  Assignee: ccoutant at gmail dot com
  Reporter: thiago at kde dot org
CC: ian at airs dot com
  Target Milestone: ---

Related to #28875

Given library:

$ cat libb2.cpp   
__attribute__((visibility("protected"))) long internal_i = 0;
__attribute__((visibility("protected"))) long internal_f()
{
return 2;
}
$ gcc -shared -fPIC -o libb.so libb2.cpp
$ eu-readelf --dyn-syms libb.so| grep internal
5: 4028  8 OBJECT  GLOBAL PROTECTED 22 internal_i
6: 10f9 11 FUNCGLOBAL PROTECTED 11 _Z10internal_fv

gold already produces an error if it would need to create a copy relocation for
the variable:

$ cat main.cpp 
extern __attribute__((visibility("default"))) long internal_i;
extern __attribute__((visibility("default"))) long internal_f();

int main()
{
internal_i = (long) _f;
}
$ gcc -fuse-ld=gold main.cpp libb.so
/usr/bin/ld.gold: error: /tmp/ccg0cNpy.o: cannot make copy relocation for
protected symbol 'internal_i', defined in libb.so
collect2: error: ld returned 1 exit status

However, it does not for the function address:

$ cat main.cpp 
extern __attribute__((visibility("default"))) long internal_f();

int main()
{
return (long) _f;
}
$ gcc -fuse-ld=gold main.cpp libb.so  
$ objdump --no-show -Cdr a.out| sed -n '/:/,/^$/p'
004005e6 :
  4005e6:   push   %rbp
  4005e7:   mov%rsp,%rbp
  4005ea:   mov$0x4004f0,%eax
  4005ef:   pop%rbp
  4005f0:   ret

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/28875] New: ld should warn or error out about creating copy relocs & direct external references for protected symbols

2022-02-09 Thread thiago at kde dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=28875

Bug ID: 28875
   Summary: ld should warn or error out about creating copy relocs
& direct external references for protected symbols
   Product: binutils
   Version: 2.38
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: thiago at kde dot org
  Target Milestone: ---

Related: #15228, #17711, #27973.

For a library that has protected symbols:

$ cat libb2.cpp   
__attribute__((visibility("protected"))) long internal_i = 0;
__attribute__((visibility("protected"))) long internal_f()
{
return 2;
}
$ gcc -shared -fPIC -o libb.so libb2.cpp
$ eu-readelf --dyn-syms libb.so| grep internal
5: 4028  8 OBJECT  GLOBAL PROTECTED 22 internal_i
6: 10f9 11 FUNCGLOBAL PROTECTED 11 _Z10internal_fv

The linker should produce a warning when creating copy relocations or
position-dependent moves:

$ cat main.cpp 
extern __attribute__((visibility("default"))) long internal_i;
extern __attribute__((visibility("default"))) long internal_f();

int main()
{
internal_i = (long) _f;
}
$ gcc main.cpp libb.so 
[no error]

gold already does:
$ gcc -fuse-ld=gold main.cpp libb.so
/usr/bin/ld.gold: error: /tmp/ccg0cNpy.o: cannot make copy relocation for
protected symbol 'internal_i', defined in libb.so
collect2: error: ld returned 1 exit status

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/27973] ld x86: Allow direct access to protected function symbols

2022-02-09 Thread thiago at kde dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=27973

Thiago Macieira  changed:

   What|Removed |Added

 CC||thiago at kde dot org

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Issue 40925 in oss-fuzz: binutils:fuzz_strings: Timeout in fuzz_strings

2022-02-09 Thread sheriffbot via monorail
Updates:
Labels: -restrict-view-commit -deadline-approaching Deadline-Exceeded

Comment #4 on issue 40925 by sheriffbot: binutils:fuzz_strings: Timeout in 
fuzz_strings
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40925#c4

This bug has exceeded our disclosure deadline. It has been opened to the public.

- Your friendly Sheriffbot

-- 
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.

Issue 40915 in oss-fuzz: binutils:fuzz_dlltool: Global-buffer-overflow in xstrdup

2022-02-09 Thread sheriffbot via monorail
Updates:
Labels: -restrict-view-commit -deadline-approaching Deadline-Exceeded

Comment #4 on issue 40915 by sheriffbot: binutils:fuzz_dlltool: 
Global-buffer-overflow in xstrdup
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40915#c4

This bug has exceeded our disclosure deadline. It has been opened to the public.

- Your friendly Sheriffbot

-- 
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.

[Bug binutils/28867] Mingw to generate bogus.o on French locale

2022-02-09 Thread marcandre.lureau at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28867

Marc-André Lureau  changed:

   What|Removed |Added

 CC||marcandre.lureau at gmail dot 
com

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/28763] SIGSEGV during processing of program headers via readelf

2022-02-09 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28763

Alan Modra  changed:

   What|Removed |Added

   Assignee|unassigned at sourceware dot org   |amodra at gmail dot com
 Resolution|--- |FIXED
 Status|UNCONFIRMED |RESOLVED
   Target Milestone|--- |2.39

--- Comment #5 from Alan Modra  ---
Fixed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/28763] SIGSEGV during processing of program headers via readelf

2022-02-09 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=28763

--- Comment #4 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Alan Modra :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2969c3b37b228c34566e7fee63ee2395a1c227ad

commit 2969c3b37b228c34566e7fee63ee2395a1c227ad
Author: Alan Modra 
Date:   Wed Feb 9 22:24:44 2022 +1030

PR28763, SIGSEGV during processing of program headers via readelf

PR 28763
* readelf.c (process_file_header): Discard any cached program
headers if there is an extension field for e_phnum in first
section header.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/28753] Heap-based Buffer Overflow in bfd_getl32

2022-02-09 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28753

Alan Modra  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |2.38

--- Comment #3 from Alan Modra  ---
Fixed mainline and 2.38 branch

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/28826] [2.38 Regression] ld segfaults building xen

2022-02-09 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28826

Alan Modra  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
   Target Milestone|--- |2.38
 Resolution|--- |FIXED

--- Comment #7 from Alan Modra  ---
Fixed mainline and 2.38 branch

-- 
You are receiving this mail because:
You are on the CC list for the bug.