apache/incubator-storm — pull request #3 by ptgoetz (2013-12-13 17:43:23+00:00)
Title: Prevent OOME if random data is sent to nimbus thrift port

Currently if random data is sent to Nimbus' thrift port, it will result in the following error, causing Nimbus to hang:

`java.lang.OutOfMemoryError: Java heap space`

Situations where this can happen:

* Inadvertently ssh'ing to the nimbus port (`ssh nimbus -p 6627`)
* Telnetting to the nimbus port (`telnet nimbus 6627`)
* Network security/vulnerability scans that probe port 6627

The solution is to set a limit on the size of the buffers Thrift uses for reading messages. With this fix in place when any of the above occurs, the following will appear in the nimbus log (but nimbus will not hang or crash):

```
2013-12-13 17:10:52 o.a.t.s.TNonblockingServer [ERROR] Read a frame size of 1397966893, which is bigger than the maximum allowable buffer size for ALL connections.
```