Skip to content

Update netty version to fix CVE-2021-21290#7939

Closed
kwart wants to merge 2 commits intogrpc:masterfrom
kwart:patch-1
Closed

Update netty version to fix CVE-2021-21290#7939
kwart wants to merge 2 commits intogrpc:masterfrom
kwart:patch-1

Conversation

@kwart
Copy link
Copy Markdown

@kwart kwart commented Mar 4, 2021

Upgrade the netty version to remediate the CVE-2021-21290 vulnerability.

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented Mar 4, 2021

CLA Signed

The committers are authorized under a signed CLA.

Copy link
Copy Markdown
Member

@ejona86 ejona86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A Netty upgrade is not this easy. Mainly, we need to run extensive tests and resolve any issues found. That's something we'd need to handle.

There's also many other places that need to be updated, and the version of netty-tcnative commonly needs to be updated as well. An example: 720df64

gRPC does not appear impacted by CVE-2021-21290. If you need 4.1.59 you can either limit the old version of netty to grpc with grpc-netty-shaded or you can exclude the grpc transitive dependencies on netty and depend on the newer netty version yourself.

List<Status.Code> codeOptions = Arrays.asList(
Status.Code.UNKNOWN, Status.Code.RESOURCE_EXHAUSTED, Status.Code.INTERNAL);
Status.Code.UNKNOWN, Status.Code.RESOURCE_EXHAUSTED, Status.Code.INTERNAL,
Status.Code.UNAVAILABLE);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'd need to look into why a new status code is being used. That may be a bug.

@Override
@org.junit.Test
@org.junit.Ignore
public void clientChecksInboundMetadataSize_trailer() {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this could be made separately, since it actually has nothing to do with this particular upgrade of Netty.

@mbard
Copy link
Copy Markdown

mbard commented Apr 23, 2021

There is a new CVE on netty, CVE-2021-21409.
That requires update to 4.1.61.Final to solve it

@ejona86
Copy link
Copy Markdown
Member

ejona86 commented Apr 23, 2021

CVE-2021-21409 is a followup to further fix to CVE-2021-21290. It similarly doesn't impact gRPC.

I will say soon after this PR was created I did try to run some of our extensive tests with a newer Netty but ran up against netty/netty-jni-util#5 . That was addressed in Netty 4.1.61.Final/Netty-tcnative 2.0.37.Final, so we will be trying again.

@ejona86
Copy link
Copy Markdown
Member

ejona86 commented Sep 21, 2021

#8167 bumped the version of Netty to 4.1.63.

@ejona86 ejona86 closed this Sep 21, 2021
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Dec 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants