Skip to content

Version 3.1.2🌈

Choose a tag to compare

@github-actions github-actions released this 23 Nov 21:55
· 17 commits to master since this release

Install

3.1.2 is published only here, not on Maven Central, so --packages com.redislabs:spark-redis_2.12:3.1.2 doesn't resolve. Download the jar-with-dependencies for your Spark's Scala version from the assets below, and give it to Spark with --jars:

spark-shell --jars spark-redis_2.12-3.1.2-jar-with-dependencies.jar

Use spark-redis_2.13-3.1.2-jar-with-dependencies.jar with a Scala 2.13 Spark. SHA256SUMS lists the checksums of the jars. The jars aren't PGP-signed.

Security

Fixes GHSA-w624-2rpc-p8mc, deserialization of untrusted data (CWE-502). DataFrame reads deserialized any Java class that a value in Redis named: every row of a binary-model table, and a table schema that 3.1.0 or earlier stored. So anyone who can write a table's keys in Redis could make the next read run code in the Spark driver or executors, given a chain of suitable classes on the classpath. Spark's Scala 2.13 builds ship one in the Scala library (CVE-2022-36944).

3.1.2 only deserializes the classes Spark-Redis writes itself. A value with any other class fails the read with a ClassNotAllowedException that names the Redis key and the class, before any of the class's code runs. A value's arrays also can't declare more elements than the value has bytes, so a short planted value can't run an executor or the driver out of memory.

A binary-model table with a user-defined type (UDT) column now needs the UDT's class allowed with the new deserialization.allowed.classes option, or its reads fail. See Binary model and untrusted data.

Changes