Skip to content

Commit 1a7c9a7

Browse files
[AUTO-CHERRYPICK] Patch iniparser for CVE-2025-0633 [Medium] - branch 3.0-dev (#12616)
Co-authored-by: mayankfz <[email protected]>
1 parent a3fc770 commit 1a7c9a7

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

SPECS/iniparser/CVE-2025-0633.patch

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From 6a15c7c2cd5638c9c359e308fc503860b0a3c857 Mon Sep 17 00:00:00 2001
2+
From: Mayank Singh <[email protected]>
3+
Date: Tue, 25 Feb 2025 03:12:13 +0000
4+
Subject: [PATCH] Address CVE-2025-0633
5+
Upstream Reference Link: https://gitlab.com/iniparser/iniparser/-/commit/072a39a772a38c475e35a1be311304ca99e9de7f
6+
7+
---
8+
src/iniparser.c | 1 +
9+
1 file changed, 1 insertion(+)
10+
11+
diff --git a/src/iniparser.c b/src/iniparser.c
12+
index fffdf9f..62febeb 100644
13+
--- a/src/iniparser.c
14+
+++ b/src/iniparser.c
15+
@@ -301,6 +301,7 @@ void iniparser_dumpsection_ini(const dictionary * d, const char * s, FILE * f)
16+
17+
if (d==NULL || f==NULL) return ;
18+
if (! iniparser_find_entry(d, s)) return ;
19+
+ if (strlen(s) > sizeof(keym)) return;
20+
21+
seclen = (int)strlen(s);
22+
fprintf(f, "\n[%s]\n", s);
23+
--
24+
2.45.3
25+

SPECS/iniparser/iniparser.spec

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ Distribution: Azure Linux
55

66
Name: iniparser
77
Version: 4.1
8-
Release: 7%{?dist}
8+
Release: 8%{?dist}
99
Summary: C library for parsing "INI-style" files
1010

1111
License: MIT
1212
URL: https://github.com/ndevilla/%{name}
1313
Source0: https://github.com/ndevilla/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
14+
Patch0: CVE-2025-0633.patch
1415

1516
BuildRequires: gcc
1617

@@ -28,7 +29,7 @@ documentation for %{name}. If you like to develop programs using %{name},
2829
you will need to install %{name}-devel.
2930

3031
%prep
31-
%setup -q
32+
%autosetup -p1
3233

3334
%build
3435
# remove library rpath from Makefile
@@ -71,6 +72,9 @@ make check
7172
%{_includedir}/*.h
7273

7374
%changelog
75+
* Tue Feb 25 2025 Mayank Singh <[email protected]> - 4.1.8
76+
- Fix CVE-2025-0633 with an upstream patch
77+
7478
* Mon Feb 5 2024 Saul Paredes <[email protected]> - 4.1-6
7579
- License verified.
7680

0 commit comments

Comments
 (0)