CVE-2022-0563: Medium severity kernel util-linux vulnerability
A flaw was found in the util-linux chfn and chsh utilities when compiled with Readline support. The Readline library uses an "INPUTRC" environment variable to get a path to the library config file. When the library cannot parse the specified file, it prints an error message containing data from the file. This flaw allows an unprivileged user to read root-owned files, potentially leading to privilege escalation. This flaw affects util-linux versions prior to 2.37.4.
Other sources
A flaw was found in util-linux's chfn/chsh utilities when compiled with readline support. The readline library accepts an INPUTRC parameter as an environment variable. Passing this environment variable causes readline to load the file in the chfn process, which is running as UID 0. Parsing this file will lead to errors being printed to standard output when reading lines that begin with certain strings such as "-" and lines that do not contain an expected character. These error messages contain parts of the file, which is the core of the issue. An unprivileged user could use this flaw to read root-owned files, potentially leading to privilege escalation.
References: https://blog.trailofbits.com/2023/02/16/suid-logic-bug-linux-readline/ https://lore.kernel.org/util-linux/20220214110609.msiwlm457ngoic6w@ws.net.home/T/#u
— Red Hat
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/util-linuxto a version that resolves this vulnerability.Fixed in 2.37.4 - Upgrade
Upgrade
alpine/util-linuxto a version that resolves this vulnerability.Fixed in 2.37.4-r0 - Upgrade
Upgrade
util-linuxto a version that resolves this vulnerability.Fixed in 2.37.4
Event History
Frequently Asked Questions
What is the vulnerability ID for this flaw?
The vulnerability ID for this flaw is CVE-2022-0563.
What software is affected by this vulnerability?
The util-linux chfn and chsh utilities when compiled with Readline support, as well as the NetApp ONTAP Select Deploy administration utility.
What is the severity level of CVE-2022-0563?
The severity level of CVE-2022-0563 is medium, with a severity value of 5.5.
What is the Common Weakness Enumeration (CWE) ID for this vulnerability?
The Common Weakness Enumeration (CWE) ID for this vulnerability is CWE-209.
Where can I find more information about this vulnerability?
You can find more information about this vulnerability at the following references: [Link 1](https://lore.kernel.org/util-linux/20220214110609.msiwlm457ngoic6w@ws.net.home/T/#u) and [Link 2](https://security.netapp.com/advisory/ntap-20220331-0002/).