Re: Issue 371445188: binutils:fuzz_dlltool: Null-dereference READ in scan_open_obj_file

2024-10-04 Thread buganizer-system

Replying to this email means your email address will be shared with the
team that works on this product.
https://issues.oss-fuzz.com/issues/371445188

Changed
Disclosure:   → Jan 2, 2025

___

Reference Info: 371445188 binutils:fuzz_dlltool: Null-dereference READ in
scan_open_obj_file
component:  Public Trackers > 1362134 > OSS Fuzz
status:  New
reporter:  87...@developer.gserviceaccount.com
cc:  am...@gmail.com, bug-binutils@gnu.org, da...@adalogics.com, and 2 more
collaborators:  co...@oss-fuzz.com
type:  Bug
access level:  Limited visibility
priority:  P2
severity:  S4
hotlist:  Reproducible, Stability-Memory-AddressSanitizer
retention:  Component default
Disclosure:  Jan 2, 2025
Project:  binutils
Reported:  Oct 4, 2024


Generated by Google IssueTracker notification system.

You're receiving this email because you are subscribed to updates on Google
IssueTracker issue 371445188
Unsubscribe from this issue.


Re: Issue 371233016: binutils:fuzz_nm: Null-dereference READ in _bfd_elf_is_local_label_name

2024-10-04 Thread buganizer-system

Replying to this email means your email address will be shared with the
team that works on this product.
https://issues.oss-fuzz.com/issues/371233016

Changed
Disclosure:   → Jan 2, 2025

___

Reference Info: 371233016 binutils:fuzz_nm: Null-dereference READ in
_bfd_elf_is_local_label_name
component:  Public Trackers > 1362134 > OSS Fuzz
status:  New
reporter:  87...@developer.gserviceaccount.com
cc:  am...@gmail.com, bug-binutils@gnu.org, da...@adalogics.com, and 2 more
collaborators:  co...@oss-fuzz.com
type:  Bug
access level:  Limited visibility
priority:  P2
severity:  S4
hotlist:  Reproducible, Stability-Memory-AddressSanitizer
retention:  Component default
Disclosure:  Jan 2, 2025
Project:  binutils
Reported:  Oct 4, 2024


Generated by Google IssueTracker notification system.

You're receiving this email because you are subscribed to updates on Google
IssueTracker issue 371233016
Unsubscribe from this issue.


Re: Issue 371292575: binutils:fuzz_objdump: Null-dereference READ in _bfd_x86_elf_get_synthetic_symtab

2024-10-04 Thread buganizer-system

Replying to this email means your email address will be shared with the
team that works on this product.
https://issues.oss-fuzz.com/issues/371292575

Changed
Disclosure:   → Jan 2, 2025

___

Reference Info: 371292575 binutils:fuzz_objdump: Null-dereference READ in
_bfd_x86_elf_get_synthetic_symtab
component:  Public Trackers > 1362134 > OSS Fuzz
status:  New
reporter:  87...@developer.gserviceaccount.com
cc:  am...@gmail.com, bug-binutils@gnu.org, da...@adalogics.com, and 2 more
collaborators:  co...@oss-fuzz.com
type:  Bug
access level:  Limited visibility
priority:  P2
severity:  S4
hotlist:  Reproducible, Stability-AFL, Stability-LibFuzzer,
Stability-Memory-AddressSanitizer
retention:  Component default
Disclosure:  Jan 2, 2025
Project:  binutils
Reported:  Oct 4, 2024


Generated by Google IssueTracker notification system.

You're receiving this email because you are subscribed to updates on Google
IssueTracker issue 371292575
Unsubscribe from this issue.


Issue 371292575: binutils:fuzz_objdump: Null-dereference READ in _bfd_x86_elf_get_synthetic_symtab

2024-10-04 Thread buganizer-system

Replying to this email means your email address will be shared with the
team that works on this product.
https://issues.oss-fuzz.com/issues/371292575

Reference Info: 371292575 binutils:fuzz_objdump: Null-dereference READ in
_bfd_x86_elf_get_synthetic_symtab
component:  Public Trackers > 1362134 > OSS Fuzz
status:  New
reporter:  87...@developer.gserviceaccount.com
cc:  am...@gmail.com, bug-binutils@gnu.org, da...@adalogics.com, and 2 more
collaborators:  co...@oss-fuzz.com
type:  Bug
access level:  Limited visibility
priority:  P2
severity:  S4
hotlist:  Reproducible, Stability-AFL, Stability-LibFuzzer,
Stability-Memory-AddressSanitizer
retention:  Component default
Project:  binutils
Reported:  Oct 4, 2024

87...@developer.gserviceaccount.com added comment #1:
Detailed Report: https://oss-fuzz.com/testcase?key=6386414641545216

Project: binutils
Fuzzing Engine: afl
Fuzz Target: fuzz_objdump
Job Type: afl_asan_binutils
Platform Id: linux

Crash Type: Null-dereference READ
Crash Address: 0x
Crash State:
  _bfd_x86_elf_get_synthetic_symtab
  elf_x86_64_get_synthetic_symtab
  dump_bfd

Sanitizer: address (ASAN)

Regressed:
https://oss-fuzz.com/revisions?job=afl_asan_binutils&range=202410020612:202410030621

Reproducer Testcase:
https://oss-fuzz.com/download?testcase_id=6386414641545216

Issue filed automatically.

See https://google.github.io/oss-fuzz/advanced-topics/reproducing for
instructions to reproduce this bug locally.
When you fix this bug, please
  * mention the fix revision(s).
  * state whether the bug was a short-lived regression or an old bug in any
stable releases.
  * add any other useful information.
This information can help downstream consumers.

If you need to contact the OSS-Fuzz team with a question, concern, or any
other feedback, please file an issue at
https://github.com/google/oss-fuzz/issues. Comments on individual Monorail
issues are not monitored.

This bug is subject to a 90 day disclosure deadline. If 90 days elapse
without an upstream patch, then the bug report will automatically
become visible to the public.


Generated by Google IssueTracker notification system.

You're receiving this email because you are subscribed to updates on Google
IssueTracker issue 371292575
Unsubscribe from this issue.


Issue 371233016: binutils:fuzz_nm: Null-dereference READ in _bfd_elf_is_local_label_name

2024-10-04 Thread buganizer-system

Replying to this email means your email address will be shared with the
team that works on this product.
https://issues.oss-fuzz.com/issues/371233016

Reference Info: 371233016 binutils:fuzz_nm: Null-dereference READ in
_bfd_elf_is_local_label_name
component:  Public Trackers > 1362134 > OSS Fuzz
status:  New
reporter:  87...@developer.gserviceaccount.com
cc:  am...@gmail.com, bug-binutils@gnu.org, da...@adalogics.com, and 2 more
collaborators:  co...@oss-fuzz.com
type:  Bug
access level:  Limited visibility
priority:  P2
severity:  S4
hotlist:  Reproducible, Stability-Memory-AddressSanitizer
retention:  Component default
Project:  binutils
Reported:  Oct 4, 2024

87...@developer.gserviceaccount.com added comment #1:
Detailed Report: https://oss-fuzz.com/testcase?key=5164456113405952

Project: binutils
Fuzzing Engine: honggfuzz
Fuzz Target: fuzz_nm
Job Type: honggfuzz_asan_binutils
Platform Id: linux

Crash Type: Null-dereference READ
Crash Address: 0x
Crash State:
  _bfd_elf_is_local_label_name
  display_rel_file
  display_file

Sanitizer: address (ASAN)

Regressed:
https://oss-fuzz.com/revisions?job=honggfuzz_asan_binutils&range=202410020612:202410030621

Reproducer Testcase:
https://oss-fuzz.com/download?testcase_id=5164456113405952

Issue filed automatically.

See https://google.github.io/oss-fuzz/advanced-topics/reproducing for
instructions to reproduce this bug locally.
When you fix this bug, please
  * mention the fix revision(s).
  * state whether the bug was a short-lived regression or an old bug in any
stable releases.
  * add any other useful information.
This information can help downstream consumers.

If you need to contact the OSS-Fuzz team with a question, concern, or any
other feedback, please file an issue at
https://github.com/google/oss-fuzz/issues. Comments on individual Monorail
issues are not monitored.

This bug is subject to a 90 day disclosure deadline. If 90 days elapse
without an upstream patch, then the bug report will automatically
become visible to the public.


Generated by Google IssueTracker notification system.

You're receiving this email because you are subscribed to updates on Google
IssueTracker issue 371233016
Unsubscribe from this issue.


Issue 371445188: binutils:fuzz_dlltool: Null-dereference READ in scan_open_obj_file

2024-10-04 Thread buganizer-system

Replying to this email means your email address will be shared with the
team that works on this product.
https://issues.oss-fuzz.com/issues/371445188

Reference Info: 371445188 binutils:fuzz_dlltool: Null-dereference READ in
scan_open_obj_file
component:  Public Trackers > 1362134 > OSS Fuzz
status:  New
reporter:  87...@developer.gserviceaccount.com
cc:  am...@gmail.com, bug-binutils@gnu.org, da...@adalogics.com, and 2 more
collaborators:  co...@oss-fuzz.com
type:  Bug
access level:  Limited visibility
priority:  P2
severity:  S4
hotlist:  Reproducible, Stability-Memory-AddressSanitizer
retention:  Component default
Project:  binutils
Reported:  Oct 4, 2024

87...@developer.gserviceaccount.com added comment #1:
Detailed Report: https://oss-fuzz.com/testcase?key=6536855803199488

Project: binutils
Fuzzing Engine: honggfuzz
Fuzz Target: fuzz_dlltool
Job Type: honggfuzz_asan_binutils
Platform Id: linux

Crash Type: Null-dereference READ
Crash Address: 0x
Crash State:
  scan_open_obj_file
  scan_obj_file
  fuzz_dlltool.c

Sanitizer: address (ASAN)

Regressed:
https://oss-fuzz.com/revisions?job=honggfuzz_asan_binutils&range=202410020612:202410030621

Reproducer Testcase:
https://oss-fuzz.com/download?testcase_id=6536855803199488

Issue filed automatically.

See https://google.github.io/oss-fuzz/advanced-topics/reproducing for
instructions to reproduce this bug locally.
When you fix this bug, please
  * mention the fix revision(s).
  * state whether the bug was a short-lived regression or an old bug in any
stable releases.
  * add any other useful information.
This information can help downstream consumers.

If you need to contact the OSS-Fuzz team with a question, concern, or any
other feedback, please file an issue at
https://github.com/google/oss-fuzz/issues. Comments on individual Monorail
issues are not monitored.

This bug is subject to a 90 day disclosure deadline. If 90 days elapse
without an upstream patch, then the bug report will automatically
become visible to the public.


Generated by Google IssueTracker notification system.

You're receiving this email because you are subscribed to updates on Google
IssueTracker issue 371445188
Unsubscribe from this issue.


[Bug ld/32240] New: warning: relocation against `_Z5test2v' in read-only section

2024-10-04 Thread federico.kircheis at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=32240

Bug ID: 32240
   Summary: warning: relocation against `_Z5test2v' in read-only
section
   Product: binutils
   Version: 2.43.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: federico.kircheis at gmail dot com
  Target Milestone: ---

Hello, I'm curently getting the warning


warning: relocation against `_Z5test2v' in read-only section 


but I find no way how to discard it (I believe it is a non-issue) or fix it (in
case it is an issue).


My code looks like

cpp

#include 
#include 
#include 

using test_signature = void();

#define CONCAT_IMPL(x, y) x##y
#define CONCAT(x, y) CONCAT_IMPL(x, y)
#define TEST(name) \
  void name();\
  [[gnu::used]] constexpr auto CONCAT(helper, __LINE__)
[[gnu::section(".tmptests")]] = &name; \
  void name()

TEST(test1){std::puts("test1");}
TEST(test2){std::puts("test2");}

std::span get_tests() noexcept {
  extern const test_signature* tests_begin[];
  extern const test_signature* tests_end[];
  const auto tests_size = ((uintptr_t)(tests_end) -
(uintptr_t)(tests_begin))/sizeof(test_signature*);
  test_signature** begin = tests_begin;
  asm("":"+r"(begin));
  return std::span(begin, begin + tests_size);
}

int main(){
  auto funcs = get_tests();

  for(const auto& v : funcs){
v();
  }
}


the linker script I'm using looks like



linkerscript.ld 
SECTIONS
{
  .rodata (READONLY) : {
KEEP(*(.rodata))
PROVIDE(tests_begin = .);
KEEP(*(.tmptests))
PROVIDE(tests_end = .);
  }
}
INSERT AFTER .rodata;



And the command line using for compiling


> g++ --std=c++23 -Wl,-Tlinkerscript.ld -O3 main.cpp
/usr/bin/ld: /tmp/cc1SVaUI.o: warning: relocation against `_Z5test2v' in
read-only section `.tmptests'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE


A variation I've tried (with no difference, same warning)


SECTIONS
{
  tests (READONLY) : {
PROVIDE(tests_begin = .);
KEEP(*(.tmptests))
PROVIDE(tests_end = .);
  }
}
INSERT AFTER .text;


Note that if I leave (READONLY) out, I get following warning


/usr/bin/ld: warning: a.out has a LOAD segment with RWX permissions


(out of curiosity, is it possible to remove only the X permission? I believe
`READONLY` removes both W and X)

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


[Bug ld/32240] warning: relocation against `_Z5test2v' in read-only section

2024-10-04 Thread federico.kircheis at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=32240

--- Comment #1 from federico.kircheis at gmail dot com  ---
Forgot to mention


> g++ --version
g++ (Debian 14.2.0-3) 14.2.0

> ldd --version
ldd (Debian GLIBC 2.40-2) 2.40


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


[Bug ld/32240] warning: relocation against `_Z5test2v' in read-only section

2024-10-04 Thread federico.kircheis at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=32240

--- Comment #2 from federico.kircheis at gmail dot com  ---

> ld --version
GNU ld (GNU Binutils for Debian) 2.43.1


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


[Bug binutils/32238] Performance issues found from binutils version '2.36' version with function 'lang_output_section_statement_lookup'

2024-10-04 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=32238

Alan Modra  changed:

   What|Removed |Added

   Severity|critical|normal

--- Comment #4 from Alan Modra  ---
Host and target?  What were the command line options passed to ld?  Without
this basic information all we can do is make wild guesses.

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


[Bug binutils/32238] Performance issues found from binutils version '2.36' version with function 'lang_output_section_statement_lookup'

2024-10-04 Thread kumar.naveen099 at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=32238

Naveen Kumar  changed:

   What|Removed |Added

Summary|Performance issues found|Performance issues found
   |with binutils version   |from binutils version
   |'2.36' version with |'2.36' version with
   |function|function
   |'lang_output_section_statem |'lang_output_section_statem
   |ent_lookup' |ent_lookup'

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