CVE-2022-4378
Linux Kernel vulnerability analysis and mitigation

Overview

A stack overflow vulnerability (CVE-2022-4378) was discovered in the Linux kernel's SYSCTL subsystem, affecting how users change certain kernel parameters and variables. The vulnerability was discovered by Kyle Zeng and affects multiple kernel versions including the latest, 6.0, 5.15, 5.10, 5.4, 4.19, 4.14, and 4.9. The issue was disclosed on December 9, 2022, and was fixed in kernel version 6.0.12 (OSS Security).

Technical details

The vulnerability stems from a missing check on user input in the _doprocdointvec function. The function truncates user input to one page but fails to maintain this limit when calling procskipspaces, which assumes the argument is a NULL-terminated string. If the buffer contains more than one page of spaces, the 'left' variable becomes negative. This negative value is then passed to procget_long, where its least significant 4 bytes are used as the length for a memcpy operation to the kernel stack, resulting in a stack-based buffer overflow (OSS Security).

Impact

The vulnerability allows a local user to crash the system (denial of service) or potentially escalate their privileges on the system. The flaw is particularly concerning as it can be triggered by non-root users who have access to user-namespace (Ubuntu Security, OSS Security).

Mitigation and workarounds

The vulnerability has been patched through two main fixes: a refactoring of procskipspaces to process data up to a limit instead of assuming NULL-terminated strings, and addressing the signness issue in the 'len' variable. These patches are available in kernel version 6.0.12 and have been backported to affected stable kernel versions (OSS Security).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management