CVE-2025-21680: pktgen: Avoid out-of-bounds access in get_imix_entries
In the Linux kernel, the following vulnerability has been resolved:
pktgen: Avoid out-of-bounds access in get_imix_entries
Passing a sufficient amount of imix entries leads to invalid access to the
pkt_dev->imix_entries array because of the incorrect boundary check.
UBSAN: array-index-out-of-bounds in net/core/pktgen.c:874:24
index 20 is out of range for type 'imix_pkt [20]'
CPU: 2 PID: 1210 Comm: bash Not tainted 6.10.0-rc1 #121
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996)
Call Trace:
<TASK>
dump_stack_lvl lib/dump_stack.c:117
__ubsan_handle_out_of_bounds lib/ubsan.c:429
get_imix_entries net/core/pktgen.c:874
pktgen_if_write net/core/pktgen.c:1063
pde_write fs/proc/inode.c:334
proc_reg_write fs/proc/inode.c:346
vfs_write fs/read_write.c:593
ksys_write fs/read_write.c:644
do_syscall_64 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe arch/x86/entry/entry_64.S:130
Found by Linux Verification Center (linuxtesting.org) with SVACE.
[ fp: allow to fill the array completely; minor changelog cleanup ]
Security readout for executives and security teams
Plain-English summary
A local user with limited privileges may trigger an out-of-bounds Linux kernel memory access through the pktgen traffic generator. A successful attack could affect confidentiality, integrity, and availability, but the supplied evidence does not establish remote reachability or real-world exploitation.
Executive priority
Treat as a high-priority kernel maintenance issue on shared, developer, hosting, and other multi-user systems. It is less urgent where untrusted local access and pktgen availability are both absent. Patch through normal vendor channels promptly; emergency internet-facing remediation is not supported by the supplied evidence.
Technical view
An incorrect boundary check in net/core/pktgen.c permits get_imix_entries to index beyond the 20-element pkt_dev->imix_entries array. UBSAN observed index 20 during a procfs write. The supplied CVSS 3.1 score is 7.8, with local access and low privileges required. Upstream stable fix commits are referenced.
Likely exposure
Exposure is most likely on systems running an affected Linux kernel where pktgen is present and a local low-privileged user can reach its procfs control interface. The supplied version data names 5.15, 5.15.177, 6.1.127, 6.6.74, 6.12.11, and 6.13, but does not clearly express affected ranges.
Exploitation context
The source bundle marks this CVE as absent from KEV and provides no evidence of active exploitation or a public weaponized exploit. Exploitation requires local access with low privileges according to the supplied CVSS vector. The demonstrated result is an out-of-bounds kernel access detected by UBSAN; practical impact is not further established.
Researcher notes
CWE-129 applies because an improper array-index boundary check permits index 20 against a 20-element array. The trace reaches get_imix_entries through pktgen_if_write and procfs write handling. Five stable-kernel commits are supplied, but their branch-to-version mapping and precise vulnerable ranges should be confirmed from vendor advisories.
Mitigation direction
Apply a vendor-supported kernel update that incorporates the referenced upstream stable fix.
Confirm the applicable fixed package version through the operating-system vendor advisory.
Prioritize multi-user systems where untrusted local users can access pktgen controls.
Where patching is delayed, consult vendor guidance for supported pktgen exposure reduction.
Validation and detection
Record the running kernel version and distribution package release.
Check whether pktgen is present or enabled on each system.
Verify the installed kernel contains the applicable referenced stable fix.
Confirm untrusted users cannot access pktgen control interfaces.
Retest after updating and preserve kernel or UBSAN alerts for review.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-129: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
2CVSS vectors
3Timeline events
2ADP providers
7Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total
CVSS vector scores
2 official scores
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-129 · source CWE mapping
Improper Validation of Array Index
Improper Validation of Array Index represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.