CVE-2025-21640
sctp: sysctl: cookie_hmac_alg: avoid using current->nsproxy
Reported by linux · Published January 19, 2025
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| kernel-modules-extra-common | Amazon Linux | 6.1.127-135.201.amzn2023 |
| perf | Amazon Linux | 6.1.127-135.201.amzn2023 |
| kernel-tools | Amazon Linux | 6.1.127-135.201.amzn2023 |
| kernel-tools-devel | Amazon Linux | 6.1.127-135.201.amzn2023 |
| kernel-headers | Amazon Linux | 6.1.127-135.201.amzn2023 |
| kernel-devel | Amazon Linux | 6.1.127-135.201.amzn2023 |
| kernel | Amazon Linux | 6.1.127-135.201.amzn2023 |
| kernel-livepatch-6.1.127-135.201 | Amazon Linux | 1.0-0.amzn2023 |
| python3-perf | Amazon Linux | 6.1.127-135.201.amzn2023 |
| kernel-libbpf-static | Amazon Linux | 6.1.127-135.201.amzn2023 |
| kernel-libbpf | Amazon Linux | 6.1.127-135.201.amzn2023 |
| bpftool | Amazon Linux | 6.1.127-135.201.amzn2023 |
4 more packages have a fixed version. See every fix in Lookup.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 3c68198e75111a905ac2412be12bf7b29099729b, 3c68198e75111a905ac2412be12bf7b29099729b, 3c68198e75111a905ac2412be12bf7b29099729b |
| Linux | Linux | 3.8, 0, 5.4.292 |
| amazon:2023 | kernel-modules-extra-common | 0 |
| amazon:2023 | perf | 0 |
| amazon:2023 | kernel-tools | 0 |
| linux | linux_kernel | 3.8, 3.8, 3.8 |
| amazon:2023 | kernel-tools-devel | 0 |
| amazon:2023 | kernel-headers | 0 |
| amazon:2023 | kernel-devel | 0 |
| amazon:2023 | kernel | 0 |
| amazon:2023 | kernel-livepatch-6.1.127-135.201 | 0 |
| amazon:2023 | python3-perf | 0 |
| amazon:2023 | kernel-libbpf-static | 0 |
| amazon:2023 | kernel-libbpf | 0 |
| Siemens | SIMATIC S7-1500 TM MFP - GNU/Linux subsystem | 0 |
| amazon:2023 | bpftool | 0 |
| amazon:2023 | kernel-libbpf-devel | 0 |
| amazon:2023 | kernel-modules-extra | 0 |
| Linux | Linux | 3.8, 3c68198e75111a905ac2412be12bf7b29099729b, 3c68198e75111a905ac2412be12bf7b29099729b |
Timeline
- Jan 19, 2025 CVE Published
- Jan 20, 2025 EPSS Score (30 in total, the first dated here)
- Feb 13, 2025 Coalition ESS Score (13 in total, the first dated here)
- Dec 22, 2025 Security Advisory (135 in total, the first dated here)
- Apr 29, 2026 Distribution Patch (129 in total, the first dated here)
- Nov 9, 2026 CVE Updated
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2025-21640
vulnetix vdb fixes CVE-2025-21640
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-21640/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart