mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/resolv.rb: randomize source port and transaction id.
CVE-2008-1447. * lib/resolv-replace.rb (UDPSocket#bind): don't resolv host if host is "". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
25efcaf400
commit
2577fa6dcc
3 changed files with 172 additions and 122 deletions
|
@ -23,7 +23,8 @@ end
|
|||
class UDPSocket
|
||||
alias original_resolv_bind bind
|
||||
def bind(host, port)
|
||||
original_resolv_bind(IPSocket.getaddress(host), port)
|
||||
host = IPSocket.getaddress(host) if host != ""
|
||||
original_resolv_bind(host, port)
|
||||
end
|
||||
|
||||
alias original_resolv_connect connect
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue