crypto: af_alg - Fix incorrect boolean values in af_alg_ctx
In the Linux kernel, the following vulnerability has been resolved: crypto: af_alg - Fix incorrect boolean values in af_alg_ctx Commit 1b34cbbf4f01 ("crypto: af_alg - Disallow concurrent writes in af_alg_sendmsg") changed some fields from bool to 1-bit bitfields of type u32. However, some assignments to these fields, specifically 'more' and 'merge', assign values greater than 1. These relied on C's implicit conversion to bool, such that zero becomes false and nonzero becomes true. With a 1-bit bitfields of type u32 instead, mod 2 of the value is taken instead, resulting in 0 being assigned in some cases when 1 was intended. Fix this by restoring the bool type.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.1.155, 6.12.50, 6.16.10, 6.6.109
- CVEs
- CVE-2025-40022
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 06:51 UTC · Revision 1
Source evidence
crypto: af_alg - Fix incorrect boolean values in af_alg_ctx
core-osv · Original sourcePublished 24 Oct 2025, 12:24 UTC
In the Linux kernel, the following vulnerability has been resolved: crypto: af_alg - Fix incorrect boolean values in af_alg_ctx Commit 1b34cbbf4f01 ("crypto: af_alg - Disallow concurrent writes in af_alg_sendmsg") changed some fields from bool to 1-bit bitfields of type u32. However, some assignments to these fields, specifically 'more' and 'merge', assign values greater than 1. These relied on C's implicit conversion to bool, such that zero becomes false and nonzero becomes true. With a 1-bit bitfields of type u32 instead, mod 2 of the value is taken instead, resulting in 0 being assigned in some cases when 1 was intended. Fix this by restoring the bool type.
osv:CVE-2025-40022
Kernel
Fixed versions: 6.1.155, 6.6.109, 6.12.50, 6.16.10
Complete source record
{
"id": "cb26b6be770c4eee84ef0d85acbffea53129a3ebec7cc87ebe2e1d840eca1af6",
"url": "https://osv.dev/vulnerability/CVE-2025-40022",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "crypto: af_alg - Fix incorrect boolean values in af_alg_ctx",
"summary": "In the Linux kernel, the following vulnerability has been resolved: crypto: af_alg - Fix incorrect boolean values in af_alg_ctx Commit 1b34cbbf4f01 (\"crypto: af_alg - Disallow concurrent writes in af_alg_sendmsg\") changed some fields from bool to 1-bit bitfields of type u32. However, some assignments to these fields, specifically 'more' and 'merge', assign values greater than 1. These relied on C's implicit conversion to bool, such that zero becomes false and nonzero becomes true. With a 1-bit bitfields of type u32 instead, mod 2 of the value is taken instead, resulting in 0 being assigned in some cases when 1 was intended. Fix this by restoring the bool type.",
"evidence": "osv:CVE-2025-40022",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.1.155",
"evidence": "/affected/1/ranges"
},
{
"value": "6.6.109",
"evidence": "/affected/1/ranges"
},
{
"value": "6.12.50",
"evidence": "/affected/1/ranges"
},
{
"value": "6.16.10",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2025-40022",
"aliases": [
"CVE-2025-40022"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "0f28c4adbc4a97437874c9b669fd7958a8c6d6ce"
},
{
"fixed": "3a21698ace915a445bce2d0dcfc84b6d2199baf7"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "e4c1ec11132ec466f7362a95f36a506ce4dc08c9"
},
{
"fixed": "d382d6daf0184490f366562469a5673f65ee2662"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "1f323a48e9b5ebfe6dc7d130fdf5c3c0e92a07c8"
},
{
"fixed": "54506c6335690f4ef1b9f154e34f5a604c72c1ed"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "7c4491b5644e3a3708f3dbd7591be0a570135b84"
},
{
"fixed": "8703940bd30b5ad94408d28d7192db2491cd3592"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "9aee87da5572b3a14075f501752e209801160d3d"
},
{
"fixed": "316b090c2fee964c307a634fecc7df269664b158"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "45bcf60fe49b37daab1acee57b27211ad1574042"
},
{
"fixed": "fbe96bd25423e61273d8831e995260b429d850b6"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "1b34cbbf4f011a121ef7b2d7d6e6920a036d5285"
},
{
"fixed": "d0ca0df179c4b21e2a6c4a4fb637aa8fa14575cb"
}
]
}
],
"versions": [
"v6.1.154",
"v6.6.108",
"v6.12.49",
"v6.16.9"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-40022.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.1.154"
},
{
"fixed": "6.1.155"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.6.108"
},
{
"fixed": "6.6.109"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.12.49"
},
{
"fixed": "6.12.50"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.16.9"
},
{
"fixed": "6.16.10"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-40022.json"
}
}
],
"modified": "2026-10-28T02:30:26.474847686Z",
"provider": "osv",
"references": [
"https://cert-portal.siemens.com/productcert/html/ssa-019113.html",
"https://cert-portal.siemens.com/productcert/html/ssa-082556.html",
"https://cert-portal.siemens.com/productcert/html/ssa-457936.html",
"https://git.kernel.org/stable/c/316b090c2fee964c307a634fecc7df269664b158",
"https://git.kernel.org/stable/c/3a21698ace915a445bce2d0dcfc84b6d2199baf7",
"https://git.kernel.org/stable/c/54506c6335690f4ef1b9f154e34f5a604c72c1ed",
"https://git.kernel.org/stable/c/8703940bd30b5ad94408d28d7192db2491cd3592",
"https://git.kernel.org/stable/c/d0ca0df179c4b21e2a6c4a4fb637aa8fa14575cb",
"https://git.kernel.org/stable/c/d382d6daf0184490f366562469a5673f65ee2662",
"https://git.kernel.org/stable/c/fbe96bd25423e61273d8831e995260b429d850b6",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40022.json",
"https://nvd.nist.gov/vuln/detail/CVE-2025-40022",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40022.json"
}
},
"related_cves": [
{
"value": "CVE-2025-40022",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 493100,
"published_at": "2025-10-24T12:24:57.875+00:00"
}