diff options
author | Colin Watson <cjwatson@debian.org> | 2006-09-29 11:36:40 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2006-09-29 11:36:40 +0000 |
commit | b9438bbc073e792547318c8e343923748536529c (patch) | |
tree | 267f9815b8386617219421d862be309b73758c6b /sshd.c | |
parent | 0b228013734983ec12ddaa535d42704b5e4cee90 (diff) |
- CVE-2006-5051: Fix an unsafe signal hander reported by Mark Dowd. The
signal handler was vulnerable to a race condition that could be
exploited to perform a pre-authentication denial of service. On
portable OpenSSH, this vulnerability could theoretically lead to
pre-authentication remote code execution if GSSAPI authentication is
enabled, but the likelihood of successful exploitation appears remote.
Diffstat (limited to 'sshd.c')
-rw-r--r-- | sshd.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -310,13 +310,11 @@ main_sigchld_handler(int sig) | |||
310 | static void | 310 | static void |
311 | grace_alarm_handler(int sig) | 311 | grace_alarm_handler(int sig) |
312 | { | 312 | { |
313 | /* XXX no idea how fix this signal handler */ | ||
314 | |||
315 | if (use_privsep && pmonitor != NULL && pmonitor->m_pid > 0) | 313 | if (use_privsep && pmonitor != NULL && pmonitor->m_pid > 0) |
316 | kill(pmonitor->m_pid, SIGALRM); | 314 | kill(pmonitor->m_pid, SIGALRM); |
317 | 315 | ||
318 | /* Log error and exit. */ | 316 | /* Log error and exit. */ |
319 | fatal("Timeout before authentication for %s", get_remote_ipaddr()); | 317 | sigdie("Timeout before authentication for %s", get_remote_ipaddr()); |
320 | } | 318 | } |
321 | 319 | ||
322 | /* | 320 | /* |
@@ -1797,6 +1795,7 @@ main(int ac, char **av) | |||
1797 | */ | 1795 | */ |
1798 | alarm(0); | 1796 | alarm(0); |
1799 | signal(SIGALRM, SIG_DFL); | 1797 | signal(SIGALRM, SIG_DFL); |
1798 | authctxt->authenticated = 1; | ||
1800 | if (startup_pipe != -1) { | 1799 | if (startup_pipe != -1) { |
1801 | close(startup_pipe); | 1800 | close(startup_pipe); |
1802 | startup_pipe = -1; | 1801 | startup_pipe = -1; |