CVE-2022-50754
Description
In the Linux kernel, the following vulnerability has been resolved:
apparmor: fix a memleak in multi_transaction_new()
In multi_transaction_new(), the variable t is not freed or passed out on the failure of copy_from_user(t->data, buf, size), which could lead to a memleak.
Fix this bug by adding a put_multi_transaction(t) in the error path.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A memory leak in the Linux kernel's AppArmor multi_transaction_new() function occurs when copy_from_user fails, leaving allocated memory unreleased.
Vulnerability: Memory Leak in AppArmor's multi_transaction_new()
In the Linux kernel's AppArmor security module, the function multi_transaction_new() allocates memory for a new transaction structure t. However, if the subsequent call to copy_from_user(t->data, buf, size) fails, the function returns an error without freeing the previously allocated memory for t. This results in a memory leak, as the allocated memory is no longer referenced and cannot be reclaimed [1][2].
Exploitation
This vulnerability can be triggered by a local user with the ability to interact with AppArmor interfaces that use AppArmor transactions, such as writing to certain files in the AppArmor filesystem. The attacker would need to provide a buffer that causes copy_from_user to fail, for example, by passing an invalid or inaccessible memory address. No special privileges beyond the ability to perform such operations are required, but the attack is local and requires user interaction with the kernel's AppArmor subsystem [3][4].
Impact
An attacker who successfully exploits this vulnerability can cause a memory leak, leading to gradual depletion of system memory. Over time, this could result in denial of service (DoS) conditions, as the system may run out of memory and become unresponsive or crash. The leak is limited to the AppArmor module and does not provide any privilege escalation or code execution capabilities [1][4].
Mitigation
The vulnerability has been patched in the Linux kernel. The fix involves adding a call to put_multi_transaction(t) in the error path to properly free the allocated memory when copy_from_user fails. Users should update their kernel to a version that includes the fix, such as those containing the commits referenced in the stable kernel updates [1][2][3][4]. No workarounds are available other than applying the patch.
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
2Patches
811d5fe7da67c95e6adc6a7a4eb0f78e28cbc935d86b29093775a37ffa9f488989932c2263d27a436e294c73275cf6834Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
8- git.kernel.org/stable/c/11d5fe7da67c3334cefc981297fd5defb78df15cnvd
- git.kernel.org/stable/c/3d27a436e294ac5d7a51bd5348ca63a42a468b35nvd
- git.kernel.org/stable/c/775a37ffa9f4681c4ad84c8634a7eec8af7098d4nvd
- git.kernel.org/stable/c/88989932c2269ea66074f52a6213598838f8b9e7nvd
- git.kernel.org/stable/c/935d86b29093e75b6c547d90b3979c2c2d23f1c4nvd
- git.kernel.org/stable/c/95e6adc6a7a4761ddf69ad713e55a06a3206309dnvd
- git.kernel.org/stable/c/c73275cf6834787ca090317f1d20dbfa3b7f05aanvd
- git.kernel.org/stable/c/eb0f78e28cbc8f97439c0a4c80ee5160c1df5ce6nvd
News mentions
0No linked articles in our index yet.