jvazquez-r7/metasploit-framework — pull request #21 by jhart-r7 (2014-10-20 18:35:34+00:00)
Title: Fix Rex::Encoder::XDR.decode_int! to properly handle short data

This fixes the issues I raised in #3767, namely that ```decode_int!``` was improperly implemented and was written to handle short XDR data, which is invalid -- XDR must always be a multiple of 4 bytes. I also corrected some other areas of Rex::Encoder::XDR that were incorrectly relying on this functionality. Fortunately, this code is used only by a handful of modules:

```
modules/exploits/solaris/sunrpc/sadmind_exec.rb
modules/auxiliary/scanner/nfs/nfsmount.rb
modules/auxiliary/scanner/misc/sunrpc_portmapper.rb
modules/auxiliary/admin/sunrpc/solaris_kcms_readfile.rb
```

I don't have a machine that is vulnerable to the first or last issues, but I have a solaris 9 host that should get picked up by the middle two. After this patch, those two modules still work identically.