News for hackers. Stuff that matters.
Re:Why Python Pickle is Inscecure by rcoder on Wednesday September 09, 2009 @12:58PM (#813508)
I guess it was, "no, it shouldn't be, except that the pickle module is broken by design."

I.e., data structure parsing should not require a Turing-complete language. If it does, your serialization format is broken.

But yeah, I can see the issue with my original comment.

Re:Why Python Pickle is Inscecure by tptacek on Wednesday September 09, 2009 @01:02PM (#813513)
Pickle isn't a data structure parsing system, though. It's a system for dumping out and restoring (parts of) the state of the Python interpreter. If pyasn1 allowed code execution or method invocation, you could say it was broken by design. You can't say that about Pickle.
Re:Why Python Pickle is Inscecure by rcoder on Wednesday September 09, 2009 @05:17PM (#813991)
Since the pickle module doesn't marshal many types of stateful objects (filehandles, functions, etc.), I'm not sure it's fair to describe it as a means of saving the "state of the Python interpreter". It really just serves to save a compact representation of data on disk, without explicitly managing packing an unpacking from the binary serialization.

In that respect, it intuitively seems like it should behave more like the ASN1 or YAML formats w.r.t. the safety of data loaded from it. I may understand the risks, and you may understand the risks, but I think that a new Python programmer could be forgiven for simply scanning the standard library documentation and thinking that the pickle format would be safe for transport across untrusted channels.

Re:Why Python Pickle is Inscecure by eru on Thursday September 10, 2009 @09:05AM (#815151)
Just add crypthographic authentication (and hashes) and some problems go away.