gap-packages / io

GAP package IO to do input and output
https://gap-packages.github.io/io/
Other
14 stars 14 forks source link

Avoid using EvalString in IO_Unpickle #7

Open ChrisJefferson opened 10 years ago

ChrisJefferson commented 10 years ago

IO_Unpickle using EvalString means that a malicious data file can perform arbitrary code execution. Part of me feels this is a bad thing, and it might be worth putting the work in to remove the evals. However GAP might already be such a leaky sieve that this ship has sailed!

Interested in opinions.

fingolfin commented 10 years ago

I think we should indeed try to avoid using EvalString; not just for security reasons but also for general robustness and reproducibility reasons.

Of course overall, there are probably tons and tons of places in GAP that you could use for an exploit. But that shouldn't be an excuse for leaving unsafe code in... ;-). On the plus side, as long as you don't run GAP as a special privileged user, and don't expose it externally, I see little harm coming that way. Of course, if one wants to offer access to GAP via e.g. a webfront (similar to what Sage and polymake offer), this might be a bit different.