mirror of
https://git.yoctoproject.org/poky
synced 2026-03-04 22:39:39 +01:00
Source: binutils-gdb.git MR: 73893 Type: Security Fix Disposition: Backport from 'binutils-gdb.git/master' branch ChangeID: 94c3ef8c1fa2e84e84ad76fb45307848d98817c8 Description: PR 21665 : Fixed multiple heap based buffer overflow Affects: <= 2.28 Author: Nick Clifton <nickc@redhat.com> (From OE-Core rev: a36978f0dd372ec836f63942f965652ca3716e3f) Signed-off-by: Thiruvadi Rajaraman <trajaraman@mvista.com> Reviewed-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
56 lines
1.8 KiB
Diff
56 lines
1.8 KiB
Diff
commit ea9aafc41a764e4e2dbb88a7b031e886b481b99a
|
|
Author: Alan Modra <amodra@gmail.com>
|
|
Date: Tue Jun 27 14:43:49 2017 +0930
|
|
|
|
Warning fix
|
|
|
|
PR binutils/21665
|
|
* libbfd.c (_bfd_generic_get_section_contents): Warning fix.
|
|
(_bfd_generic_get_section_contents_in_window): Likewise.
|
|
|
|
Upstream-Status: Backport
|
|
|
|
CVE: CVE-2017-9955
|
|
Signed-off-by: Thiruvadi Rajaraman <trajaraman@mvista.com>
|
|
|
|
|
|
Index: git/bfd/libbfd.c
|
|
===================================================================
|
|
--- git.orig/bfd/libbfd.c 2017-09-21 18:07:34.777651818 +0530
|
|
+++ git/bfd/libbfd.c 2017-09-21 18:07:34.761651695 +0530
|
|
@@ -805,7 +805,7 @@
|
|
filesz = bfd_get_file_size (abfd);
|
|
if (offset + count < count
|
|
|| offset + count > sz
|
|
- || section->filepos + offset + count > filesz)
|
|
+ || (ufile_ptr) section->filepos + offset + count > filesz)
|
|
{
|
|
bfd_set_error (bfd_error_invalid_operation);
|
|
return FALSE;
|
|
@@ -863,7 +863,7 @@
|
|
sz = section->size;
|
|
filesz = bfd_get_file_size (abfd);
|
|
if (offset + count > sz
|
|
- || section->filepos + offset + count > filesz
|
|
+ || (ufile_ptr) section->filepos + offset + count > filesz
|
|
|| ! bfd_get_file_window (abfd, section->filepos + offset, count, w,
|
|
TRUE))
|
|
return FALSE;
|
|
Index: git/bfd/ChangeLog
|
|
===================================================================
|
|
--- git.orig/bfd/ChangeLog 2017-09-21 18:06:39.973228125 +0530
|
|
+++ git/bfd/ChangeLog 2017-09-21 18:09:41.798640031 +0530
|
|
@@ -19,6 +19,12 @@
|
|
* libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
|
|
Add "count", not "sz".
|
|
|
|
+2017-06-27 Alan Modra <amodra@gmail.com>
|
|
+
|
|
+ PR binutils/21665
|
|
+ * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
|
|
+ (_bfd_generic_get_section_contents_in_window): Likewise.
|
|
+
|
|
2017-06-26 Pedro Alves <palves@redhat.com>
|
|
|
|
PR binutils/21665
|