CVE-2016-10375 (published 2017-05-26T17:29Z)

Yodl before 3.07.01 has a Buffer Over-read in the queue_push function in queue/queuepush.c.

Severity: HIGH
CVSS v2 base score: 7.5 (AV:N/AC:L/Au:N/C:P/I:P/A:P)
CVSS v3 base score: 9.8, CRITICAL (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)

Weakness information:
cwe_id: CWE-119
cwe_name: Improper Restriction of Operations within the Bounds of a Memory Buffer
description: The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.
extended_description: 
            Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data.
         
         

Fix information:
repo_url: https://github.com/fbb-git/yodl
commit_details: repo_url: https://github.com/fbb-git/yodl
author: Frank B. Brokken
author_date: 2016-02-04 22:37:17+01:00
msg: fixed invalid memory reads detected by the address sanitizer
repository: repo_url: https://github.com/fbb-git/yodl
repo_name: fbb-git/yodl
description: Yodl implements a document language. Yodl documents can easily be converted to, e.g., html, LaTeX, txt, man
repo_language: C
owner: fbb-git
file_changes: filename: VERSION
change_type: ModificationType.MODIFY
diff: @@ -1,2 +1,2 @@
-#define VERSION "3.06.00"
-#define YEARS   "1996-2015"
+#define VERSION "3.07.00"
+#define YEARS   "1996-2016"

programming_language: Ruby
filename: changelog
change_type: ModificationType.MODIFY
diff: @@ -1,3 +1,12 @@
+yodl (3.07.00)
+
+  * Hanno B\"ock reported an invalid memory read found by the address sanitizer
+    (using -fsanitize=address). Fixed in this release. The address santizer
+    also reported some memory leaks which are not nice, but their fix will
+    probably take some more time.
+
+ -- Frank B. Brokken <f.b.brokken@rug.nl>  Thu, 04 Feb 2016 22:35:44 +0100
+
 yodl (3.06.00)
 
   * The title, author, date and affiliation elements in html document headers

programming_language: Markdown
filename: queuepush.c
change_type: ModificationType.MODIFY
diff: @@ -29,8 +29,11 @@ void queue_push(register Queue *qp, size_t extra_length, char const *info)
 
     if (extra_length > available_length)
     {
+        size_t original_length = memory_length;
+
                                                    /* enlarge the buffer:  */
         memory_length += extra_length - available_length + BLOCK_QUEUE;
+
         cp = new_memory(memory_length, sizeof(char));
 
         if (message_show(MSG_INFO))
@@ -48,7 +51,7 @@ void queue_push(register Queue *qp, size_t extra_length, char const *info)
         }
         else                                        /* q as one block       */
         {
-            memcpy(cp, qp->d_memory, memory_length);/* cp existing buffer   */
+            memcpy(cp, qp->d_memory, original_length);/* cp existing buffer   */
             qp->d_read = cp + (qp->d_read - qp->d_memory);
             qp->d_write = cp + (qp->d_write - qp->d_memory);
         }

programming_language: C