summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Crête <tester@gentoo.org>2007-04-23 18:13:40 +0000
committerOlivier Crête <tester@gentoo.org>2007-04-23 18:13:40 +0000
commit3d6051ebe1e205beaf4e668403f7c83b7de2cea0 (patch)
tree270902489efcddf38c58c9b3efbe5ae8e94ed90f /net-im/amsn/files
parentVersion bump. (diff)
downloadgentoo-2-3d6051ebe1e205beaf4e668403f7c83b7de2cea0.tar.gz
gentoo-2-3d6051ebe1e205beaf4e668403f7c83b7de2cea0.tar.bz2
gentoo-2-3d6051ebe1e205beaf4e668403f7c83b7de2cea0.zip
Add patches provided by upstream to fix a DoS (bug #175563)
(Portage version: 2.1.2.2)
Diffstat (limited to 'net-im/amsn/files')
-rw-r--r--net-im/amsn/files/amsn-0.95-dos.patch103
-rw-r--r--net-im/amsn/files/amsn-0.96-dos.patch105
-rw-r--r--net-im/amsn/files/digest-amsn-0.943
-rw-r--r--net-im/amsn/files/digest-amsn-0.95-r43
-rw-r--r--net-im/amsn/files/digest-amsn-0.96-r1 (renamed from net-im/amsn/files/digest-amsn-0.96)0
5 files changed, 211 insertions, 3 deletions
diff --git a/net-im/amsn/files/amsn-0.95-dos.patch b/net-im/amsn/files/amsn-0.95-dos.patch
new file mode 100644
index 000000000000..dfd211e99814
--- /dev/null
+++ b/net-im/amsn/files/amsn-0.95-dos.patch
@@ -0,0 +1,103 @@
+diff -u amsn-0.95_OLD/config.tcl amsn-0.95/config.tcl
+--- amsn-0.95_OLD/config.tcl 2005-12-22 03:06:24.000000000 +0100
++++ amsn-0.95/config.tcl 2007-04-23 19:37:54.000000000 +0200
+@@ -1324,7 +1324,12 @@
+ while { $tries < 5 } {
+ set Port [GetRandomProfilePort]
+ status_log "LockProfile: Got random port $Port\n" blue
+- if { [catch {socket -server lockSvrNew -myaddr localhost $Port} newlockSock] == 0 } {
++ if { [::config::getKey enableremote] == 1} {
++ set cmd "socket -server lockSvrNew $Port"
++ } else {
++ set cmd "socket -myaddr 127.0.0.1 -server lockSvrNew $Port"
++ }
++ if { [catch {eval $cmd} newlockSock] == 0 } {
+ # Got one
+ LoginList changelock 0 $email $Port
+ set lockSock $newlockSock
+diff -u amsn-0.95_OLD/remote.tcl amsn-0.95/remote.tcl
+--- amsn-0.95_OLD/remote.tcl 2005-12-22 03:06:24.000000000 +0100
++++ amsn-0.95/remote.tcl 2007-04-23 19:40:41.000000000 +0200
+@@ -9,6 +9,7 @@
+ set remote_auth 0
+ set remote_sock_lock 0
+ set remote_sock 0
++ set remote_authtimer 0
+ }
+
+ proc remote_check_online { } {
+@@ -20,6 +21,11 @@
+ }
+ }
+
++proc remote_touchauthtimer {} {
++ global remote_authtimer
++ set remote_authtimer 0
++}
++
+ namespace eval ::remote {
+
+ # connect
+@@ -235,6 +241,11 @@
+ proc read_remote { command sock } {
+ global remote_auth remote_sock
+
++ if { [::config::getKey enableremote] != 1} {
++ close $sock
++ return
++ }
++
+ if { "$remote_sock" != "$sock" } {
+ set remote_temp_sock $remote_sock
+ init_remote $sock
+@@ -247,6 +258,9 @@
+
+
+ if {$command != ""} {
++ #AIM-FIX: Make command a real quoted list, or it will raise
++ #errors when containing braces
++ set command [split $command]
+ if { $remote_auth == 0 } {
+ authenticate "$command" "$sock"
+ } elseif { [catch {eval "::remote::$command" } res] } {
+@@ -264,26 +278,27 @@
+ }
+
+ proc authenticate { command sock } {
+- global remotemd5key remote_auth remote_sock_lock
++ global remotemd5key remote_auth remote_sock_lock remote_authtimer userchatto
++
++ if {$remote_authtimer} {
++ close $sock
++ return
++ }
+
+ if { $command == "auth" } {
+ set remotemd5key "[md5keygen]"
+ write_remote "auth $remotemd5key"
+ } elseif { [lindex $command 0] == "auth2" && [info exists remotemd5key] } {
+ if { "[lindex $command 1]" == "[::md5::hmac $remotemd5key [list [::config::getKey remotepassword]]]" } {
+- if { [::config::getKey enableremote] == 1 } {
+- set remote_auth 1
+- set remote_sock_lock $sock
+- write_remote "Authentication successfull"
+- } else {
+- write_remote "User disabled remote control"
+- }
++ set remote_auth 1
++ set remote_sock_lock $sock
++ catch { unset userchatto }
++ write_remote "Authentication successfull"
+ } else {
+- if { [::config::getKey enableremote] == 1 } {
+- write_remote "Authentication failed"
+- } else {
+- write_remote "User disabled remote control"
+- }
++ set remote_authtimer 1
++ after 3000 [list remote_touchauthtimer]
++ vwait remote_authtimer
++ write_remote "Authentication failed"
+ }
+ unset remotemd5key
+ } else { \ No newline at end of file
diff --git a/net-im/amsn/files/amsn-0.96-dos.patch b/net-im/amsn/files/amsn-0.96-dos.patch
new file mode 100644
index 000000000000..398248d29a92
--- /dev/null
+++ b/net-im/amsn/files/amsn-0.96-dos.patch
@@ -0,0 +1,105 @@
+diff -u amsn-0.96_OLD/config.tcl amsn-0.96/config.tcl
+--- amsn-0.96_OLD/config.tcl 2006-09-06 19:08:18.000000000 +0200
++++ amsn-0.96/config.tcl 2007-04-23 19:43:12.000000000 +0200
+@@ -1357,7 +1357,12 @@
+ while { $tries < 5 } {
+ set Port [GetRandomProfilePort]
+ status_log "LockProfile: Got random port $Port\n" blue
+- if { [catch {socket -server lockSvrNew $Port} newlockSock] == 0 } {
++ if { [::config::getKey enableremote] == 1} {
++ set cmd "socket -server lockSvrNew $Port"
++ } else {
++ set cmd "socket -myaddr 127.0.0.1 -server lockSvrNew $Port"
++ }
++ if { [catch {eval $cmd} newlockSock] == 0 } {
+ LoginList changelock 0 $email $Port
+ set lockSock $newlockSock
+ break
+diff -u amsn-0.96_OLD/remote.tcl amsn-0.96/remote.tcl
+--- amsn-0.96_OLD/remote.tcl 2006-10-08 05:13:58.000000000 +0200
++++ amsn-0.96/remote.tcl 2007-04-23 19:50:30.000000000 +0200
+@@ -9,6 +9,7 @@
+ set remote_auth 0
+ set remote_sock_lock 0
+ set remote_sock 0
++ set remote_authtimer 0
+ }
+
+ proc remote_check_online { } {
+@@ -20,6 +21,11 @@
+ }
+ }
+
++proc remote_touchauthtimer {} {
++ global remote_authtimer
++ set remote_authtimer 0
++}
++
+ namespace eval ::remote {
+
+ # connect
+@@ -240,6 +246,11 @@
+ proc read_remote { command sock } {
+ global remote_auth remote_sock
+
++ if { [::config::getKey enableremote] != 1} {
++ close $sock
++ return
++ }
++
+ if { "$remote_sock" != "$sock" } {
+ set remote_temp_sock $remote_sock
+ init_remote $sock
+@@ -252,6 +263,9 @@
+
+
+ if {$command != ""} {
++ #AIM-FIX: Make command a real quoted list, or it will raise
++ #errors when containing braces
++ set command [split $command]
+ if { $remote_auth == 0 } {
+ authenticate "$command" "$sock"
+ } elseif { [catch {eval "::remote::$command" } res] } {
+@@ -269,28 +283,28 @@
+ }
+
+ proc authenticate { command sock } {
+- global remotemd5key remote_auth remote_sock_lock
++ global remotemd5key remote_auth remote_sock_lock remote_authtimer
+ global userchatto
+
++ if {$remote_authtimer} {
++ close $sock
++ return
++ }
++
+ if { $command == "auth" } {
+ set remotemd5key "[md5keygen]"
+ write_remote "auth $remotemd5key"
+ } elseif { [lindex $command 0] == "auth2" && [info exists remotemd5key] } {
+ if { "[lindex $command 1]" == "[::md5::hmac $remotemd5key [list [::config::getKey remotepassword]]]" } {
+- if { [::config::getKey enableremote] == 1 } {
+- set remote_auth 1
+- set remote_sock_lock $sock
+- catch { unset userchatto }
+- write_remote "Authentication successfull"
+- } else {
+- write_remote "User disabled remote control"
+- }
++ set remote_auth 1
++ set remote_sock_lock $sock
++ catch { unset userchatto }
++ write_remote "Authentication successfull"
+ } else {
+- if { [::config::getKey enableremote] == 1 } {
+- write_remote "Authentication failed"
+- } else {
+- write_remote "User disabled remote control"
+- }
++ set remote_authtimer 1
++ after 3000 [list remote_touchauthtimer]
++ vwait remote_authtimer
++ write_remote "Authentication failed"
+ }
+ unset remotemd5key
+ } else { \ No newline at end of file
diff --git a/net-im/amsn/files/digest-amsn-0.94 b/net-im/amsn/files/digest-amsn-0.94
deleted file mode 100644
index 434a1a722cd6..000000000000
--- a/net-im/amsn/files/digest-amsn-0.94
+++ /dev/null
@@ -1,3 +0,0 @@
-MD5 7b7db9225342bb6c59b873ec90882e22 amsn-0_94.tar.gz 2293874
-RMD160 184a5fd1ff08e02420a5e85a96b58be39f64c796 amsn-0_94.tar.gz 2293874
-SHA256 a30df92d1f13ecd790cd77c4699c427b094df62bf7011e743cdd8198a265738c amsn-0_94.tar.gz 2293874
diff --git a/net-im/amsn/files/digest-amsn-0.95-r4 b/net-im/amsn/files/digest-amsn-0.95-r4
new file mode 100644
index 000000000000..5c826108199f
--- /dev/null
+++ b/net-im/amsn/files/digest-amsn-0.95-r4
@@ -0,0 +1,3 @@
+MD5 d0ea6e858601133c5abbfbbb5c84c8da amsn-0.95.tar.bz2 4460547
+RMD160 7729b10907292eb413d1f5a6488c506f38599173 amsn-0.95.tar.bz2 4460547
+SHA256 3ded8ea3f5e6570f643d9036d3ffdf3104ab4bab2973ee0ccf933e332d8d46ba amsn-0.95.tar.bz2 4460547
diff --git a/net-im/amsn/files/digest-amsn-0.96 b/net-im/amsn/files/digest-amsn-0.96-r1
index 5c0e08b2b66d..5c0e08b2b66d 100644
--- a/net-im/amsn/files/digest-amsn-0.96
+++ b/net-im/amsn/files/digest-amsn-0.96-r1