Skip to content
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

Validate and sanitize input to the OperatingSystemConfiguration #144

Open
MrBatschner opened this issue May 8, 2024 · 0 comments
Open
Labels
area/os Operation system related kind/enhancement Enhancement, improvement, extension os/suse-chost Related to SUSE Container Host OS

Comments

@MrBatschner
Copy link
Contributor

MrBatschner commented May 8, 2024

How to categorize this issue?

/area os
/kind enhancement
/os suse-chost

What would you like to be added:

For this extension, when using an OS image of type memoryone-chost, it is possible to supply configuration parameters by means of an OperatingSystemConfiguration.

apiVersion: memoryone-chost.os.extensions.gardener.cloud/v1alpha1
kind: OperatingSystemConfiguration
memoryTopology: "2"
systemMemory: "6x"

Right now, this configuration only supports the fields memoryTopology and systemMemory but both fields are strings. This comes with two drawbacks:

  • Should someone provide a non-string input to one of the fields (i.e. an unquoted 2 for memoryTopology which will be treated as an integer), the extension will fail to unmarshal this YAML into its corresponding go structs. This happens fairly late in tthe Shoot reconcilation process ultimately causing it to fail and affects new as well as existing clusters
  • These fields can be used to inject arbitrary values by just seperating them via ; (something like memoryTopology: "2;feature_enable=0x4" - we already saw that in the wild). Since these values ultimately end up in the user-data that gets supplied to the cloud-providers, not sanitizing the input is a potential security risk.

As a result, this extensions should provide an input validation that will reject an input that is invalid or potentially malicious so that it gets caught early and does not interfere with the reconcilation of Shoot clusters.

Why is this needed:

explained above

@gardener-robot gardener-robot added area/os Operation system related kind/enhancement Enhancement, improvement, extension os/suse-chost Related to SUSE Container Host OS labels May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/os Operation system related kind/enhancement Enhancement, improvement, extension os/suse-chost Related to SUSE Container Host OS
Projects
None yet
Development

No branches or pull requests

2 participants