CVE-2025-40022: crypto: af_alg - Fix incorrect boolean values in af_alg_ctx

Published Oct 24, 2025
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

crypto: afalg - Fix incorrect boolean values in afalgctx

Commit 1b34cbbf4f01 ("crypto: afalg - Disallow concurrent writes in afalgsendmsg") 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.

Affected Software

2 affected componentsFixes available
Linux Linux kernel
debian/linux
6.1.176-16.1.190-16.12.107-16.12.115-27.2.15-17.3.3-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.115-2Fixed in 7.2.15-1Fixed in 7.3.3-1

Event History

Oct 24, 2025
CVE Published
via MITRE·12:24 PM
Data Sourced
via MITRE·12:24 PM
Description
Data Sourced
via NVD·01:15 PM
Description

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2025-40022?

CVE-2025-40022 is classified as a moderate severity vulnerability affecting the Linux kernel.

2

What systems are affected by CVE-2025-40022?

CVE-2025-40022 affects various versions of the Linux kernel across different distributions.

3

How do I fix CVE-2025-40022?

To fix CVE-2025-40022, update your Linux kernel to the latest stable version where the vulnerability has been addressed.

4

What is the nature of CVE-2025-40022?

CVE-2025-40022 involves a flaw in the af_alg module of the Linux kernel related to incorrect boolean values.

5

How can I check if my system is vulnerable to CVE-2025-40022?

You can check your Linux kernel version and compare it against the patched versions for CVE-2025-40022 to determine vulnerability.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203