Skip to content

Commit 6b0ad68

Browse files
suneelyadavasuneelyadava1Kanishk-Bansal
authored
Patch doxygen for CVE-2025-6140 [Medium] (microsoft#14073)
Co-authored-by: Suneel Yadava <[email protected]> Co-authored-by: Kanishk Bansal <[email protected]>
1 parent 0080a39 commit 6b0ad68

File tree

2 files changed

+43
-3
lines changed

2 files changed

+43
-3
lines changed

SPECS/doxygen/CVE-2025-6140.patch

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
From 4bc70904d4e31b768f38c2b321c29a370c614497 Mon Sep 17 00:00:00 2001
2+
From: Suneel Yadava <[email protected]>
3+
Date: Mon, 23 Jun 2025 10:51:55 +0000
4+
Subject: [PATCH] Fix for CVE-2025-6140
5+
Upstream Patch Reference:
6+
https://github.com/gabime/spdlog/commit/10320184df1eb4638e253a34b1eb44ce78954094
7+
8+
---
9+
deps/spdlog/include/spdlog/pattern_formatter-inl.h | 5 ++++-
10+
1 file changed, 4 insertions(+), 1 deletion(-)
11+
12+
diff --git a/deps/spdlog/include/spdlog/pattern_formatter-inl.h b/deps/spdlog/include/spdlog/pattern_formatter-inl.h
13+
index 01afbe6..ee01489 100644
14+
--- a/deps/spdlog/include/spdlog/pattern_formatter-inl.h
15+
+++ b/deps/spdlog/include/spdlog/pattern_formatter-inl.h
16+
@@ -76,6 +76,9 @@ public:
17+
else if (padinfo_.truncate_)
18+
{
19+
long new_size = static_cast<long>(dest_.size()) + remaining_pad_;
20+
+ if (new_size < 0) {
21+
+ new_size = 0;
22+
+ }
23+
dest_.resize(static_cast<size_t>(new_size));
24+
}
25+
}
26+
@@ -303,7 +306,7 @@ public:
27+
28+
void format(const details::log_msg &, const std::tm &tm_time, memory_buf_t &dest) override
29+
{
30+
- const size_t field_size = 10;
31+
+ const size_t field_size = 8;
32+
ScopedPadder p(field_size, padinfo_, dest);
33+
34+
fmt_helper::pad2(tm_time.tm_mon + 1, dest);
35+
--
36+
2.45.3
37+

SPECS/doxygen/doxygen.spec

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
Name: doxygen
22
Version: 1.9.8
3-
Release: 1%{?dist}
3+
Release: 2%{?dist}
44
Summary: Automated C, C++, and Java Documentation Generator
55
License: GPLv2
66
Group: Development/Tools/Doc Generators
77
Url: https://www.doxygen.nl
88
Vendor: Microsoft Corporation
99
Distribution: Azure Linux
1010
Source0: https://doxygen.nl/files/%{name}-%{version}.src.tar.gz
11+
Patch0: CVE-2025-6140.patch
1112

1213
%global debug_package %{nil}
1314

@@ -29,7 +30,7 @@ developed on a Linux platform, but it runs on most other UNIX flavors
2930
as well.
3031

3132
%prep
32-
%setup -q
33+
%autosetup -p1
3334

3435
%build
3536
cmake -G "Unix Makefiles" \
@@ -38,7 +39,6 @@ cmake -G "Unix Makefiles" \
3839
-Wno-dev .
3940
make %{?_smp_mflags}
4041

41-
4242
%install
4343
make install DESTDIR=%{buildroot}
4444
mkdir -p %{buildroot}%{_mandir}/man1/
@@ -51,6 +51,9 @@ install -vm 644 doc/doxygen.1 %{buildroot}%{_mandir}/man1/
5151
%license LICENSE
5252

5353
%changelog
54+
* Mon Jun 23 2025 Suneel Yadava <[email protected]> - 1.9.8-2
55+
- Patch for CVE-2025-6140
56+
5457
* Fri Oct 27 2023 CBL-Mariner Servicing Account <[email protected]> - 1.9.8-1
5558
- Auto-upgrade to 1.9.8 - Azure Linux 3.0 - package upgrades
5659

0 commit comments

Comments
 (0)