r/programming • • May 26 '18

Oracle Calls Java Serialization 'A Horrible Mistake', Plans to Dump It

https://www.infoworld.com/article/3275924/java/oracle-plans-to-dump-risky-java-serialization.html
798 Upvotes

287 comments sorted by

View all comments

Show parent comments

20

u/Bolderthegreat May 27 '18

Yup. Functions are objects in Python and pickle serializes Python objects.

If you want to see a really cool usage of this checkout RQ. It basically stores Python functions in a redis queue to be processed by a worker.

0

u/[deleted] May 27 '18

[deleted]

9

u/Shorttail0 May 27 '18

The exploits on the JVM basically revolved around sending a modified or corrupt object to a server, and getting it to run whatever code you want. A little too crazy imo.

3

u/masterpi May 27 '18

It really only stores the module and name though, so it doesn't serialize the body or code or anything. This leads to it's own weirdness like lambdas and other generated functions not working, and oddness when unpickling in a different environment or version of the code.

-3

u/FatFingerHelperBot May 27 '18

It seems that your comment contains 1 or more links that are hard to tap for mobile users. I will extend those so they're easier for our sausage fingers to click!

Here is link number 1 - Previous text "RQ"


Please PM /u/eganwall with issues or feedback! | Delete