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

kernel: Cherry-pick fix for CVE-2023-20588 ("DIV0") #3373

Merged
merged 3 commits into from
Aug 30, 2023

Conversation

foersleo
Copy link
Contributor

Issue number: n/a

Description of changes:

Cherry-pick the software mitigation for CVE-2023-20588 ("DIV0") from the latest upstream stable kernel releases. Kept in separate commits to aid updating the individual kernel series as Bottlerocket's Amazon Linux upstream releases them. This also picks up a required augmentation of the x86 bugs vector to two words.

Testing done:

I have done some light build testing. Still need to do proper validation of the fix on appropriate instances.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

The fix for CVE-2023-20588 is currently only available in the kernel.org
upstream 5.10 stable kernel, but not yet in an Amazon Linux kernel
release. Cherry-pick it from the upstream kernel. Bring in an extra
commit (x86/bugs: Increase the x86 bugs vector size to two u32s) as a
dependency.

Contextual changes are necessary to make these patches apply as we
currently carry Amazon Linux' patches mitigating GDS and SRSO instead of
upstream variants of these patches.

Signed-off-by: Leonard Foerster <[email protected]>
The fic for CVE-2023-20588 is currently only available in the kernel.org
upstream 5.15 stable kernel, but not yet in an Amazon Linux kernel
release. Cherry-pick it from the upstream kernel. Bring in an extra
commit (x86/bugs: Increase the x86 bugs vector size to two u32s) as a
dependency.

Contextual changes are necessary to make these patches apply as we
currently carry Amazon Linux' patches mitigating GDS and SRSO instead of
upstream variants of these patches.

Signed-off-by: Leonard Foerster <[email protected]>
The fix for CVE-2023-20588 is currently only available in the knerel.org
upstream 6.1 stable kernel, but not yet in an Amazon Linux kernel
release. Cherry-pick it from the upstream kernel. Bring in an extra
commit (x86/bugs: Increase the x86 bugs vector size to two u32s) as a
dependency.

Contextual changes are necessary to make these patches apply as we
currently carry Amazon Linux' patches mitigating GDS and SRSO instead of
upstream vairants of these patches.

Signed-off-by: Leonard Foerster <[email protected]>
Copy link
Contributor

@stmcginnis stmcginnis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this covers the initial patch and follow up.

@foersleo
Copy link
Contributor Author

So, I was planning to check the patch is actually working correctly, assuming that we do have AMD Zen1 based platforms available in EC2. We do not, so we can not really test this CVE fix working and have to trust upstream here.

I went ahead and did run a sonobuoy quick test to ensure the base functionality is not negatively impacted on another AMD platform (c5a.large - Zen2 CPUs) though:

> kubectl get nodes -o wide
NAME                                              STATUS   ROLES    AGE     VERSION                INTERNAL-IP      EXTERNAL-IP   OS-IMAGE                                KERNEL-VERSION   CONTAINER-RUNTIME
ip-192-168-1-217.eu-central-1.compute.internal    Ready    <none>   3m42s   v1.23.17-eks-bbbebb8   192.168.1.217    3.69.54.125   Bottlerocket OS 1.15.0 (aws-k8s-1.23)   5.10.186         containerd://1.6.20+bottlerocket
ip-192-168-89-107.eu-central-1.compute.internal   Ready    <none>   2m46s   v1.27.4-eks-cedffd4    192.168.89.107   3.121.22.58   Bottlerocket OS 1.15.0 (aws-k8s-1.27)   5.15.122         containerd://1.6.20+bottlerocket
> sonobuoy run --mode=quick --wait
[...]
16:08:20             e2e                                            global   complete   passed   Passed:  1, Failed:  0, Remaining:  0
16:08:20    systemd-logs    ip-192-168-1-217.eu-central-1.compute.internal   complete   passed                                        
16:08:20    systemd-logs   ip-192-168-89-107.eu-central-1.compute.internal   complete   passed                                        

@foersleo foersleo merged commit 9d30b4c into bottlerocket-os:develop Aug 30, 2023
42 checks passed
@foersleo foersleo deleted the kernel_div0_fix branch August 30, 2023 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants