public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Peter Lemenkov <lemenkov@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rply] f45: Fix for CVE-2026-115722
Date: Tue, 27 Oct 2026 23:16:23 GMT	[thread overview]
Message-ID: <179314298341.1.7596004895479226879.rpms-rply-086feaa538ef@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/rply
            Branch : f45
            Commit : 086feaa538ef4392c8bd050dd0c0170d5f161e75
            Author : Peter Lemenkov <lemenkov@gmail.com>
            Date   : 2026-10-27T23:25:26+01:00
            Stats  : +54/-5 in 3 file(s)
            URL    : https://src.fedoraproject.org/rpms/rply/c/086feaa538ef4392c8bd050dd0c0170d5f161e75?branch=f45

            Log:
            Fix for CVE-2026-115722

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>

---
diff --git a/11.patch b/11.patch
new file mode 100644
index 0000000..909d2a3
--- /dev/null
+++ b/11.patch
@@ -0,0 +1,50 @@
+From bbc0d83b3ffbdc9eff0be43f0980c2790b675fcb Mon Sep 17 00:00:00 2001
+From: Nigel Stewart <nigels@nigels.com>
+Date: Thu, 22 Oct 2026 20:37:29 +1000
+Subject: [PATCH] Fix: Reject "list" as a list property's length or value type
+
+A PLY header could declare a list property whose length or value type
+was itself "list", e.g.:
+
+    property list list int x
+
+ply_find_string() maps "list" to PLY_LIST (16), but the header parser
+only rejected unknown tokens, not PLY_LIST. The reader then indexed its
+16-entry handler/driver tables with 16, one past the end, and called the
+adjacent struct member as a function pointer: a crash via a NULL ichunk
+on the ASCII path, or an out-of-bounds write of file bytes on the binary
+path. Reject PLY_LIST for both types in the header, mirroring the guards
+already present in ply_add_list_property().
+
+Reported by haindpwn:
+https://hackmd.io/@haindpwn/rply-property-list-type-confusion
+
+For Issue #10
+RPly PLY reader: a list property whose length or value type is declared
+as list drives an out-of-bounds index into the handler table and an
+indirect call through the wrong function pointer
+
+https://github.com/diegonehab/rply/issues/10
+---
+ rply.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/rply.c b/rply.c
+index 7c7e72a..b4349d3 100644
+--- a/rply.c
++++ b/rply.c
+@@ -1241,10 +1241,12 @@ static int ply_read_header_property(p_ply ply) {
+         /* if it's a list, we need the base types */
+         if (!ply_read_word(ply)) return 0;
+         property->length_type = ply_find_string(BWORD(ply), ply_type_list);
+-        if (property->length_type == (e_ply_type) (-1)) return 0;
++        if (property->length_type == (e_ply_type) (-1) ||
++            property->length_type >= PLY_LIST) return 0;
+         if (!ply_read_word(ply)) return 0;
+         property->value_type = ply_find_string(BWORD(ply), ply_type_list);
+-        if (property->value_type == (e_ply_type) (-1)) return 0;
++        if (property->value_type == (e_ply_type) (-1) ||
++            property->value_type >= PLY_LIST)  return 0;
+     }
+     /* get property name */
+     if (!ply_read_word(ply)) return 0;

diff --git a/rply.spec b/rply.spec
index 6426e36..d4b15a2 100644
--- a/rply.spec
+++ b/rply.spec
@@ -3,11 +3,12 @@ Version:	1.1.4
 Release:	%autorelease
 Summary:	A library to read and write PLY files
 License:	MIT
-URL:		https://www.tecgraf.puc-rio.br/~diego/professional/rply/
-Source0:	https://www.tecgraf.puc-rio.br/~diego/professional/rply/%{name}-%{version}.tar.gz
+URL:		https://w3.impa.br/~diego/software/rply/
+Source0:	%{url}/%{name}-%{version}.tar.gz
 Source1:	rply_CMakeLists.txt
 Source2:	RPLYConfig.cmake.in
 Source3:	rply_cmake_export_cmakelists.txt
+Patch:		11.patch
 BuildRequires:  cmake >= 2.6.0
 BuildRequires:  gcc
 BuildRequires:  gcc-c++
@@ -46,8 +47,6 @@ cp %{SOURCE2} CMake/Modules/
 cp %{SOURCE3} CMake/export/CMakeLists.txt
 
 %build
-# TODO: Please submit an issue to upstream (rhbz#2381410)
-export CMAKE_POLICY_VERSION_MINIMUM=3.5
 %cmake -DCMAKE_BUILD_TYPE:STRING="Release" \
        -DCMAKE_VERBOSE_MAKEFILE=ON
 

diff --git a/rply_CMakeLists.txt b/rply_CMakeLists.txt
index d6d177b..49559ef 100644
--- a/rply_CMakeLists.txt
+++ b/rply_CMakeLists.txt
@@ -1,5 +1,5 @@
 PROJECT(rply)
-cmake_minimum_required(VERSION 2.6)
+cmake_minimum_required(VERSION 3.5)
 
 include(GNUInstallDirs)
 

                 reply	other threads:[~2026-10-27 23:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179314298341.1.7596004895479226879.rpms-rply-086feaa538ef@fedoraproject.org \
    --to=lemenkov@gmail.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox