Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade io.netty:netty-codec-http2 dependency for the recent DoS vulnerability? #10617

Closed
ozooxo opened this issue Oct 19, 2023 · 2 comments
Closed
Labels
Milestone

Comments

@ozooxo
Copy link

ozooxo commented Oct 19, 2023

On Oct 10, 2023, there's a newly reported DoS vulnerability for io.netty:netty-codec-http2 , which is a dependency of io.grpc:grpc-netty -- https://security.snyk.io/vuln/SNYK-JAVA-IONETTY-5953332

The fix is to upgrade to io.netty:netty-codec-http2 version 4.1.100.Final.

However, io.grpc:grpc-netty seems fixed the version to 4.1.97.Final

"io.netty:netty-codec-http2:4.1.97.Final",

$ gradle dependencies

+--- io.grpc:grpc-netty:1.58.0
|    +--- io.netty:netty-codec-http2:4.1.93.Final -> 4.1.97.Final (*)

Also realized that the recent 1.59.0 release doesn't include this version change.

What is the timeline to upgrade io.netty:netty-codec-http2 dependency?

@ejona86
Copy link
Member

ejona86 commented Oct 26, 2023

When using grpc-netty, you are free to depend on netty 4.1.100.Final yourself, and thus upgrade to the newer version. You generally don't need to wait on us for dependency upgrades. We have done some testing against 4.1.100.Final and not seen any incompatibility.

However, 4.1.100.Final doesn't fix CVE-2023-44487 by itself. You have to configure it by calling decoderEnforceMaxRstFramesPerWindow() when constructing the HTTP/2 objects. There's a very aggressive default, but the behavior isn't available to the APIs gRPC uses.

That approach is unwieldy to configure for gRPC, but may be better than nothing. Generally grpc-java server's aren't directly exposed to untrusted clients, so few probably would configure it. I'm looking to expose it on NettyServerBuilder.

@larry-safran larry-safran reopened this Nov 8, 2023
@ejona86 ejona86 added this to the 1.60 milestone Nov 28, 2023
@ejona86
Copy link
Member

ejona86 commented Nov 28, 2023

I just released 1.59.1 (it is available on Maven Central; it doesn't matter if it is indexed by search.maven.org; just try using it). It is compatible with Netty 4.1.100 (which doesn't help with the CVE for gRPC) and has a new API to limit RST frame rate (see #10675), which can do something for the CVE when it makes sense. It the same approach as in Netty, but not enabled by default.

@ejona86 ejona86 closed this as completed Nov 28, 2023
bestbeforetoday added a commit to bestbeforetoday/fabric-gateway that referenced this issue Dec 2, 2023
This volnerability can be exploited in gRPC servers (not clients) so should not directly impact the Fabric Gateway client API. However, updates to gRPC Java dependencies enables compatibility with Netty version 4.1.101.Final, which contains mitigations to this vulnerability and supports client applications that also expose gRPC services.

See:

- https://github.com/grpc/grpc-java/releases/tag/v1.59.1
- grpc/grpc-java#10617

Also updates dependency-check-maven to avoid use of sunset NVD data-feed.

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
bestbeforetoday added a commit to bestbeforetoday/fabric-gateway that referenced this issue Dec 2, 2023
This vulnerability can be exploited in gRPC servers (not clients) so should not directly impact the Fabric Gateway client API. However, updates to gRPC Java dependencies enables compatibility with Netty version 4.1.101.Final, which contains mitigations to this vulnerability and supports client applications that also expose gRPC services.

See:

- https://github.com/grpc/grpc-java/releases/tag/v1.59.1
- grpc/grpc-java#10617

Also update dependency-check-maven to avoid use of sunset NVD data-feed.

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
bestbeforetoday added a commit to hyperledger/fabric-gateway that referenced this issue Dec 7, 2023
This vulnerability can be exploited in gRPC servers (not clients) so should not directly impact the Fabric Gateway client API. However, updates to gRPC Java dependencies enables compatibility with Netty version 4.1.101.Final, which contains mitigations to this vulnerability and supports client applications that also expose gRPC services.

See:

- https://github.com/grpc/grpc-java/releases/tag/v1.59.1
- grpc/grpc-java#10617

Also update dependency-check-maven to avoid use of sunset NVD data-feed.

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants