CVE-2025-21640: sctp: sysctl: cookie_hmac_alg: avoid using current->nsproxy
In the Linux kernel, the following vulnerability has been resolved:
sctp: sysctl: cookie_hmac_alg: avoid using current->nsproxy
As mentioned in a previous commit of this series, using the 'net'
structure via 'current' is not recommended for different reasons:
- Inconsistency: getting info from the reader's/writer's netns vs only
from the opener's netns.
- current->nsproxy can be NULL in some cases, resulting in an 'Oops'
(null-ptr-deref), e.g. when the current task is exiting, as spotted by
syzbot [1] using acct(2).
The 'net' structure can be obtained from the table->data using
container_of().
Note that table->data could also be used directly, as this is the only
member needed from the 'net' structure, but that would increase the size
of this fix, to use '*data' everywhere 'net->sctp.sctp_hmac_alg' is
used.
Security readout for executives and security teams
Plain-English summary
A flaw in the Linux kernel’s SCTP configuration handling can dereference missing task namespace data and crash the kernel. Exploitation requires local, low-privileged access, but successful triggering could seriously disrupt affected systems and potentially affect integrity, according to the supplied CVSS assessment.
Executive priority
Treat this as a high-priority kernel maintenance issue, especially on multi-user or shared Linux systems. It is not documented as remotely exploitable or actively exploited, so emergency internet-edge response is unsupported. Accelerate normal patching where untrusted local users, workloads, or tenants can interact with the host kernel.
Technical view
The SCTP cookie_hmac_alg sysctl handler improperly accessed networking namespace state through current->nsproxy. That pointer can be NULL while a task is exiting, causing a kernel null-pointer dereference. Stable fixes obtain the namespace from table->data instead. The supplied CVSS 3.1 score is 7.1, with local attack vector, low complexity, low privileges, and high integrity and availability impacts.
Likely exposure
Exposure is limited to Linux systems running affected kernel builds where a local, low-privileged user can reach the vulnerable SCTP sysctl behavior. The bundle lists affected releases from 3.8 through 6.13, but its flattened version data does not provide reliable distribution-specific boundaries. Confirm status using kernel and operating-system vendor advisories.
Exploitation context
The issue was found by syzbot in a task-exit scenario involving acct(2). The supplied record is not in KEV and provides no evidence of active exploitation. It also does not establish whether practical impact beyond a kernel crash has been demonstrated.
Researcher notes
The documented fault is a current->nsproxy lifetime/context error in the SCTP cookie_hmac_alg sysctl path. The fix changes namespace lookup to derive net from table->data. Although the CVSS vector assigns high integrity and availability impact, the narrative directly demonstrates a null dereference and kernel Oops; stronger integrity impact is not explained. Exact affected-to-fixed version mapping remains incomplete in the supplied bundle.
Mitigation direction
Install a vendor-supported kernel containing the applicable stable fix.
Review Linux distribution advisories for corrected package versions.
Prioritize shared, multi-user, and other locally accessible systems.
Restrict unnecessary local account access while patching is pending.
Validation and detection
Inventory Linux kernel versions and map them to vendor advisories.
Confirm the installed kernel includes the applicable stable fix.
Identify systems using or exposing SCTP configuration interfaces.
Review kernel logs for SCTP, nsproxy, null-pointer, or Oops events.
Validate updated kernels in staging before production rollout.
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.
cve · low confidence lookup
CVE-2025-21640 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
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.
1CVSS vectors
3Timeline events
2ADP providers
11Source links
CVSS vector scores
1 official score
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.