[Bug 2651] New: ssh prints bogus error message if config file has very long lines

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Sat Dec 24 13:17:19 AEDT 2016


https://bugzilla.mindrot.org/show_bug.cgi?id=2651

            Bug ID: 2651
           Summary: ssh prints bogus error message if config file has very
                    long lines
           Product: Portable OpenSSH
           Version: 7.4p1
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P5
         Component: ssh
          Assignee: unassigned-bugs at mindrot.org
          Reporter: dfong at dfong.com

Created attachment 2918
  --> https://bugzilla.mindrot.org/attachment.cgi?id=2918&action=edit
an example config file to demonstrate the bug

for example, if a config file contains a comment line that is 1023+
chars long, the characters at position 1023 and beyond are treated as a
separate line - not ignored as they should be.

in this example, longline.config has a comment line that is longer than
1023 chars.

$ ssh -F longline.config whatever
longline.config: line 5: Bad configuration option: ABCDEFG
longline.config: terminating, 1 bad configuration options

readconf.c uses a buffer of size 1024.  one char is needed for the null
terminator, another char is needed for the newline.  thus the effective
limit is 1022 (excluding newline).

very similar code exists in libopenssh.  it probably needs the fix too.

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


More information about the openssh-bugs mailing list