Skip to content

apple dns: fix crash on invalid dns name - #16028

Merged
htuch merged 6 commits into
mainfrom
fix-dns-issue
Apr 26, 2021
Merged

htuch merged 6 commits into
mainfrom
fix-dns-issue

Conversation

@junr03

@junr03 junr03 commented Apr 16, 2021

Copy link
Copy Markdown
Member

Commit Message: apple dns: fix crash on invalid dns name.
Additional Description: The release assert in question was ahead of verifying the return code.
Risk Level: low - most (possibly all) envoy production usage does not happen on apple hardware.
Testing: added new test that repro.

Fixes #16021

Signed-off-by: Jose Nino [email protected]

Jose Nino added 2 commits April 15, 2021 21:26
Jose Nino
fmt
Signed-off-by: Jose Nino <[email protected]>
@junr03
junr03 requested a review from htuch April 16, 2021 13:45

@htuch htuch left a comment

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.

Thanks for the fix!
/wait

// This callback should never be executed.
FAIL();
}));

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.

?

Comment thread source/common/network/apple_dns_impl.cc Outdated
return;
}

RELEASE_ASSERT(interface_index == 0,

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.

Should this be ENVOY_BUG? I.e. it's fully recoverable.

Jose Nino added 2 commits April 20, 2021 12:36
Signed-off-by: Jose Nino <[email protected]>
Jose Nino
fmt
Signed-off-by: Jose Nino <[email protected]>
Jose Nino added 2 commits April 21, 2021 14:10
Jose Nino
fmt
Signed-off-by: Jose Nino <[email protected]>
Signed-off-by: Jose Nino <[email protected]>
@junr03

junr03 commented Apr 26, 2021

Copy link
Copy Markdown
Member Author

@htuch this is ready.

@htuch htuch left a comment

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.

LGTM, thanks!

@htuch
htuch merged commit f40e279 into main Apr 26, 2021
@htuch
htuch deleted the fix-dns-issue branch April 26, 2021 23:54
@travisgroth

Copy link
Copy Markdown

Hi - will this make it into a patch for 1.17? If not, what release will it be included in? Thanks!

@junr03

junr03 commented May 3, 2021

Copy link
Copy Markdown
Member Author

No, we only have security patches with designated CVEs. This will make it into the next point release: 1.19

@travisgroth

Copy link
Copy Markdown

It looks like this should qualify for backporting https://github.com/envoyproxy/envoy/blob/main/RELEASES.md#stable-releases

Stability fixes backported from the main branch (anything that can result in a crash, including crashes triggered by a trusted control plane).

Justification:

  • crash on a maintained release (EOL next year)
  • easy to trigger in routine usage
  • small change

gokulnair pushed a commit to gokulnair/envoy that referenced this pull request May 6, 2021
The release assert in question was ahead of verifying the return code.

Risk Level: low - most (possibly all) envoy production usage does not happen on apple hardware.
Testing: added new test that repro.

Fixes envoyproxy#16021
Signed-off-by: Jose Nino <[email protected]>
Signed-off-by: Gokul Nair <[email protected]>
@travisgroth

Copy link
Copy Markdown

/backport

@repokitteh-read-only repokitteh-read-only Bot added the backport/review Request to backport to stable releases label May 12, 2021
@travisgroth

Copy link
Copy Markdown

/cc @PiotrSikora can I get this reviewed for backport to maintained releases? I believe 1.17+.

@phlax

phlax commented May 25, 2021

Copy link
Copy Markdown
Member

cc @dmitri-d

mattklein123 pushed a commit that referenced this pull request Jun 4, 2021
Commit Message: apple dns - fix interface issue with localhost lookup
Additional Description: deleting ENVOY_BUG statement, as localhost dns resolution renders a valid non-zero interface index.
Risk Level: low
Testing: fixed previously existing test that did not have a run block.

Signed-off-by: Jose Nino <[email protected]>
Signed-off-by: Dmitri Dolguikh <[email protected]>
@alyssawilk alyssawilk added backport/approved Approved backports to stable releases and removed backport/review Request to backport to stable releases labels Nov 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/approved Approved backports to stable releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash on macOS with invalid DNS name

5 participants