[Bug 3300] New: ssh reports the error when use ssh -o "ConnectTimeout=2147483649"

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Fri Apr 16 13:50:42 AEST 2021


            Bug ID: 3300
           Summary: ssh reports the error when use ssh -o
           Product: Portable OpenSSH
           Version: 8.2p1
          Hardware: ARM64
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P5
         Component: ssh
          Assignee: unassigned-bugs at mindrot.org
          Reporter: kircherlike at outlook.com

After rectification: The ssh -o "ConnectTimeout=2147483649"
root at reports the error " ssh: connect to host
port 22: Connection timed out".

If ConnectTimeout is greater than or equal to 2147484 in the command,
set the maximum value INT_MAX to the variable connection_timeout in the
code according to the patch.
However, when the value of ConnectTimeout > 2147484 is 2147483649, the
value of connection_timeout overflow in the code is 1000 ms instead of

Method of reproducing the problem:
1. Integrate

2. ssh -o "ConnectTimeout=2147483647" root at
ssh -o "ConnectTimeout=2147483648" root at //:
connection_timeout = INT_MAX. The actual test variable
connection_timeout is 0, and the command ConnectTimeout is 0.
ssh -o "ConnectTimeout=2147483649" root at //:
connection_timeout = INT_MAX, the actual test variable
connection_timeout = 1000, and the command ConnectTimeout = 1.

#define INT_MAX 2147483647
#define INT_MIN (-INT_MAX - 1)

You are receiving this mail because:
You are watching the assignee of the bug.

More information about the openssh-bugs mailing list