Skip to content

Commit d4eaa5d

Browse files
[AutoPR- Security] Patch fluent-bit for CVE-2025-54126 [MEDIUM] (#14446)
1 parent c0cc872 commit d4eaa5d

File tree

2 files changed

+85
-1
lines changed

2 files changed

+85
-1
lines changed

SPECS/fluent-bit/CVE-2025-54126.patch

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
From fa5362648e63fea8fa85d89cfec012721e6c873f Mon Sep 17 00:00:00 2001
2+
From: "liang.he" <[email protected]>
3+
Date: Sun, 27 Jul 2025 14:38:56 +0800
4+
Subject: [PATCH] Merge commit from fork
5+
6+
If `--addr-pool=1.2.3.4`, the runtime will return an error.
7+
The value must be in the form of ADDRESS/MASK.
8+
9+
Signed-off-by: Azure Linux Security Servicing Account <[email protected]>
10+
Upstream-reference: https://github.com/bytecodealliance/wasm-micro-runtime/commit/121232a9957a069bbb04ebda053bdc72ab409e7a.patch
11+
---
12+
.../core/iwasm/common/wasm_runtime_common.c | 10 +++++++++-
13+
lib/wasm-micro-runtime-WAMR-1.3.0/doc/socket_api.md | 3 ++-
14+
.../product-mini/platforms/common/libc_wasi.c | 2 +-
15+
.../samples/socket-api/CMakeLists.txt | 1 +
16+
4 files changed, 13 insertions(+), 3 deletions(-)
17+
18+
diff --git a/lib/wasm-micro-runtime-WAMR-1.3.0/core/iwasm/common/wasm_runtime_common.c b/lib/wasm-micro-runtime-WAMR-1.3.0/core/iwasm/common/wasm_runtime_common.c
19+
index 567e77b..976842d 100644
20+
--- a/lib/wasm-micro-runtime-WAMR-1.3.0/core/iwasm/common/wasm_runtime_common.c
21+
+++ b/lib/wasm-micro-runtime-WAMR-1.3.0/core/iwasm/common/wasm_runtime_common.c
22+
@@ -3125,7 +3125,15 @@ wasm_runtime_init_wasi(WASMModuleInstanceCommon *module_inst,
23+
address = strtok(cp, "/");
24+
mask = strtok(NULL, "/");
25+
26+
- ret = addr_pool_insert(apool, address, (uint8)(mask ? atoi(mask) : 0));
27+
+ if (!mask) {
28+
+ snprintf(error_buf, error_buf_size,
29+
+ "Invalid address pool entry: %s, must be in the format of "
30+
+ "ADDRESS/MASK",
31+
+ addr_pool[i]);
32+
+ goto fail;
33+
+ }
34+
+
35+
+ ret = addr_pool_insert(apool, address, (uint8)atoi(mask));
36+
wasm_runtime_free(cp);
37+
if (!ret) {
38+
set_error_buf(error_buf, error_buf_size,
39+
diff --git a/lib/wasm-micro-runtime-WAMR-1.3.0/doc/socket_api.md b/lib/wasm-micro-runtime-WAMR-1.3.0/doc/socket_api.md
40+
index eff9376..7cab555 100644
41+
--- a/lib/wasm-micro-runtime-WAMR-1.3.0/doc/socket_api.md
42+
+++ b/lib/wasm-micro-runtime-WAMR-1.3.0/doc/socket_api.md
43+
@@ -58,7 +58,8 @@ enabled.
44+
45+
_iwasm_ accepts address ranges via an option, `--addr-pool`, to implement
46+
the capability control. All IP address the WebAssembly application may need to `bind()` or `connect()`
47+
-should be announced first. Every IP address should be in CIDR notation.
48+
+should be announced first. Every IP address should be in CIDR notation. If not, _iwasm_ will return
49+
+an error.
50+
51+
```bash
52+
$ iwasm --addr-pool=1.2.3.4/15,2.3.4.6/16 socket_example.wasm
53+
diff --git a/lib/wasm-micro-runtime-WAMR-1.3.0/product-mini/platforms/common/libc_wasi.c b/lib/wasm-micro-runtime-WAMR-1.3.0/product-mini/platforms/common/libc_wasi.c
54+
index 84e133b..1e595b3 100644
55+
--- a/lib/wasm-micro-runtime-WAMR-1.3.0/product-mini/platforms/common/libc_wasi.c
56+
+++ b/lib/wasm-micro-runtime-WAMR-1.3.0/product-mini/platforms/common/libc_wasi.c
57+
@@ -45,7 +45,7 @@ libc_wasi_print_help()
58+
"path, for example:\n");
59+
printf(" --map-dir=<guest-path1::host-path1> "
60+
"--map-dir=<guest-path2::host-path2>\n");
61+
- printf(" --addr-pool=<addrs> Grant wasi access to the given network "
62+
+ printf(" --addr-pool=<addr/mask> Grant wasi access to the given network "
63+
"addresses in\n");
64+
printf(" CIDR notation to the program, seperated "
65+
"with ',',\n");
66+
diff --git a/lib/wasm-micro-runtime-WAMR-1.3.0/samples/socket-api/CMakeLists.txt b/lib/wasm-micro-runtime-WAMR-1.3.0/samples/socket-api/CMakeLists.txt
67+
index e68a63e..a68d0ca 100644
68+
--- a/lib/wasm-micro-runtime-WAMR-1.3.0/samples/socket-api/CMakeLists.txt
69+
+++ b/lib/wasm-micro-runtime-WAMR-1.3.0/samples/socket-api/CMakeLists.txt
70+
@@ -171,6 +171,7 @@ set(WAMR_BUILD_JIT 0)
71+
set(WAMR_BUILD_LIBC_BUILTIN 1)
72+
set(WAMR_BUILD_LIBC_WASI 1)
73+
set(WAMR_BUILD_LIB_PTHREAD 1)
74+
+set(WAMR_BUILD_REF_TYPES 1)
75+
76+
# compiling and linking flags
77+
if (NOT (CMAKE_C_COMPILER MATCHES ".*clang.*" OR CMAKE_C_COMPILER_ID MATCHES ".*Clang"))
78+
--
79+
2.45.4
80+

SPECS/fluent-bit/fluent-bit.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Summary: Fast and Lightweight Log processor and forwarder for Linux, BSD and OSX
22
Name: fluent-bit
33
Version: 3.0.6
4-
Release: 2%{?dist}
4+
Release: 3%{?dist}
55
License: Apache-2.0
66
Vendor: Microsoft Corporation
77
Distribution: Mariner
@@ -14,6 +14,7 @@ Patch3: CVE-2024-25431.patch
1414
Patch4: CVE-2024-27532.patch
1515
Patch5: CVE-2024-50608.patch
1616
Patch6: CVE-2024-50609.patch
17+
Patch7: CVE-2025-54126.patch
1718
BuildRequires: bison
1819
BuildRequires: cmake
1920
BuildRequires: cyrus-sasl-devel
@@ -88,6 +89,9 @@ Development files for %{name}
8889
%{_libdir}/fluent-bit/*.so
8990

9091
%changelog
92+
* Wed Aug 06 2025 Azure Linux Security Servicing Account <[email protected]> - 3.0.6-3
93+
- Patch for CVE-2025-54126
94+
9195
* Thu Feb 27 2025 Kshitiz Godara <[email protected]> - 3.0.6-2
9296
- Address CVE-2024-50608 and CVE-2024-50609
9397

0 commit comments

Comments
 (0)