{"id":"CVE-2025-40022","aliases":["CVE-2025-40022"],"related":[],"kind":"vulnerability","state":"published","title":"crypto: af_alg - Fix incorrect boolean values in af_alg_ctx","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: af_alg - Fix incorrect boolean values in af_alg_ctx\n\nCommit 1b34cbbf4f01 (\"crypto: af_alg - Disallow concurrent writes in\naf_alg_sendmsg\") changed some fields from bool to 1-bit bitfields of\ntype u32.\n\nHowever, some assignments to these fields, specifically 'more' and\n'merge', assign values greater than 1.  These relied on C's implicit\nconversion to bool, such that zero becomes false and nonzero becomes\ntrue.\n\nWith a 1-bit bitfields of type u32 instead, mod 2 of the value is taken\ninstead, resulting in 0 being assigned in some cases when 1 was intended.\n\nFix this by restoring the bool type.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: af_alg - Fix incorrect boolean values in af_alg_ctx\n\nCommit 1b34cbbf4f01 (\"crypto: af_alg - Disallow concurrent writes in\naf_alg_sendmsg\") changed some fields from bool to 1-bit bitfields of\ntype u32.\n\nHowever, some assignments to these fields, specifically 'more' and\n'merge', assign values greater than 1.  These relied on C's implicit\nconversion to bool, such that zero becomes false and nonzero becomes\ntrue.\n\nWith a 1-bit bitfields of type u32 instead, mod 2 of the value is taken\ninstead, resulting in 0 being assigned in some cases when 1 was intended.\n\nFix this by restoring the bool type.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\ncrypto: af_alg - Corrección de valores booleanos incorrectos en af_alg_ctx\n\nEl commit 1b34cbbf4f01 ('crypto: af_alg - No permitir escrituras concurrentes en af_alg_sendmsg') cambió algunos campos de tipo booleano a campos de bits de 1 bit de tipo u32.\n\nSin embargo, algunas asignaciones a estos campos, específicamente 'more' y 'merge', asignan valores mayores que 1. Estos se basaban en la conversión implícita de C a booleano, de modo que cero se convierte en falso y cualquier valor distinto de cero se convierte en verdadero.\n\nEn su lugar, con campos de bits de 1 bit de tipo u32, se toma el módulo 2 del valor, lo que resulta en la asignación de 0 en algunos casos cuando se pretendía 1.\n\nEsto se corrige restaurando el tipo booleano.","source":"nvd"}],"published":"2025-10-24T12:24:57.875Z","modified":"2026-11-10T13:17:53.940Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"0f28c4adbc4a97437874c9b669fd7958a8c6d6ce","fixed":"3a21698ace915a445bce2d0dcfc84b6d2199baf7","status":"affected"},{"type":"git","introduced":"e4c1ec11132ec466f7362a95f36a506ce4dc08c9","fixed":"d382d6daf0184490f366562469a5673f65ee2662","status":"affected"},{"type":"git","introduced":"1f323a48e9b5ebfe6dc7d130fdf5c3c0e92a07c8","fixed":"54506c6335690f4ef1b9f154e34f5a604c72c1ed","status":"affected"},{"type":"git","introduced":"7c4491b5644e3a3708f3dbd7591be0a570135b84","fixed":"8703940bd30b5ad94408d28d7192db2491cd3592","status":"affected"},{"type":"git","introduced":"9aee87da5572b3a14075f501752e209801160d3d","fixed":"316b090c2fee964c307a634fecc7df269664b158","status":"affected"},{"type":"git","introduced":"45bcf60fe49b37daab1acee57b27211ad1574042","fixed":"fbe96bd25423e61273d8831e995260b429d850b6","status":"affected"},{"type":"git","introduced":"1b34cbbf4f011a121ef7b2d7d6e6920a036d5285","fixed":"d0ca0df179c4b21e2a6c4a4fb637aa8fa14575cb","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"6.1.154","fixed":"6.1.155","status":"affected"},{"type":"semver","introduced":"6.6.108","fixed":"6.6.109","status":"affected"},{"type":"semver","introduced":"6.12.49","fixed":"6.12.50","status":"affected"},{"type":"semver","introduced":"6.16.9","fixed":"6.16.10","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/3a21698ace915a445bce2d0dcfc84b6d2199baf7","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d382d6daf0184490f366562469a5673f65ee2662","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/54506c6335690f4ef1b9f154e34f5a604c72c1ed","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8703940bd30b5ad94408d28d7192db2491cd3592","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/316b090c2fee964c307a634fecc7df269664b158","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/fbe96bd25423e61273d8831e995260b429d850b6","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d0ca0df179c4b21e2a6c4a4fb637aa8fa14575cb","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-082556.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-019113.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-457936.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-40022","url":"https://www.cve.org/CVERecord?id=CVE-2025-40022","licence":"CVE Terms of Use","modified":"2026-11-10T12:37:29.922Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-40022","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-40022","licence":"Public domain","modified":"2026-11-10T13:17:53.940Z"}],"updatedAt":"2026-11-25T22:59:06.781Z","epss":{"score":0.00241,"percentile":0.16278,"date":"2026-12-01T12:00:22.000Z"}}