Comments (6)
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.
@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.
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.
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.
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.
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)
- Tag for release 4.0.9 HOT 2
- Missing header HOT 1
- README says that the version is 4.0.9 but the last tag is 4.0.8 HOT 2
- how to switch rad or gra when use trigonometric function HOT 2
- Incorrect Assignment Multiplication HOT 1
- Inconsistent Use of Signedness for Binary and Hex Numbers
- Feature Request: Add an Octal Value Reader
- logic operator lack shor-circuit feature
- 4.0.10 FTBFS HOT 1
- constant starting with letter 'o' HOT 5
- Example fails on macOS HOT 7
- int to bool conversion HOT 3
- type checking HOT 1
- xor is listed in the documentation but not implemented HOT 3
- Is it possible to directly represent a matrix instead of using many lines to define it? HOT 4
- FunTan and FunSin error HOT 2
- Is matrix algebra in SetExpr possible? HOT 2
- UnknownException when defining variables with dot (.) HOT 3
- Integer test causes floating point exceptions? HOT 1
- Assuming clang as the only compiler on Apple plaform. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from muparserx.