Giter Club home page Giter Club logo

Comments (6)

beltoforion avatar beltoforion commented on July 21, 2024

This hasn't been investigated. muparserx will throw std::bad_alloc in case of memory shortages. Its the responsibility of the client code to make sure this does not happen or deal gracefully with it. I can't introduce arbitrary limits to the size of matrices and C++ does not provide a standard complient way to investigate the existing memory size. muparserx is neither aimed at being used in flight control systems nor medical equipment for everything else standard C++ should suffice.

from muparserx.

martinrotter avatar martinrotter commented on July 21, 2024

@beltoforion I cannot agree more. Of course, muparserx can be used in quite important projects and can lead to some serious bugs, but in this kind of software I would not even expect that somebody could perform some kind of security audit just like that. muparserx is not True Crypt.

On the other hand, once serious vulnerabilities are discovered, they should be fixed.

from muparserx.

nasailja avatar nasailja commented on July 21, 2024

Trying to allocate a matrix larger than available memory is certainly a nuisance but not nearly as serious as arbitrary code execution via the expression parser. Was such a possibility considered when developing the parser or is its security/insecurity a byproduct of the implementation?

from muparserx.

beltoforion avatar beltoforion commented on July 21, 2024

muparserx can not execute arbitrary code unless you add a function that will execute arbitrary code. muparserx is also not a scripting engine since it is lacking commands for flow control.

from muparserx.

nasailja avatar nasailja commented on July 21, 2024

muparserx wasn't designed to execute arbitrary code yes but that doesn't mean it's not possible, unless proper steps have been taken to prevent those kinds of attacks. I think here's an example of a vulnerability report for a different parser: http://www.cvedetails.com/cve/CVE-2008-3196/

I'll assume that people haven't looked into muparserx from this perspective. Thanks.

from muparserx.

beltoforion avatar beltoforion commented on July 21, 2024

I really don't see the potential for such an attack. The syntax checks are very strict. The input must be a mathematical expression everything else is rejected immediately. identifiers must conform to predefined character sets and those sets dont allow characters that might be used for malicious purposes. I can however give no guarantees, i can only guarantee to close every hole that is reported.

from muparserx.

Related Issues (20)

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.