CVE-2023-4156: Heap out of bound read in builtin.c
A heap out of bound read issue exists in builtin.c of gawk prior to version 5.1.1. The array "theargs" takes an unsafe index "val", while it does not validate the index to ensure the index refers to a valid position in the array (e.g., exceedingly large or negative). The vulnerability can cause crash of the software and might be used by attackers to read sensitive information.
https://mail.gnu.org/archive/html/bug-gawk/2022-08/msg00000.html https://mail.gnu.org/archive/html/bug-gawk/2022-08/msg00023.html https://fossies.org/linux/gawk/ChangeLog#470 (Line: 470-475)
Other sources
A heap out-of-bounds read flaw was found in builtin.c in the gawk package. This issue may lead to a crash and could be used to read sensitive information.
— Ubuntu
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ubuntu/gawkto a version that resolves this vulnerability.Fixed in 1:5.2.1-1 - Upgrade
Upgrade
ubuntu/gawkto a version that resolves this vulnerability.Fixed in 1:4.1.4+dfsg-1ubuntu0.1~ - Upgrade
Upgrade
ubuntu/gawkto a version that resolves this vulnerability.Fixed in 1:5.0.1+dfsg-1ubuntu0.1 - Upgrade
Upgrade
ubuntu/gawkto a version that resolves this vulnerability.Fixed in 1:5.1.0-1ubuntu0.1 - Upgrade
Upgrade
ubuntu/gawkto a version that resolves this vulnerability.Fixed in 1:4.0.1+dfsg-2.1ubuntu2+ - Upgrade
Upgrade
ubuntu/gawkto a version that resolves this vulnerability.Fixed in 1:4.1.3+dfsg-0.1ubuntu0.1~ - Upgrade
Upgrade
debian/gawkto a version that resolves this vulnerability.Fixed in 1:5.2.1-2 - Upgrade
Upgrade
redhat/gawkto a version that resolves this vulnerability.Fixed in 5.1.1 - Upgrade
Upgrade
gawkto a version that resolves this vulnerability.Fixed in 5.1.1
Event History
Frequently Asked Questions
What is the vulnerability ID?
The vulnerability ID is CVE-2023-4156.
What is the title of the vulnerability?
The title of the vulnerability is 'heap out of bound read in builtin.c'.
What is the severity of CVE-2023-4156?
The severity of CVE-2023-4156 is high with a severity value of 7.1.
What is the affected software for CVE-2023-4156?
The affected software for CVE-2023-4156 is gawk.
How can this vulnerability be fixed?
To fix CVE-2023-4156, update gawk to version 1:5.2.1-2 or apply the recommended patches.