CVE-2022-36227: Null Pointer Dereference
In libarchive 3.6.1, the software does not check for an error after calling calloc function that can return with a NULL pointer if the function fails, which leads to a resultant NULL pointer dereference or, in some cases, even arbitrary code execution.
Upstream patch: https://github.com/libarchive/libarchive/commit/fd180c36036df7181a64931264732a10ad8cd024
Other sources
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, which leads to a resultant NULL pointer dereference. NOTE: the discoverer cites this CWE-476 remark but third parties dispute the code-execution impact: "In rare circumstances, when NULL is equivalent to the 0x0 memory address and privileged code can access it, then writing or reading memory is possible, which may lead to code execution."
— MITRE
Affected Software
Remediation
Patch Available
Patch Available
Event History
Frequently Asked Questions
What is CVE-2022-36227?
CVE-2022-36227 is a vulnerability in the libarchive software before version 3.6.2 that can result in a NULL pointer dereference.
How severe is CVE-2022-36227?
CVE-2022-36227 has a severity rating of 9.8 (critical).
Which software versions are affected by CVE-2022-36227?
Versions of libarchive before 3.6.2 are affected by CVE-2022-36227.
What is the CWE category for CVE-2022-36227?
CVE-2022-36227 is classified under CWE-476 (NULL Pointer Dereference).
Are there any references for CVE-2022-36227?
Yes, you can find references for CVE-2022-36227 at the following links: [Link 1](https://bugs.gentoo.org/882521), [Link 2](https://github.com/libarchive/libarchive/blob/v3.0.0a/libarchive/archive_write.c#L215), [Link 3](https://github.com/libarchive/libarchive/issues/1754).