From 8342a8b7e10f9a917bf3f31843a9d8a9507fd74c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8D=9A=E6=B4=8B123?= <11434016+wangboyang6@user.noreply.gitee.com> Date: Wed, 23 Aug 2023 02:13:13 +0000 Subject: [PATCH] Fix CVE-2023-2222 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王博洋123 <11434016+wangboyang6@user.noreply.gitee.com> --- binutils-CVE-2023-2222.patch | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 binutils-CVE-2023-2222.patch diff --git a/binutils-CVE-2023-2222.patch b/binutils-CVE-2023-2222.patch new file mode 100644 index 0000000..a8095bb --- /dev/null +++ b/binutils-CVE-2023-2222.patch @@ -0,0 +1,25 @@ +--- a/bfd/ChangeLog ++++ b/bfd/ChangeLog +@@ -1,3 +1,9 @@ ++2022-12-23 Nick Clifton ++ ++ PR 29936 ++ * dwarf2.c (concat_filename): Fix check for a directory index off ++ the end of the directory table. ++ + 2022-12-21 Nick Clifton + + +--- a/bfd/dwarf2.c ++++ b/bfd/dwarf2.c +@@ -2047,7 +2047,8 @@ concat_filename (struct line_info_table *table, unsigned int file) + + if (table->files[file].dir + /* PR 17512: file: 0317e960. */ +- && table->files[file].dir <= table->num_dirs ++ && table->files[file].dir ++ <= (table->use_dir_and_file_0 ? table->num_dirs - 1 : table->num_dirs) + /* PR 17512: file: 7f3d2e4b. */ + && table->dirs != NULL) + { +-- \ No newline at end of file -- Gitee