-
- Downloads
[SPARK-20922][CORE] Add whitelist of classes that can be deserialized by the launcher.
Blindly deserializing classes using Java serialization opens the code up to issues in other libraries, since just deserializing data from a stream may end up execution code (think readObject()). Since the launcher protocol is pretty self-contained, there's just a handful of classes it legitimately needs to deserialize, and they're in just two packages, so add a filter that throws errors if classes from any other package show up in the stream. This also maintains backwards compatibility (the updated launcher code can still communicate with the backend code in older Spark releases). Tested with new and existing unit tests. Author: Marcelo Vanzin <vanzin@cloudera.com> Closes #18166 from vanzin/SPARK-20922.
Showing
- launcher/src/main/java/org/apache/spark/launcher/FilteredObjectInputStream.java 53 additions, 0 deletions.../org/apache/spark/launcher/FilteredObjectInputStream.java
- launcher/src/main/java/org/apache/spark/launcher/LauncherConnection.java 1 addition, 2 deletions...in/java/org/apache/spark/launcher/LauncherConnection.java
- launcher/src/test/java/org/apache/spark/launcher/LauncherServerSuite.java 67 additions, 25 deletions...t/java/org/apache/spark/launcher/LauncherServerSuite.java
Loading
Please register or sign in to comment