fix: prevent nil pointer dereference in envoyGoFilterOnHttpData#17
Closed
fix: prevent nil pointer dereference in envoyGoFilterOnHttpData#17
Conversation
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
…lidation are set (envoyproxy#29002) Signed-off-by: Xie Zhihao zhihao.xie@intel.com Commit Message: tls: fix handshake failure when both private key provider and cert validation are set Additional Description: After envoyproxy#24297, when both private key provider and validation are set, e.g., using Envoy as sidecars, handshake may end with SSL internal error and HTTP 503 will return. When both private key provider and validation are set, when the private key provider completed its calculation and resumed the handshake (ssl_do_handshake), an async cert validation will be triggered. If the custom validation is not provided, then the async cert validation will complete in the sync way and resume the handshake again (ssl_do_handshake), which cause the error. Risk Level: Low Testing: Unit tests Docs Changes: N/A Release Notes: Added Platform Specific Features: N/A Fixes commit 55a4cc7 Signed-off-by: Xie Zhihao <zhihao.xie@intel.com>
Backport of envoyproxy#29263 Fixes envoyproxy#28415 This reverts part of envoyproxy#24923 Signed-off-by: tyxia <tyxia@google.com> Signed-off-by: Greg Greenway <ggreenway@apple.com>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
* tools/format: Remove unused script * readme: Update code format commands * bazel/ci: Prevent leaking of build tools into env * mobile/ci: Include format script in CI triggers Signed-off-by: Ryan Northey <ryan@synca.io> Signed-off-by: phlax <phlax@users.noreply.github.com>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
tools: Add option to skip bazel for format fix Signed-off-by: Joshua Marantz <jmarantz@google.com> Signed-off-by: Ryan Northey <ryan@synca.io>
…nvoyproxy#29538) Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: yongjie.yyj <yeyeyongjie@gmail.com> Signed-off-by: spacewander <spacewanderlzx@gmail.com> Signed-off-by: wangkai19 <wangkai19@corp.netease.com> Signed-off-by: doujiang24 <doujiang24@gmail.com> Signed-off-by: Meshkati <meshkat76@gmail.com> Signed-off-by: Michael Sauter <mail@michaelsauter.net> Signed-off-by: Ryan Northey <ryan@synca.io> Signed-off-by: Braden Bassingthwaite <bbassingthwaite@digitalocean.com> Signed-off-by: Willem Veerman <6502426+willemveerman@users.noreply.github.com> Signed-off-by: duxin <duxin40@gmail.com> Co-authored-by: antJack <52443884+antJack@users.noreply.github.com> Co-authored-by: 罗泽轩 <spacewanderlzx@gmail.com> Co-authored-by: StarryNight <wangkai19@corp.netease.com> Co-authored-by: doujiang24 <doujiang24@gmail.com> Co-authored-by: Seyed Mostafa Meshkati <meshkat76@gmail.com> Co-authored-by: phlax <phlax@users.noreply.github.com> Co-authored-by: Braden Bassingthwaite <bradenbass@gmail.com> Co-authored-by: Braden Bassingthwaite <bbassingthwaite@digitalocean.com> Co-authored-by: Willem Veerman <6502426+willemveerman@users.noreply.github.com> Co-authored-by: duxin40 <33946910+duxin40@users.noreply.github.com>
…proxy#38597) (#7) Signed-off-by: François JACQUES <fjacques@murex.com> Co-authored-by: François JACQUES <fjacques@murex.com>
…or handle stream response body, getUpstreamHosts & setUpstreamOverrideHost for self-defined load balance policy (#8)
cherry-pick: envoyproxy@090e73d use directLocalAddress instead of localAddress in LocalPortValueExtractorImpl of srds Link: https://code.alibaba-inc.com/Ingress/envoy/codereview/21602142 * support direct local address * add metrics stats
Signed-off-by: jue-yin <jueyin.hsl@alibaba-inc.com>
Co-authored-by: jueyin.hsl <jueyin.hsl@alibaba-inc.com>
Change-Id: Ie2f2feb07941843f202825061f84cb1bf546f098
Replace getState() with getOrCreateState() to handle cases where OnHttpData is called before OnHttpHeader, preventing SIGSEGV panic when s.req is not yet initialized. Fixes: panic: runtime error: invalid memory address or nil pointer dereference
|
🔍 代码审查进行中
📒 文件清单 (100 个文件)✅ 新增: 21 个文件 ✅ 新增文件:
❌ 删除文件:
🔄 重命名文件:
📝 变更文件:
|
Author
|
Closing - wrong base branch. Will reopen with correct base. |
|
CodeReview流程已终止 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Replace
getState()withgetOrCreateState()inenvoyGoFilterOnHttpDatato handle cases where OnHttpData is called before OnHttpHeader.Problem
When
envoyGoFilterOnHttpDatais called beforeenvoyGoFilterOnHttpHeader, thes.reqpointer is not yet initialized, causing a nil pointer dereference panic:Solution
getState(s)togetOrCreateState(s)in line 239getOrCreateStatechecks if the request exists and creates it if needed, preventing the nil pointer accessenvoyGoFilterOnHttpHeaderTesting