-
Notifications
You must be signed in to change notification settings - Fork 39.7k
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
Querying several resources via API with invalid resourceVersion query parameter causes internal server error
#101350
Comments
resourceVersion query parameter causes internal server errorresourceVersion query parameter causes internal server error
|
/sig api-machinery |
|
IMO, it should return something like /assign kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/apiserver_test.go Lines 1165 to 1168 in ea07644
|
|
/triage accepted |
|
Some comments from the PR: #101368 (comment). kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion/types.go Lines 47 to 50 in ea07644
As the code comment shows, https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions
|
|
the error should come from here: kubernetes/staging/src/k8s.io/apiserver/pkg/storage/etcd3/api_object_versioner.go Line 91 in 2115852
which is correct, as it is converting/validating the resourceVersion for etcd. I think the question is whether it should return 500 or 400. |
|
I updated #101368. |
|
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
|
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
|
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
|
@k8s-triage-robot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What happened:
Hello @viralpoetry and I were fuzzing the k8s (via openapi-fuzzer) and found out following bug. Querying several resources via API with invalid
resourceVersionquery parameter causes internal server error. Affected resources:api-v1-namespaces-{namespace}-configmaps/api-v1-namespaces-{namespace}-endpoints/api-v1-namespaces-{namespace}-events/api-v1-namespaces-{namespace}-limitranges/api-v1-namespaces-{namespace}-persistentvolumeclaims/api-v1-namespaces-{namespace}-pods/api-v1-namespaces-{namespace}-podtemplates/api-v1-namespaces-{namespace}-replicationcontrollers/api-v1-namespaces-{namespace}-resourcequotas/api-v1-namespaces-{namespace}-secrets/api-v1-namespaces-{namespace}-serviceaccounts/api-v1-namespaces-{namespace}-services/What you expected to happen:
Response with non-500 HTTP status code
How to reproduce it (as minimally and precisely as possible):
We were fuzzing k8s locally via minikube.
/etc/hostsasminikubecatokenEnvironment:
kubectl version):cat /etc/os-release): Ubuntu 18.04.5 LTS (bionic)uname -a): Linux pine 4.15.0-140-generic Refactor controller manager. #144-Ubuntu SMP Fri Mar 19 14:12:35 UTC 2021 x86_64 x86_64 x86_64 GNU/LinuxThe text was updated successfully, but these errors were encountered: