Bugzilla – Attachment 3436 Details for
Bug 3057
Fork-bomb when misconfiguring a host to ProxyJump onto itself
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Also check jumphost user
ssh-jumphost-user.patch (text/plain), 1.38 KB, created by
Darren Tucker
on 2020-07-31 13:52:43 AEST
(
hide
)
Description:
Also check jumphost user
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2020-07-31 13:52:43 AEST
Size:
1.38 KB
patch
obsolete
>Index: ssh.c >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/ssh.c,v >retrieving revision 1.533 >diff -u -p -r1.533 ssh.c >--- ssh.c 17 Jul 2020 03:43:42 -0000 1.533 >+++ ssh.c 31 Jul 2020 03:49:07 -0000 >@@ -1235,19 +1235,25 @@ main(int ac, char **av) > /* Fill configuration defaults. */ > fill_default_options(&options); > >+ if (options.user == NULL) >+ options.user = xstrdup(pw->pw_name); >+ > /* > * If ProxyJump option specified, then construct a ProxyCommand now. > */ > if (options.jump_host != NULL) { > char port_s[8]; >- const char *sshbin = argv0; >+ const char *jumpuser = options.jump_user, *sshbin = argv0; > int port = options.port, jumpport = options.jump_port; > > if (port <= 0) > port = default_ssh_port(); > if (jumpport <= 0) > jumpport = default_ssh_port(); >- if (strcmp(options.jump_host, host) == 0 && port == jumpport) >+ if (jumpuser == NULL) >+ jumpuser = options.user; >+ if (strcmp(options.jump_host, host) == 0 && port == jumpport && >+ strcmp(options.user, jumpuser) == 0) > fatal("jumphost loop via %s", options.jump_host); > > /* >@@ -1349,9 +1355,6 @@ main(int ac, char **av) > "stdin is not a terminal."); > tty_flag = 0; > } >- >- if (options.user == NULL) >- options.user = xstrdup(pw->pw_name); > > /* Set up strings used to percent_expand() arguments */ > if (gethostname(thishost, sizeof(thishost)) == -1)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
djm
:
ok+
Actions:
View
|
Diff
Attachments on
bug 3057
:
3356
| 3436