bpf: Fix out-of-bounds write in trie_get_next_key()
trie_get_next_key() allocates a node stack with size trie->max_prefixlen,
while it writes (trie->max_prefixlen + 1) nodes to the stack when it has
full paths from the root to leaves. For example, consider a trie with
max_prefixlen is 8, and the nodes with key 0x00/0, 0x00/1, 0x00/2, ...
0x00/8 inserted. Subsequent calls to trie_get_next_key with _key with
.prefixlen = 8 make 9 nodes be written on the node stack with size 8.
Metrics
Affected Vendors & Products
| Source | ID | Title | 
|---|---|---|
  Debian DLA | 
                DLA-4008-1 | linux-6.1 security update | 
  Debian DLA | 
                DLA-4075-1 | linux security update | 
  Debian DSA | 
                DSA-5818-1 | linux security update | 
  Ubuntu USN | 
                USN-7276-1 | Linux kernel vulnerabilities | 
  Ubuntu USN | 
                USN-7277-1 | Linux kernel vulnerabilities | 
  Ubuntu USN | 
                USN-7288-1 | Linux kernel vulnerabilities | 
  Ubuntu USN | 
                USN-7288-2 | Linux kernel vulnerabilities | 
  Ubuntu USN | 
                USN-7289-1 | Linux kernel vulnerabilities | 
  Ubuntu USN | 
                USN-7289-2 | Linux kernel vulnerabilities | 
  Ubuntu USN | 
                USN-7289-3 | Linux kernel vulnerabilities | 
  Ubuntu USN | 
                USN-7289-4 | Linux kernel vulnerabilities | 
  Ubuntu USN | 
                USN-7291-1 | Linux kernel vulnerabilities | 
  Ubuntu USN | 
                USN-7293-1 | Linux kernel vulnerabilities | 
  Ubuntu USN | 
                USN-7294-1 | Linux kernel vulnerabilities | 
  Ubuntu USN | 
                USN-7294-2 | Linux kernel vulnerabilities | 
  Ubuntu USN | 
                USN-7294-3 | Linux kernel vulnerabilities | 
  Ubuntu USN | 
                USN-7294-4 | Linux kernel vulnerabilities | 
  Ubuntu USN | 
                USN-7295-1 | Linux kernel vulnerabilities | 
  Ubuntu USN | 
                USN-7305-1 | Linux kernel vulnerabilities | 
  Ubuntu USN | 
                USN-7308-1 | Linux kernel vulnerabilities | 
  Ubuntu USN | 
                USN-7310-1 | Linux kernel vulnerabilities | 
  Ubuntu USN | 
                USN-7331-1 | Linux kernel vulnerabilities | 
  Ubuntu USN | 
                USN-7388-1 | Linux kernel vulnerabilities | 
  Ubuntu USN | 
                USN-7389-1 | Linux kernel (NVIDIA Tegra) vulnerabilities | 
  Ubuntu USN | 
                USN-7390-1 | Linux kernel (Xilinx ZynqMP) vulnerabilities | 
  Ubuntu USN | 
                USN-7393-1 | Linux kernel (FIPS) vulnerabilities | 
  Ubuntu USN | 
                USN-7401-1 | Linux kernel (AWS) vulnerabilities | 
  Ubuntu USN | 
                USN-7413-1 | Linux kernel (IoT) vulnerabilities | 
  Ubuntu USN | 
                USN-7449-1 | Linux kernel vulnerabilities | 
  Ubuntu USN | 
                USN-7449-2 | Linux kernel (HWE) vulnerabilities | 
  Ubuntu USN | 
                USN-7450-1 | Linux kernel vulnerabilities | 
  Ubuntu USN | 
                USN-7451-1 | Linux kernel vulnerabilities | 
  Ubuntu USN | 
                USN-7452-1 | Linux kernel vulnerabilities | 
  Ubuntu USN | 
                USN-7453-1 | Linux kernel (Real-time) vulnerabilities | 
  Ubuntu USN | 
                USN-7458-1 | Linux kernel (IBM) vulnerabilities | 
  Ubuntu USN | 
                USN-7468-1 | Linux kernel (Azure, N-Series) vulnerabilities | 
  Ubuntu USN | 
                USN-7523-1 | Linux kernel (Raspberry Pi Real-time) vulnerabilities | 
  Ubuntu USN | 
                USN-7524-1 | Linux kernel (Raspberry Pi) vulnerabilities | 
  Ubuntu USN | 
                USN-7539-1 | Linux kernel (Raspberry Pi) vulnerabilities | 
  Ubuntu USN | 
                USN-7540-1 | Linux kernel (Raspberry Pi) vulnerabilities | 
Solution
No solution given by the vendor.
Workaround
No workaround given by the vendor.
Mon, 03 Nov 2025 23:30:00 +0000
| Type | Values Removed | Values Added | 
|---|---|---|
| References | 
         | 
Mon, 03 Nov 2025 21:30:00 +0000
| Type | Values Removed | Values Added | 
|---|---|---|
| References | 
         | 
Wed, 16 Jul 2025 13:45:00 +0000
| Type | Values Removed | Values Added | 
|---|---|---|
| Metrics | 
        
        
        epss
         
  | 
    
        
        
        epss
         
  | 
Tue, 15 Jul 2025 13:45:00 +0000
| Type | Values Removed | Values Added | 
|---|---|---|
| Metrics | 
        
        
        epss
         
  | 
    
        
        
        epss
         
  | 
Wed, 18 Dec 2024 02:15:00 +0000
| Type | Values Removed | Values Added | 
|---|---|---|
| CPEs | cpe:/o:redhat:enterprise_linux:9  | 
    |
| Vendors & Products | 
        
        Redhat enterprise Linux
         | 
    
Thu, 19 Dec 2024 14:45:00 +0000
| Type | Values Removed | Values Added | 
|---|---|---|
| First Time appeared | 
        
        Redhat enterprise Linux
         | 
|
| CPEs | cpe:/a:redhat:enterprise_linux:9 cpe:/o:redhat:enterprise_linux:9  | 
|
| Vendors & Products | 
        
        Redhat enterprise Linux
         | 
Thu, 12 Dec 2024 02:15:00 +0000
| Type | Values Removed | Values Added | 
|---|---|---|
| First Time appeared | 
        
        Redhat
         Redhat rhel Eus  | 
|
| CPEs | cpe:/a:redhat:rhel_eus:9.4 | |
| Vendors & Products | 
        
        Redhat
         Redhat rhel Eus  | 
Wed, 11 Dec 2024 15:15:00 +0000
| Type | Values Removed | Values Added | 
|---|---|---|
| Metrics | 
        
        ssvc
         
  | 
Fri, 22 Nov 2024 14:00:00 +0000
| Type | Values Removed | Values Added | 
|---|---|---|
| References | 
         | |
| Metrics | 
        
        
        threat_severity
         
  | 
    
        
        
        threat_severity
         
  | 
Wed, 13 Nov 2024 21:30:00 +0000
| Type | Values Removed | Values Added | 
|---|---|---|
| First Time appeared | 
        
        Linux
         Linux linux Kernel  | 
|
| Weaknesses | CWE-787 | |
| CPEs | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* cpe:2.3:o:linux:linux_kernel:6.12:rc1:*:*:*:*:*:* cpe:2.3:o:linux:linux_kernel:6.12:rc2:*:*:*:*:*:* cpe:2.3:o:linux:linux_kernel:6.12:rc3:*:*:*:*:*:* cpe:2.3:o:linux:linux_kernel:6.12:rc4:*:*:*:*:*:* cpe:2.3:o:linux:linux_kernel:6.12:rc5:*:*:*:*:*:*  | 
|
| Vendors & Products | 
        
        Linux
         Linux linux Kernel  | 
|
| Metrics | 
        
        cvssV3_1
         
  | 
Sat, 09 Nov 2024 10:30:00 +0000
| Type | Values Removed | Values Added | 
|---|---|---|
| Description | In the Linux kernel, the following vulnerability has been resolved: bpf: Fix out-of-bounds write in trie_get_next_key() trie_get_next_key() allocates a node stack with size trie->max_prefixlen, while it writes (trie->max_prefixlen + 1) nodes to the stack when it has full paths from the root to leaves. For example, consider a trie with max_prefixlen is 8, and the nodes with key 0x00/0, 0x00/1, 0x00/2, ... 0x00/8 inserted. Subsequent calls to trie_get_next_key with _key with .prefixlen = 8 make 9 nodes be written on the node stack with size 8. | |
| Title | bpf: Fix out-of-bounds write in trie_get_next_key() | |
| References | 
         | 
        
  | 
Status: PUBLISHED
Assigner: Linux
Published:
Updated: 2025-11-03T22:27:42.104Z
Reserved: 2024-10-21T19:36:19.981Z
Link: CVE-2024-50262
Updated: 2025-11-03T22:27:42.104Z
Status : Modified
Published: 2024-11-09T11:15:11.687
Modified: 2025-11-03T23:17:07.997
Link: CVE-2024-50262
                        OpenCVE Enrichment
                    No data.
 Debian DLA
 Debian DSA
 Ubuntu USN