The p11_rpc_buffer_get_byte_array_value function can write past the end of a heap buffer using memcpy due to a missing length check in p11_rpc_buffer_get_attribute. In the RPC protocol, each attribute has a length field, which is used to allocate memory, but byte array attribute values have their own separate length field, and it is this length field that is used in memcpy.
Created mingw-p11-kit tracking bugs for this issue:
Affects: fedora-all [bug 1907911]
Created p11-kit tracking bugs for this issue:
Affects: fedora-all [bug 1907909]
The main outcome of an successful attack is a DoS on the affected component due to a heap-based overflow, implying in a high availability impact. There's no Integrity or Confidentiality as it's very unlikely an attacker and trigger any remote code execution due to the heap layout.
The p11-kit library is primarily intended to be used locally, in which case the attacker needs to have sufficient permission to access the p11-kit communication. Although there may be use cases of p11-kit being used with a remote entity, all parties must be considered trusted.
As a result, Red Hat considers this vulnerability with a Medium severity.
This issue has been addressed in the following products:
Red Hat Enterprise Linux 8
Via RHSA-2021:1609 https://access.redhat.com/errata/RHSA-2021:1609
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):