Skip to content

Commit

Permalink
Patch CVE-2024-24786 in blobfuse2 (#11306)
Browse files Browse the repository at this point in the history
Co-authored-by: Suresh Thelkar <[email protected]>
Co-authored-by: jslobodzian <[email protected]>
  • Loading branch information
3 people authored Dec 11, 2024
1 parent d578dc0 commit 124d3ef
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
43 changes: 43 additions & 0 deletions SPECS/blobfuse2/CVE-2024-24786.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
From 78460dfd1cbe6887b60af68c19c782e089e5012e Mon Sep 17 00:00:00 2001
From: Suresh Thelkar <[email protected]>
Date: Wed, 4 Dec 2024 15:32:17 +0530
Subject: [PATCH] Patch for CVE-2024-24786

Upstream patch details are given below.
https://github.com/protocolbuffers/protobuf-go/commit/f01a588
---
.../protobuf/encoding/protojson/well_known_types.go | 4 ++++
.../protobuf/internal/encoding/json/decode.go | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go b/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go
index 6c37d41..70c2ba6 100644
--- a/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go
+++ b/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go
@@ -348,6 +348,10 @@ func (d decoder) skipJSONValue() error {
}
}
}
+ case json.EOF:
+ // This can only happen if there's a bug in Decoder.Read.
+ // Avoid an infinite loop if this does happen.
+ return errors.New("unexpected EOF")
}
return nil
}
diff --git a/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go b/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go
index d043a6e..d2b3ac0 100644
--- a/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go
+++ b/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go
@@ -121,7 +121,7 @@ func (d *Decoder) Read() (Token, error) {

case ObjectClose:
if len(d.openStack) == 0 ||
- d.lastToken.kind == comma ||
+ d.lastToken.kind&(Name|comma) != 0 ||
d.openStack[len(d.openStack)-1] != ObjectOpen {
return Token{}, d.newSyntaxError(tok.pos, unexpectedFmt, tok.RawString())
}
--
2.34.1

6 changes: 5 additions & 1 deletion SPECS/blobfuse2/blobfuse2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Summary: FUSE adapter - Azure Storage
Name: blobfuse2
Version: %{blobfuse2_version}
Release: 6%{?dist}
Release: 7%{?dist}
License: MIT
Vendor: Microsoft Corporation
Distribution: Mariner
Expand Down Expand Up @@ -36,6 +36,7 @@ Source0: https://github.com/Azure/azure-storage-fuse/archive/%{name}-%{bl
# - For the value of "--mtime" use the date "2021-04-26 00:00Z" to simplify future updates.
Source1: %{name}-%{version}-vendor.tar.gz
Patch0: CVE-2023-45288.patch
Patch1: CVE-2024-24786.patch
BuildRequires: cmake
BuildRequires: fuse3-devel
BuildRequires: gcc
Expand Down Expand Up @@ -80,6 +81,9 @@ install -D -m 0644 ./setup/blobfuse2-logrotate %{buildroot}%{_sysconfdir}/logrot
%{_sysconfdir}/logrotate.d/blobfuse2

%changelog
* Wed Dec 04 2024 Suresh Thelkar <[email protected]> - 2.1.2-7
- Patch CVE-2024-24786

* Mon Sep 09 2024 CBL-Mariner Servicing Account <[email protected]> - 2.1.2-6
- Bump release to rebuild with go 1.22.7

Expand Down

0 comments on commit 124d3ef

Please sign in to comment.