Bug 39016 - Socket based activation of sshd can be DOS'd by port scanning
Summary: Socket based activation of sshd can be DOS'd by port scanning
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Lennart Poettering
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-06 15:55 UTC by Matthew Cox
Modified: 2012-01-20 18:42 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
unit file for sshd socket activation (127 bytes, application/octet-stream)
2011-07-06 15:55 UTC, Matthew Cox
Details

Description Matthew Cox 2011-07-06 15:55:40 UTC
Created attachment 48838 [details]
unit file for sshd socket activation

When using socket-based activation, the errors reported by the sshd instance cause systemd to consider the unit to be failing.

== Syslog ==
2011-07-06T18:19:50-04:00 neptune sudo:     matt : TTY=pts/3 ; PWD=/home/matt ; USER=root ; COMMAND=/bin/systemctl start sshd.socket
2011-07-06T18:19:55-04:00 neptune sshd[23044]: Could not write ident string to UNKNOWN
2011-07-06T18:20:01-04:00 neptune sshd[23048]: Could not write ident string to UNKNOWN
2011-07-06T18:20:04-04:00 neptune systemd[1]: sshd.socket failed to queue socket startup job: Transport endpoint is not connected
2011-07-06T18:20:04-04:00 neptune systemd[1]: Unit sshd.socket entered failed state.

== Reproduction ==
Start the sshd.socket unit.

Launch two port scans of the localhost: nmap localhost && nmap localhost

== Expected Result ==
Per-instance errors reported, but sshd.socket unit continues running and system continues to accept ssh connections.

== Observed Result ==
Systemd suspends the socket service and causes the system to stop accepting ssh connections.
Comment 1 Matthew Cox 2011-07-06 16:14:01 UTC
Additional information as there seems to be an issue reproducing this on an IRC discussion.

Arch Linux
kernel 2.6.39.2
systemd 29
openssh 5.8p2
nmap 5.51
Comment 2 Frederic Crozat 2012-01-19 06:46:47 UTC
also reported on openSUSE bugzilla : https://bugzilla.novell.com/show_bug.cgi?id=741590
Comment 3 Lennart Poettering 2012-01-20 18:42:31 UTC
Fixed in git.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.