Live data from Hacker News

Show HN: Ldump – serialize any Lua data

github.com

41–44 of 44 posts

Re: Show HN: Ldump – serialize any Lua data

#41

Very cool! I was just needing something like this for my Defold game, this looks way better than my hacky solution. Semi-unrelated - you say you're using tables as keys in your project. I didn't know you could do that! What are you using it for?

For example, you want to keep a set of objects -- then the objects themselves would be keys, and values would be true/nil. Or there is a good example in one of ldump's recent issues: https://github.com/girvel/ldump/issues/44, where the loaded packages are stored in a table as keys to easily detect external module usage.

Re: Show HN: Ldump – serialize any Lua data

#42
post #40

Earlier quoted context omitted.

Note that loading (maliciously crafted) bytecode is generally not safe in Lua; sandboxing can be escaped in more ways than what's possible when loading plaintext sourcecode, and there are no full mitigations for this currently as far as I know (and would probably be highly interpreter/version sensitive anyway)-- the only "real" mitigation strategy is to just not `load` bytecode at all. But this is probably a non-issu…

This is fascinating. I wonder if this issue exists in Lua5.2+, where there is no jit and `load` is able to restrict used environment.

[deleted]

Re: Show HN: Ldump – serialize any Lua data

#44
post #40

Earlier quoted context omitted.

Note that loading (maliciously crafted) bytecode is generally not safe in Lua; sandboxing can be escaped in more ways than what's possible when loading plaintext sourcecode, and there are no full mitigations for this currently as far as I know (and would probably be highly interpreter/version sensitive anyway)-- the only "real" mitigation strategy is to just not `load` bytecode at all. But this is probably a non-issu…

This is fascinating. I wonder if this issue exists in Lua5.2+, where there is no jit and `load` is able to restrict used environment.

Yes, exists. Here is an example for 5.2:

https://ia903205.us.archive.org/15/items/ARMArchitectureRefe...

Post reply on HN