Giter VIP home page Giter VIP logo

Comments (3)

mboes avatar mboes commented on August 16, 2024

I think the key problem is that any module can make its own static pointers and GHC does not mandate that only the main program is allowed to do so.

Sounds like the cause for some problem. But could you state what the problem is? You seem to have a concern about security. But from this description I haven't pinned down what it is exactly quite yet.

from distributed-closure.

facundominguez avatar facundominguez commented on August 16, 2024

If so, what can I do to restrict the functions that I can get from unclosure?

As a stopgap, you could check the origin of the StaticPtr at runtime after looking it up (unsafeLookupStaticPtr) and before dereferencing it (deRefStaticPtr) with staticPtrInfo.

from distributed-closure.

jchia avatar jchia commented on August 16, 2024

OK, to clarify:

Let's say my program uses some external package that makes some static pointer that I don't know about. The program receives from an untrustworthy environment some serialized data encapsulating some closure in a request signify something for my program to run (maybe as part of an RPC system or a job queue system). The closure received typically involves some static pointer that I make in my own modules for the functions I want to allow running through closures. An attacker sends me a binary blob encoding some closure that involves some static pointer from the external package instead of my modules and the types line up, so I successfully deserialize the binary blob into a closure, and then end up naively running the closure and doing things I don't mean to do.

I would like to confirm whether that the above scenario is indeed possible and that a safety measure like the one mentioned by @facundominguez is necessary for security.

from distributed-closure.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.