CVE-2022-36227CWE-476

CVE-2022-36227

Critical · published November 22, 2022

CVSS v3.1
9.8
EPSS
2%
Percentile
84.2
In the wild
Unconfirmed
What it is

⚠️ A NULL pointer could lead to unexpected consequences! In libarchive versions before 3.6.2, there's a sneaky oversight where an error check after calling the calloc function is completely missed! Think of it like a hotel that doesn't check if a guest has a room reserved before giving them a key. If they just hand it out without checking, the guest could end up wandering into an empty room, or worse, someone else's room! In rare cases, this oversight could allow privileged code to access and manipulate memory, leading to unexpected behavior or even code execution. Although the risk may not be widespread, it’s crucial to address this vulnerability to maintain system integrity and prevent potential exploits.

Put simply

Think of it like a hotel that doesn't check if a guest has a room reserved before giving them a key. If they just hand it out without checking, the guest could end up wandering into an empty room, or worse, someone else's room! This vulnerability in libarchive stems from a lack of error checking after the calloc function, which can return a NULL pointer if it fails. This leads to a NULL pointer dereference when the code attempts to read or write to that memory address.

What to do

In rare cases, this oversight could allow privileged code to access and manipulate memory, leading to unexpected behavior or even code execution. Although the risk may not be widespread, it’s crucial to address this vulnerability to maintain system integrity and prevent potential exploits. Upgrade to libarchive version 3.6.2 or later to mitigate this risk. Additionally, review your code to ensure proper error handling after memory allocation calls to prevent similar vulnerabilities in the future. You've got this! With a quick upgrade, you'll be back in the game, keeping your systems safe and sound! 🛡️

The record
Technical detail
CVSS v3.1
9.8 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.02445 · 84.2th percentile
Weakness
CWE-476 · NULL Pointer Dereference
Published
2022-11-22T07:15Z
Affected products (6)
ProductVersionsFixed in
libarchive/libarchive≥ 3.0.0, < 3.6.23.6.2
debian/debian_linuxall versions—
fedoraproject/fedoraall versions—
splunk/universal_forwarder≥ 8.2.0, < 8.2.128.2.12
splunk/universal_forwarder≥ 9.0.0, < 9.0.69.0.6
splunk/universal_forwarderall versions—
References (13)
EPSS history
Timeline
  • 22 NOV 00:00Z
    In libarchive before 3.6.2, the software does not check for an error after calling calloc function that can return with a NULL pointer if the function fails…
    cvelistv5