File: CVE-2020-25713-raptor2-malformed-input-file-can-lead.patch

package info (click to toggle)
raptor2 2.0.15-4%2Bdeb12u1
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 18,832 kB
  • sloc: ansic: 37,283; sh: 11,996; xml: 6,706; makefile: 2,831; yacc: 2,434; perl: 1,130; lex: 1,070
file content (29 lines) | stat: -rw-r--r-- 1,111 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From: =?utf-8?q?Caol=C3=A1n_McNamara?= <caolanm@redhat.com>
Date: Tue, 24 Nov 2020 10:30:20 +0000
Subject: [PATCH] CVE-2020-25713 raptor2: malformed input file can lead to a
 segfault

due to an out of bounds array access in
raptor_xml_writer_start_element_common

See:
https://bugs.mageia.org/show_bug.cgi?id=27605
https://www.openwall.com/lists/oss-security/2020/11/13/1
https://gerrit.libreoffice.org/c/core/+/106249
---
 src/raptor_xml_writer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/raptor_xml_writer.c b/src/raptor_xml_writer.c
index 0d3a36a..17b1c44 100644
--- a/src/raptor_xml_writer.c
+++ b/src/raptor_xml_writer.c
@@ -221,7 +221,7 @@ raptor_xml_writer_start_element_common(raptor_xml_writer* xml_writer,
           
           /* check it wasn't an earlier declaration too */
           for(j = 0; j < nspace_declarations_count; j++)
-            if(nspace_declarations[j].nspace == element->attributes[j]->nspace) {
+            if(nspace_declarations[j].nspace == element->attributes[i]->nspace) {
               declare_me = 0;
               break;
             }