-
Notifications
You must be signed in to change notification settings - Fork 892
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
operator/pkg/certs: mitigate potential null pointer dereference in AltNames Mutators for both the APIServer
and EtcdServer
#5560
Conversation
In this commit, we fix th null pointer dereference issue that happens in altnames mutators for both Karmada APIServer and EtcdServer when accessing the `Components` field on `AltNamesMutatorConfig` struct. Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #5560 +/- ##
==========================================
+ Coverage 33.71% 34.14% +0.43%
==========================================
Files 643 643
Lines 44500 44524 +24
==========================================
+ Hits 15001 15204 +203
+ Misses 28357 28163 -194
- Partials 1142 1157 +15
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
karmada/operator/pkg/apis/operator/v1alpha1/defaults.go Lines 78 to 94 in 4c8bcd4
The karmada-operator initializes /remove-kind bug |
@zhzhuang-zju The PR title might be a bit unclear. While it’s true that this issue wouldn't cause a null pointer dereference at runtime in Karmada as you said, testing |
How about |
APIServer
and EtcdServer
Hi @zhzhuang-zju, Could you please take a look at this PR if everything alright? |
Sorry for the late, I was on vacation recently and will respond shortly. |
/lgtm |
No worries. Hope you had great time in the vacation :) |
Hi @RainbowMango, @XiShanYongYe-Chang, and @zhzhuang-zju, Could we please get this PR merged? The unit test certificates PR #5559, which depends on this, has been stale for a while. If anything is needed to move it forward, please let me know. Thanks! 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks~
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: XiShanYongYe-Chang The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description
In this commit, we fix the null pointer dereference issue that happens in altnames mutators for both Karmada APIServer and EtcdServer when accessing the
Components
field onAltNamesMutatorConfig
struct.Motivation and Context
In testing the Certificate Manager and Karmada Store (#5559), empty
Components
in AltNamesMutatorConfig struct triggered a null pointer dereference in both APIServer and EtcdServer AltNames mutators. This PR resolves that issue.What type of PR is this?
/kind bug
Does this PR introduce a user-facing change?: