CVE-2024-45020
Vulnerability Summary
Timeline
Description
In the Linux kernel, the following vulnerability has been resolved: bpf: Fix a kernel verifier crash in stacksafe() Daniel Hodges reported a kernel verifier crash when playing with sched-ext. Further investigation shows that the crash is due to invalid memory access in stacksafe(). More specifically, it is the following code: if (exact != NOT_EXACT && old->stack[spi].slot_type[i % BPF_REG_SIZE] != cur->stack[spi].slot_type[i % BPF_REG_SIZE]) return false; The 'i' iterates old->allocated_stack. If cur->allocated_stack < old->allocated_stack the out-of-bound access will happen. To fix the issue add 'i >= cur->allocated_stack' check such that if the condition is true, stacksafe() should fail. Otherwise, cur->stack[spi].slot_type[i % BPF_REG_SIZE] memory access is legal.
CVSS Metrics
- v3.1•MEDIUM•Score: 5.5CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- v3.1•HIGH•Score: 7.8CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS Trends
Current EPSS score: 0.23%• Percentile: 14%
Techniques & Countermeasures
- CWE-787•Out-of-bounds Write
The product writes data past the end, or before the beginning, of the intended buffer.
Affected Systems
- debian•linux
< 6.10.7-1 | < 6.10.7-1
- ubuntu•linux
< 6.8.0-50.51
- ubuntu•linux-allwinner-5.19
all
- ubuntu•linux-aws
< 6.8.0-1020.22
- ubuntu•linux-aws-5.0
all
- ubuntu•linux-aws-5.11
all
- ubuntu•linux-aws-5.13
all
- ubuntu•linux-aws-5.19
all
- ubuntu•linux-aws-5.3
all
- ubuntu•linux-aws-5.8
all
- ubuntu•linux-aws-6.2
all
- ubuntu•linux-aws-6.5
all
- ubuntu•linux-aws-6.8
< 6.8.0-1020.22~22.04.1
- ubuntu•linux-azure
all | < 6.8.0-1020.23
- ubuntu•linux-azure-5.11
all
- ubuntu•linux-azure-5.13
all
- ubuntu•linux-azure-5.19
all
- ubuntu•linux-azure-5.3
all
- ubuntu•linux-azure-5.8
all
- ubuntu•linux-azure-6.2
all
- ubuntu•linux-azure-6.5
all
- ubuntu•linux-azure-6.8
< 6.8.0-1020.23~22.04.1
- ubuntu•linux-azure-edge
all
- ubuntu•linux-azure-fde
all
- ubuntu•linux-azure-fde-5.19
all
- ubuntu•linux-azure-fde-6.2
all
- ubuntu•linux-gcp
all | < 6.8.0-1019.21
- ubuntu•linux-gcp-5.11
all
- ubuntu•linux-gcp-5.13
all
- ubuntu•linux-gcp-5.19
all
- ubuntu•linux-gcp-5.3
all
- ubuntu•linux-gcp-5.8
all
- ubuntu•linux-gcp-6.2
all
- ubuntu•linux-gcp-6.5
all
- ubuntu•linux-gcp-6.8
< 6.8.0-1019.21~22.04.1
- ubuntu•linux-gke
all | < 6.8.0-1015.19
- ubuntu•linux-gke-4.15
all
- ubuntu•linux-gke-5.15
all
- ubuntu•linux-gke-5.4
all
- ubuntu•linux-gkeop
< 6.8.0-1002.4
- ubuntu•linux-gkeop-5.4
all
- ubuntu•linux-hwe
all
- ubuntu•linux-hwe-5.11
all
- ubuntu•linux-hwe-5.13
all
- ubuntu•linux-hwe-5.19
all
- ubuntu•linux-hwe-5.8
all
- ubuntu•linux-hwe-6.2
all
- ubuntu•linux-hwe-6.5
all
- ubuntu•linux-hwe-6.8
< 6.8.0-50.51~22.04.1
- ubuntu•linux-hwe-edge
all
Showing first 50 affected entries in server-rendered view.
References (12)
- https://git.kernel.org/stable/c/7cad3174cc79519bf5f6c4441780264416822c08
- https://git.kernel.org/stable/c/6e3987ac310c74bb4dd6a2fa8e46702fe505fb2b
- https://git.kernel.org/stable/c/bed2eb964c70b780fb55925892a74f26cb590b25
- https://ubuntu.com/security/CVE-2024-45020
- https://www.cve.org/CVERecord?id=CVE-2024-45020
- https://git.kernel.org/linus/bed2eb964c70b780fb55925892a74f26cb590b25
- https://ubuntu.com/security/notices/USN-7154-1
- https://ubuntu.com/security/notices/USN-7155-1
- https://ubuntu.com/security/notices/USN-7156-1
- https://ubuntu.com/security/notices/USN-7154-2
- https://ubuntu.com/security/notices/USN-7196-1
- https://security-tracker.debian.org/tracker/CVE-2024-45020