-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
Closed
Labels
bufferIssues and PRs related to the buffer subsystem.Issues and PRs related to the buffer subsystem.c++Issues and PRs that require attention from people who are familiar with C++.Issues and PRs that require attention from people who are familiar with C++.securityIssues and PRs related to security.Issues and PRs related to security.
Description
The buffer writeFloatLE family functions are prone to code [remote] execution attacks via type confusion. The binding layer WriteFloatGeneric function just casts the first argument:
Local<Uint8Array> ts_obj = args[0].As<Uint8Array>();
Line 826 in 0e6c336
Local<Uint8Array> ts_obj = args[0].As<Uint8Array>(); |
Few methods are called on the ts_obj after which if you choose a good argument means executing code with some choice.
For example, the following doesn't crash until the memcpy on my machine:
Buffer.prototype.writeFloatLE.call(0xdeadbeef, 0, 0, true);
Metadata
Metadata
Assignees
Labels
bufferIssues and PRs related to the buffer subsystem.Issues and PRs related to the buffer subsystem.c++Issues and PRs that require attention from people who are familiar with C++.Issues and PRs that require attention from people who are familiar with C++.securityIssues and PRs related to security.Issues and PRs related to security.