Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data.toString() in _onData can break truncated TCP packet. #11

Open
perillamint opened this issue Jul 8, 2015 · 0 comments
Open

data.toString() in _onData can break truncated TCP packet. #11

perillamint opened this issue Jul 8, 2015 · 0 comments

Comments

@perillamint
Copy link

If multibyte unicode character packet is truncated, This code cannot handle it properly.

Here is exploit code.

var net = require("net");
var client = new net.Socket();

client.setNoDelay(true);
client.connect(9838, '127.0.0.1', function () {
  //This sends string 3#"가" ([0x33, 0x23, 0x22, 0xEA, 0xB0, 0x80, 0x22]) 
  client.write(new Buffer([0x33, 0x23, 0x22, 0xEA, 0xB0]));
  setTimeout(function () {
    client.write(new Buffer([0x80, 0x22]), 1000)
  });
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant