summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Marko <peter.marko@siemens.com>2025-07-12 14:58:19 +0200
committerArmin Kuster <akuster808@gmail.com>2025-07-27 14:35:10 -0400
commitce5314a8d81f59472ece3d79b3284fc8f5178075 (patch)
tree686abad2e53bfa8611d1749f37d6e9452e869a8d
parenteb21281551b7bcfdbd88afa040657042f1a21d46 (diff)
downloadmeta-openembedded-ce5314a8d81f59472ece3d79b3284fc8f5178075.tar.gz
spdlog: patch CVE-2025-6140
Pick commit [1] mentioned in [2] as listed in [3]. [1] https://github.com/gabime/spdlog/commit/10320184df1eb4638e253a34b1eb44ce78954094 [2] https://github.com/gabime/spdlog/issues/3360 [3] https://nvd.nist.gov/vuln/detail/CVE-2025-6140 Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-oe/recipes-support/spdlog/spdlog/CVE-2025-6140.patch46
-rw-r--r--meta-oe/recipes-support/spdlog/spdlog_1.15.0.bb4
2 files changed, 49 insertions, 1 deletions
diff --git a/meta-oe/recipes-support/spdlog/spdlog/CVE-2025-6140.patch b/meta-oe/recipes-support/spdlog/spdlog/CVE-2025-6140.patch
new file mode 100644
index 0000000000..af135adee2
--- /dev/null
+++ b/meta-oe/recipes-support/spdlog/spdlog/CVE-2025-6140.patch
@@ -0,0 +1,46 @@
1From 10320184df1eb4638e253a34b1eb44ce78954094 Mon Sep 17 00:00:00 2001
2From: Gabi Melman <gmelman1@gmail.com>
3Date: Mon, 17 Mar 2025 15:46:31 +0200
4Subject: [PATCH] Fixed issue #3360 (#3361)
5
6CVE: CVE-2025-6140
7Upstream-Status: Backport [https://github.com/gabime/spdlog/commit/10320184df1eb4638e253a34b1eb44ce78954094]
8Signed-off-by: Peter Marko <peter.marko@siemens.com>
9---
10 include/spdlog/pattern_formatter-inl.h | 8 +++++---
11 1 file changed, 5 insertions(+), 3 deletions(-)
12
13diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h
14index b53d8051..fd408ed5 100644
15--- a/include/spdlog/pattern_formatter-inl.h
16+++ b/include/spdlog/pattern_formatter-inl.h
17@@ -70,6 +70,9 @@ public:
18 pad_it(remaining_pad_);
19 } else if (padinfo_.truncate_) {
20 long new_size = static_cast<long>(dest_.size()) + remaining_pad_;
21+ if (new_size < 0) {
22+ new_size = 0;
23+ }
24 dest_.resize(static_cast<size_t>(new_size));
25 }
26 }
27@@ -264,7 +267,7 @@ public:
28 : flag_formatter(padinfo) {}
29
30 void format(const details::log_msg &, const std::tm &tm_time, memory_buf_t &dest) override {
31- const size_t field_size = 10;
32+ const size_t field_size = 8;
33 ScopedPadder p(field_size, padinfo_, dest);
34
35 fmt_helper::pad2(tm_time.tm_mon + 1, dest);
36@@ -926,9 +929,8 @@ private:
37 memory_buf_t cached_datetime_;
38
39 #ifndef SPDLOG_NO_TLS
40- mdc_formatter<null_scoped_padder> mdc_formatter_{padding_info{}};
41+ mdc_formatter<null_scoped_padder> mdc_formatter_{padding_info {}};
42 #endif
43-
44 };
45
46 } // namespace details
diff --git a/meta-oe/recipes-support/spdlog/spdlog_1.15.0.bb b/meta-oe/recipes-support/spdlog/spdlog_1.15.0.bb
index 963de54f73..dbe0e4c2aa 100644
--- a/meta-oe/recipes-support/spdlog/spdlog_1.15.0.bb
+++ b/meta-oe/recipes-support/spdlog/spdlog_1.15.0.bb
@@ -5,7 +5,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=9573510928429ad0cbe5ba4de77546e9"
5 5
6PV .= "+git" 6PV .= "+git"
7SRCREV = "96a8f6250cbf4e8c76387c614f666710a2fa9bad" 7SRCREV = "96a8f6250cbf4e8c76387c614f666710a2fa9bad"
8SRC_URI = "git://github.com/gabime/spdlog.git;protocol=https;branch=v1.x" 8SRC_URI = "git://github.com/gabime/spdlog.git;protocol=https;branch=v1.x \
9 file://CVE-2025-6140.patch \
10"
9 11
10DEPENDS += "fmt" 12DEPENDS += "fmt"
11 13