Skip to content

Commit b820070

Browse files
fluent-bit: Address CVE-2024-25431 (#11098)
Signed-off-by: ankita <[email protected]> Co-authored-by: ankita <[email protected]> Co-authored-by: jslobodzian <[email protected]>
1 parent f676b99 commit b820070

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
diff --git a/lib/wasm-micro-runtime-WAMR-1.3.0/core/iwasm/interpreter/wasm_loader.c b/lib/wasm-micro-runtime-WAMR-1.3.0/core/iwasm/interpreter/wasm_loader.c
2+
index 2a06f42..506ee29 100644
3+
--- a/lib/wasm-micro-runtime-WAMR-1.3.0/core/iwasm/interpreter/wasm_loader.c
4+
+++ b/lib/wasm-micro-runtime-WAMR-1.3.0/core/iwasm/interpreter/wasm_loader.c
5+
@@ -3980,14 +3980,22 @@ check_wasi_abi_compatibility(const WASMModule *module,
6+
/* clang-format on */
7+
8+
WASMExport *initialize = NULL, *memory = NULL, *start = NULL;
9+
+ uint32 import_function_count = module->import_function_count;
10+
+ WASMType *func_type;
11+
12+
/* (func (export "_start") (...) */
13+
start = wasm_loader_find_export(module, "", "_start", EXPORT_KIND_FUNC,
14+
error_buf, error_buf_size);
15+
if (start) {
16+
- WASMType *func_type =
17+
- module->functions[start->index - module->import_function_count]
18+
- ->func_type;
19+
+ if (start->index < import_function_count) {
20+
+ set_error_buf(
21+
+ error_buf, error_buf_size,
22+
+ "the builtin _start function can not be an import function");
23+
+ return false;
24+
+ }
25+
+
26+
+ func_type =
27+
+ module->functions[start->index - import_function_count]->func_type;
28+
if (func_type->param_count || func_type->result_count) {
29+
set_error_buf(error_buf, error_buf_size,
30+
"the signature of builtin _start function is wrong");
31+
@@ -3999,8 +4007,15 @@ check_wasi_abi_compatibility(const WASMModule *module,
32+
initialize = wasm_loader_find_export(
33+
module, "", "_initialize", EXPORT_KIND_FUNC, error_buf, error_buf_size);
34+
if (initialize) {
35+
- WASMType *func_type =
36+
- module->functions[initialize->index - module->import_function_count]
37+
+ if (initialize->index < import_function_count) {
38+
+ set_error_buf(error_buf, error_buf_size,
39+
+ "the builtin _initialize function can not be an "
40+
+ "import function");
41+
+ return false;
42+
+ }
43+
+
44+
+ func_type =
45+
+ module->functions[initialize->index - import_function_count]
46+
->func_type;
47+
if (func_type->param_count || func_type->result_count) {
48+
set_error_buf(

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: 2.2.3
4-
Release: 4%{?dist}
4+
Release: 5%{?dist}
55
License: Apache-2.0
66
Vendor: Microsoft Corporation
77
Distribution: Mariner
@@ -12,6 +12,7 @@ Patch1: in_emitter_fix_issue_8198.patch
1212
Patch2: fix_issue_8025.patch
1313
Patch3: CVE-2024-26455.patch
1414
Patch4: CVE-2024-25629.patch
15+
Patch5: CVE-2024-25431.patch
1516
BuildRequires: bison
1617
BuildRequires: cmake
1718
BuildRequires: cyrus-sasl-devel
@@ -85,6 +86,9 @@ Development files for %{name}
8586
%{_libdir}/fluent-bit/*.so
8687

8788
%changelog
89+
* Fri Nov 15 2024 Ankita Pareek <[email protected]> - 2.2.3-5
90+
- Address CVE-2024-25431
91+
8892
* Tue Oct 15 2024 Chris Gunn <[email protected]> - 2.2.3-4
8993
- CVE-2024-26455
9094
- CVE-2024-25629

0 commit comments

Comments
 (0)