GHSA-6v7p-g79w-8964: Use After Free
Impact
If the Unpacker is used repeatedly after an error occurs, the process may crash with a SEGV.
If the Unpacker is used repeatedly to unpack untrusted input from external sources, it may be vulnerable to a DoS attack.
Patches
v1.2.1
Workarounds
Users should create a new Unpacker instead of reusing the same Unpacker after an error occurs.
Applying the above patch can prevent SEGV, but reusing the Streaming Unpacker after it has encountered an error will not yield correct data. If an error occurs during Streaming Unpacking, the Stream and Streaming Unpacker should be discarded.
Therefore, this is not just a workaround but the correct solution. The above patch only prevents crashes from incorrect usage.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
pip/msgpackto a version that resolves this vulnerability.Fixed in 1.2.1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in v1.2.1 - Operational
If an error occurs during Streaming Unpacking, discard the Stream and Streaming Unpacker and create a new Unpacker instead of reusing the same one.
Event History
Frequently Asked Questions
What is the severity of GHSA-6v7p-g79w-8964?
The severity of GHSA-6v7p-g79w-8964 is rated high at 7.5.
How do I fix GHSA-6v7p-g79w-8964?
You can fix GHSA-6v7p-g79w-8964 by upgrading to version 1.2.1 of the msgpack library.
What kind of attack can GHSA-6v7p-g79w-8964 be exploited for?
GHSA-6v7p-g79w-8964 can be exploited for a Denial of Service (DoS) attack if the Unpacker is used with untrusted input.
What is the impact of GHSA-6v7p-g79w-8964?
The impact of GHSA-6v7p-g79w-8964 includes potential crashes of the Unpacker process and vulnerability to DoS attacks.
What should I do if I cannot update due to GHSA-6v7p-g79w-8964?
If you cannot update due to GHSA-6v7p-g79w-8964, consider creating a new Unpacker instance for each operation to mitigate risks.