Reverb use after free vulnerability
Moderate severity
GitHub Reviewed
Published
Sep 19, 2024
to the GitHub Advisory Database
•
Updated Sep 19, 2024
Description
Published by the National Vulnerability Database
Sep 19, 2024
Published to the GitHub Advisory Database
Sep 19, 2024
Reviewed
Sep 19, 2024
Last updated
Sep 19, 2024
There exists a use after free vulnerability in Reverb. Reverb supports the VARIANT datatype, which is supposed to represent an arbitrary object in C++. When a tensor proto of type VARIANT is unpacked, memory is first allocated to store the entire tensor, and a ctor is called on each instance. Afterwards, Reverb copies the content in tensor_content to the previously mentioned pre-allocated memory, which results in the bytes in tensor_content overwriting the vtable pointers of all the objects which were previously allocated. Reverb exposes 2 relevant gRPC endpoints: InsertStream and SampleStream. The attacker can insert this stream into the server’s database, then when the client next calls SampleStream they will unpack the tensor into RAM, and when any method on that object is called (including its destructor) the attacker gains control of the Program Counter. We recommend upgrading past git commit google-deepmind/reverb@6a0dcf4
References