-
Notifications
You must be signed in to change notification settings - Fork 588
[AutoPR- Security] Patch binutils for CVE-2025-7546, CVE-2025-7545 [MEDIUM] #14331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
LeoMar4
merged 2 commits into
microsoft:3.0-dev
from
azurelinux-security:azure-autosec/binutils/3.0/870572
Jul 28, 2025
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
From 255c74cb9030905028a4f9ce07aff56039844152 Mon Sep 17 00:00:00 2001 | ||
From: Azure Linux Security Servicing Account | ||
<[email protected]> | ||
Date: Thu, 17 Jul 2025 08:46:38 +0000 | ||
Subject: [PATCH] Fix CVE CVE-2025-7545 in binutils | ||
|
||
Upstream Patch Reference: https://github.com/bminor/binutils-gdb/commit/08c3cbe5926e4d355b5cb70bbec2b1eeb40c2944.patch | ||
--- | ||
binutils/objcopy.c | 6 ++++++ | ||
1 file changed, 6 insertions(+) | ||
|
||
diff --git a/binutils/objcopy.c b/binutils/objcopy.c | ||
index 3569b890..c09d85d1 100644 | ||
--- a/binutils/objcopy.c | ||
+++ b/binutils/objcopy.c | ||
@@ -4514,6 +4514,7 @@ copy_section (bfd *ibfd, sec_ptr isection, void *obfdarg) | ||
char *to = (char *) memhunk; | ||
char *end = (char *) memhunk + size; | ||
int i; | ||
+ bfd_size_type memhunk_size = size; | ||
|
||
/* If the section address is not exactly divisible by the interleave, | ||
then we must bias the from address. If the copy_byte is less than | ||
@@ -4533,6 +4534,11 @@ copy_section (bfd *ibfd, sec_ptr isection, void *obfdarg) | ||
} | ||
|
||
size = (size + interleave - 1 - copy_byte) / interleave * copy_width; | ||
+ | ||
+ /* Don't extend the output section size. */ | ||
+ if (size > memhunk_size) | ||
+ size = memhunk_size; | ||
+ | ||
osection->lma /= interleave; | ||
if (copy_byte < extra) | ||
osection->lma++; | ||
-- | ||
2.45.3 | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
From 35b1514eba18a239c85867ab4132408d85e1e120 Mon Sep 17 00:00:00 2001 | ||
From: Azure Linux Security Servicing Account | ||
<[email protected]> | ||
Date: Thu, 17 Jul 2025 08:48:22 +0000 | ||
Subject: [PATCH] Fix CVE CVE-2025-7546 in binutils | ||
|
||
Upstream Patch Reference: https://github.com/bminor/binutils-gdb/commit/41461010eb7c79fee7a9d5f6209accdaac66cc6b.patch | ||
--- | ||
bfd/elf.c | 23 ++++++++++------------- | ||
1 file changed, 10 insertions(+), 13 deletions(-) | ||
|
||
diff --git a/bfd/elf.c b/bfd/elf.c | ||
index d38e0aff..1de0cec0 100644 | ||
--- a/bfd/elf.c | ||
+++ b/bfd/elf.c | ||
@@ -4120,20 +4120,17 @@ bfd_elf_set_group_contents (bfd *abfd, asection *sec, void *failedptrarg) | ||
break; | ||
} | ||
|
||
- /* We should always get here with loc == sec->contents + 4, but it is | ||
- possible to craft bogus SHT_GROUP sections that will cause segfaults | ||
- in objcopy without checking loc here and in the loop above. */ | ||
- if (loc == sec->contents) | ||
- BFD_ASSERT (0); | ||
- else | ||
+ /* We should always get here with loc == sec->contents + 4. Return | ||
+ an error for bogus SHT_GROUP sections. */ | ||
+ loc -= 4; | ||
+ if (loc != sec->contents) | ||
{ | ||
- loc -= 4; | ||
- if (loc != sec->contents) | ||
- { | ||
- BFD_ASSERT (0); | ||
- memset (sec->contents + 4, 0, loc - sec->contents); | ||
- loc = sec->contents; | ||
- } | ||
+ /* xgettext:c-format */ | ||
+ _bfd_error_handler (_("%pB: corrupted group section: `%pA'"), | ||
+ abfd, sec); | ||
+ bfd_set_error (bfd_error_bad_value); | ||
+ *failedptr = true; | ||
+ return; | ||
} | ||
|
||
H_PUT_32 (abfd, sec->flags & SEC_LINK_ONCE ? GRP_COMDAT : 0, loc); | ||
-- | ||
2.45.3 | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ | |
Summary: Contains a linker, an assembler, and other tools | ||
Name: binutils | ||
Version: 2.41 | ||
Release: 6%{?dist} | ||
Release: 7%{?dist} | ||
License: GPLv2+ | ||
Vendor: Microsoft Corporation | ||
Distribution: Azure Linux | ||
|
@@ -40,6 +40,8 @@ Patch6: CVE-2025-0840.patch | |
Patch7: CVE-2025-1744.patch | ||
Patch8: CVE-2025-5245.patch | ||
Patch9: CVE-2025-5244.patch | ||
Patch10: CVE-2025-7546.patch | ||
Patch11: CVE-2025-7545.patch | ||
Provides: bundled(libiberty) | ||
|
||
# Moving macro before the "SourceX" tags breaks PR checks parsing the specs. | ||
|
@@ -329,6 +331,9 @@ find %{buildroot} -type f -name "*.la" -delete -print | |
%do_files aarch64-linux-gnu %{build_aarch64} | ||
|
||
%changelog | ||
* Thu Jul 17 2025 Azure Linux Security Servicing Account <[email protected]> - 2.41-7 | ||
- Patch for CVE-2025-7546, CVE-2025-7545 | ||
|
||
* Wed May 28 2025 Akarsh Chaudhary <[email protected]> - 2.41-6 | ||
- Patch CVE-2025-5245 , CVE-2025-5244 | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for Suresh's comment of full build.
This is a fundamental package on which almost all the other packages depend on transitively.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build appears to have built and tested successfully @suresh-thelkar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the full build results looks good.