CVE-2022-50749
Description
In the Linux kernel, the following vulnerability has been resolved:
acct: fix potential integer overflow in encode_comp_t()
The integer overflow is descripted with following codes: > 317 static comp_t encode_comp_t(u64 value) > 318 { > 319 int exp, rnd; ...... > 341 exp <<= MANTSIZE; > 342 exp += value; > 343 return exp; > 344 }
Currently comp_t is defined as type of '__u16', but the variable 'exp' is type of 'int', so overflow would happen when variable 'exp' in line 343 is greater than 65535.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A potential integer overflow in the Linux kernel's acct.c encode_comp_t() function could cause incorrect accounting data when processing large values.
Root
Cause
In the Linux kernel's process accounting subsystem for process accounting (kernel/acct.c), the function encode_comp_t() converts a 64-bit value into a compressed comp_t type (a __u16). The overflow occurs because the code uses an int variable exp to accumulate the result of a left shift and addition (exp <<= MANTSIZE; exp += value;). When the computed exp exceeds the maximum value storable in a __u16 (65535), the integer wraps around, producing an incorrect compressed representation [1][2][3][4].
Exploitation
Prerequisites
This vulnerability exists in the kernel's accounting feature, which is not enabled by default in most distributions. Exploitation requires either local access to a system that has process accounting turned on (e.g., via accton) or the ability to trigger the accounting of a process with extremely large resource usage metrics. No special privileges beyond being able to execute processes are required if accounting is active; the bug is triggered automatically during normal accounting operations when the raw 64-bit value exceeds certain thresholds [1][2][3][4].
Impact
If a process accumulates a large amount of CPU time or other tracked resource, the accounting record written to the log file will contain an incorrect (wrapped) value. This can lead to misinterpretation of resource usage by monitoring tools, potentially masking excessive consumption or causing billing/auditing errors. The vulnerability itself does not provide direct privilege escalation or code execution, but it corrupts the integrity of system accounting data [1][2][3][4].
Mitigation
The fix was applied to multiple stable kernel branches via commits that ensure proper type handling, eliminating the overflow condition. System administrators should apply the latest stable kernel updates from their distribution to protect against this issue. The vulnerability is not known to be exploited in the wild and is not listed on CISA's Known Exploited Vulnerabilities (KEV) catalog [1][2][3][4].
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
1Patches
9e93f995a591ccf60bbca1b831750a0983c45a815a3e019456edd0cdee578ebe16676e1dc2224897d81870aac6e60c464c5f31c655bccVulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
9- git.kernel.org/stable/c/0aac6e60c464a5f942f995428e67f8ae1c422250nvd
- git.kernel.org/stable/c/1750a0983c455a9b3badd848471fc8d58cb61f67nvd
- git.kernel.org/stable/c/2224897d8187dc22a83e05d9361efcccf67bcf12nvd
- git.kernel.org/stable/c/6edd0cdee5780fd5f43356b72b29a2a6d48ef6danvd
- git.kernel.org/stable/c/a815a3e019456c94b03bd183e7ac22fd29e9e6fdnvd
- git.kernel.org/stable/c/c5f31c655bcc01b6da53b836ac951c1556245305nvd
- git.kernel.org/stable/c/cf60bbca1b83a7e0927e36dbf178328982927886nvd
- git.kernel.org/stable/c/e93f995a591c352d35d89c518c54f790e1537754nvd
- git.kernel.org/stable/c/ebe16676e1dcaa4556ec4d36ca40c82e99e88cfanvd
News mentions
0No linked articles in our index yet.