Skip to content

Commit 770cf87

Browse files
authored
fluent-bit: CVE-2024-26455, CVE-2024-25629 (#10739)
1 parent fece1b0 commit 770cf87

File tree

3 files changed

+86
-1
lines changed

3 files changed

+86
-1
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
diff --git a/lib/c-ares-1.24.0/src/lib/ares__read_line.c b/lib/c-ares-1.24.0/src/lib/ares__read_line.c
2+
index d65ac1fcf..018f55e8b 100644
3+
--- a/lib/c-ares-1.24.0/src/lib/ares__read_line.c
4+
+++ b/lib/c-ares-1.24.0/src/lib/ares__read_line.c
5+
@@ -59,6 +59,14 @@ ares_status_t ares__read_line(FILE *fp, char **buf, size_t *bufsize)
6+
return (offset != 0) ? 0 : (ferror(fp)) ? ARES_EFILE : ARES_EOF;
7+
}
8+
len = offset + ares_strlen(*buf + offset);
9+
+
10+
+ /* Probably means there was an embedded NULL as the first character in
11+
+ * the line, throw away line */
12+
+ if (len == 0) {
13+
+ offset = 0;
14+
+ continue;
15+
+ }
16+
+
17+
if ((*buf)[len - 1] == '\n') {
18+
(*buf)[len - 1] = 0;
19+
break;
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
diff --git a/plugins/custom_calyptia/calyptia.c b/plugins/custom_calyptia/calyptia.c
2+
index 5639af427..4aba53ca7 100644
3+
--- a/plugins/custom_calyptia/calyptia.c
4+
+++ b/plugins/custom_calyptia/calyptia.c
5+
@@ -245,7 +245,6 @@ static struct flb_output_instance *setup_cloud_output(struct flb_config *config,
6+
7+
if (!cloud) {
8+
flb_plg_error(ctx->ins, "could not load Calyptia Cloud connector");
9+
- flb_free(ctx);
10+
return NULL;
11+
}
12+
13+
@@ -254,7 +253,6 @@ static struct flb_output_instance *setup_cloud_output(struct flb_config *config,
14+
15+
if (ret != 0) {
16+
flb_plg_error(ctx->ins, "could not load Calyptia Cloud connector");
17+
- flb_free(ctx);
18+
return NULL;
19+
}
20+
21+
@@ -268,7 +266,6 @@ static struct flb_output_instance *setup_cloud_output(struct flb_config *config,
22+
label = flb_sds_create_size(strlen(key->str) + strlen(val->str) + 1);
23+
24+
if (!label) {
25+
- flb_free(ctx);
26+
return NULL;
27+
}
28+
29+
@@ -316,7 +313,6 @@ static struct flb_output_instance *setup_cloud_output(struct flb_config *config,
30+
label = flb_sds_create_size(strlen("fleet_id") + strlen(ctx->fleet_id) + 1);
31+
32+
if (!label) {
33+
- flb_free(ctx);
34+
return NULL;
35+
}
36+
37+
@@ -424,6 +420,7 @@ static int cb_calyptia_init(struct flb_custom_instance *ins,
38+
39+
if (ctx->machine_id == NULL) {
40+
flb_plg_error(ctx->ins, "unable to retrieve machine_id");
41+
+ flb_free(ctx);
42+
return -1;
43+
}
44+
45+
@@ -435,6 +432,7 @@ static int cb_calyptia_init(struct flb_custom_instance *ins,
46+
47+
if (!ctx->i) {
48+
flb_plg_error(ctx->ins, "could not load metrics collector");
49+
+ flb_free(ctx);
50+
return -1;
51+
}
52+
53+
@@ -455,6 +453,7 @@ static int cb_calyptia_init(struct flb_custom_instance *ins,
54+
ctx->o = setup_cloud_output(config, ctx);
55+
56+
if (ctx->o == NULL) {
57+
+ flb_free(ctx);
58+
return -1;
59+
}
60+
}

SPECS/fluent-bit/fluent-bit.spec

Lines changed: 7 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: 3%{?dist}
4+
Release: 4%{?dist}
55
License: Apache-2.0
66
Vendor: Microsoft Corporation
77
Distribution: Mariner
@@ -10,6 +10,8 @@ Source0: https://github.com/fluent/%{name}/archive/refs/tags/v%{version}.
1010
Patch0: CVE-2024-34250.patch
1111
Patch1: in_emitter_fix_issue_8198.patch
1212
Patch2: fix_issue_8025.patch
13+
Patch3: CVE-2024-26455.patch
14+
Patch4: CVE-2024-25629.patch
1315
BuildRequires: bison
1416
BuildRequires: cmake
1517
BuildRequires: cyrus-sasl-devel
@@ -83,6 +85,10 @@ Development files for %{name}
8385
%{_libdir}/fluent-bit/*.so
8486

8587
%changelog
88+
* Tue Oct 15 2024 Chris Gunn <[email protected]> - 2.2.3-4
89+
- CVE-2024-26455
90+
- CVE-2024-25629
91+
8692
* Wed Jun 05 2024 Sindhu Karri <[email protected]> - 2.2.3-3
8793
- Apply patch in_emitter_fix_issue_8198.patch to fix #8198 ( Potential log loss during high load at Multiline & Rewrite Tag Filter (in_emitter) )
8894
- Fix issue #8025 with a patch ( in_tail: missing log for offset processing due to non-existent old inodes in sqlite )

0 commit comments

Comments
 (0)