Skip to content

Commit e470317

Browse files
basavaraj-sm05mkj
authored andcommitted
Require valid port for authorized_keys permitlisten
1 parent a663521 commit e470317

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/svr-authpubkeyoptions.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,8 @@ svr_parse_pubkey_options(buffer *options_buf, int line_num, const char* filename
359359
* port="*" isn't supported either, since it only is useful
360360
* with a host: part. */
361361

362-
if (m_str_to_uint(spec, &entry->port) == DROPBEAR_SUCCESS) {
362+
if (m_str_to_uint(spec, &entry->port) == DROPBEAR_SUCCESS
363+
&& entry->port <= 65535) {
363364
valid_option = 1;
364365
TRACE(("remote forwarding allows listening on port %u",
365366
entry->port));

0 commit comments

Comments
 (0)