Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package librecad for openSUSE:Factory 
checked in at 2026-11-24 17:03:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/librecad (Old)
 and      /work/SRC/openSUSE:Factory/.librecad.new.1340718 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "librecad"

Tue Nov 24 17:03:57 2026 rev:43 rq:1400326 version:2.2.1.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/librecad/librecad.changes        2026-11-13 
18:36:00.348013097 +0100
+++ /work/SRC/openSUSE:Factory/.librecad.new.1340718/librecad.changes   
2026-11-24 17:04:25.922570664 +0100
@@ -1,0 +2,5 @@
+Tue Nov 24 14:51:04 UTC 2026 - Jan Engelhardt <[email protected]>
+
+- Add CVE-2026-135294.patch [boo#1291643]
+
+-------------------------------------------------------------------

New:
----
  CVE-2026-135294.patch

----------(New B)----------
  New:
- Add CVE-2026-135294.patch [boo#1291643]
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ librecad.spec ++++++
--- /var/tmp/diff_new_pack.JMxaQd/_old  2026-11-24 17:04:27.428634470 +0100
+++ /var/tmp/diff_new_pack.JMxaQd/_new  2026-11-24 17:04:27.429634512 +0100
@@ -36,6 +36,7 @@
 Patch6:         librecad-install.diff
 Patch7:         librecad-plugindir.diff
 Patch8:         fix-CVE-2026-126497.patch
+Patch9:         CVE-2026-135294.patch
 BuildRequires:  fdupes
 BuildRequires:  gcc-c++ >= 4.7
 BuildRequires:  libboost_headers-devel

++++++ CVE-2026-135294.patch ++++++
>From 4e51048ee7ae82e553e739b3bba82d5fa89698e1 Mon Sep 17 00:00:00 2001
From: zeetee <[email protected]>
Date: Sat, 21 Nov 2026 04:37:59 +0900
Subject: [PATCH] dxf1: prevent heap out-of-bounds write from file size
 truncation (#3287)
References: https://bugzilla.suse.com/1291643

* dxf1: reject file sizes that overflow the read index

readFileInBuffer() stores QFile::size() in a 32-bit unsigned and then passes it 
as an int. A logical size near 4 GiB becomes a negative index, so fBuf[_bNum] 
writes before the allocation. Reject sizes that do not fit the int read index 
and close the file cleanly.

* dxf1: use the actual read size for fSize

readFileInBuffer() can be called with a byte limit, but it kept fSize = 
file.size(). A short read then left fSize larger than the initialized buffer, 
and separateBuf()/getBufLine() could scan past the allocation. Use the qint64 
return from file.read(), reject negative results, and terminate at the actual 
byte count.

* Use scoped file and buffer handling in DXF1 reader

* Build color box tests in DWG/DXF CI

* Keep translated angle labels consistent

---------

Co-authored-by: dxli <[email protected]>
---
 librecad/src/lib/filters/rs_filterdxf1.cpp |   40 +++++++++++++----------------
 1 file changed, 19 insertions(+), 21 deletions(-)

Index: LibreCAD-2.2.1.6/librecad/src/lib/filters/rs_filterdxf1.cpp
===================================================================
--- LibreCAD-2.2.1.6.orig/librecad/src/lib/filters/rs_filterdxf1.cpp
+++ LibreCAD-2.2.1.6/librecad/src/lib/filters/rs_filterdxf1.cpp
@@ -25,6 +25,8 @@
 **********************************************************************/
 
 #include<cstdlib>
+#include<limits>
+#include<memory>
 #include "rs_filterdxfrw.h"
 #include "rs_filterdxf1.h"
 
@@ -1825,28 +1827,24 @@ bool RS_FilterDXF1::readFileInBuffer(cha
 //         false: file not found
 //
 bool RS_FilterDXF1::readFileInBuffer(int _bNum) {
-    fPointer = fopen(name.toLatin1().data(), "rb");//RLZ verify with locales
-    if(fPointer) {
-        if(file.open(fPointer, QIODevice::ReadOnly)) {
-            fSize=file.size();
-            if(_bNum==-1)
-                _bNum=fSize;
-
-            fBuf = new char[_bNum+16];
-
-            file.read(fBuf, _bNum);
-            fBuf[_bNum] = '\0';
-            file.close();
-        }
-        fclose(fPointer);
-
-        // Convert 13/10 to 10
-        dos2unix();
-               fPointer=nullptr;
+    QFile input(name);
+    if (!input.open(QIODevice::ReadOnly)) return false;
 
-        return true;
-    }
-    return false;
+    constexpr int maxReadSize = std::numeric_limits<int>::max() - 16;
+    const qint64 fileSize = input.size();
+    if (fileSize < 0 || fileSize > maxReadSize || _bNum < -1 || _bNum > 
maxReadSize)
+        return false;
+
+    const int readSize = _bNum == -1 ? static_cast<int>(fileSize) : _bNum;
+    auto buffer = std::unique_ptr<char[]>(new char[readSize + 16]);
+    const qint64 bytesRead = input.read(buffer.get(), readSize);
+    if (bytesRead < 0) return false;
+
+    buffer[bytesRead] = '\0';
+    fSize = static_cast<unsigned>(bytesRead);
+    fBuf = buffer.release();
+    dos2unix();
+    return true;
 }
 
 

++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.JMxaQd/_old  2026-11-24 17:04:27.477636546 +0100
+++ /var/tmp/diff_new_pack.JMxaQd/_new  2026-11-24 17:04:27.482636758 +0100
@@ -1,5 +1,5 @@
-mtime: 1794479994
-commit: 458ad21997a824faf306f8ebec851c3da83245b91d9fe38f0720a4265f5d9b69
+mtime: 1795532675
+commit: 93e82a8d5d6e0062b06005b55c5b7a30bf6fa9cd9950a8100a1a80afbd7b750f
 url: https://src.opensuse.org/jengelh/librecad
 revision: master
 

++++++ build.specials.obscpio ++++++

++++++ build.specials.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore      1970-01-01 01:00:00.000000000 +0100
+++ new/.gitignore      2026-11-24 16:04:35.000000000 +0100
@@ -0,0 +1 @@
+.osc

Reply via email to