Bug 1045982 (CVE-2013-6890) - CVE-2013-6890 denyhosts: remote denial of ssh service
Summary: CVE-2013-6890 denyhosts: remote denial of ssh service
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2013-6890
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard: impact=low,public=20131222,reported=2...
Depends On: 1045983 1045984
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-23 06:39 UTC by Ratul Gupta
Modified: 2019-06-08 19:50 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-22 06:01:23 UTC


Attachments (Terms of Use)
Patch for this vulnerability. (3.48 KB, patch)
2013-12-23 06:42 UTC, Ratul Gupta
no flags Details | Diff

Description Ratul Gupta 2013-12-23 06:39:01 UTC
It was found that denyhosts, a tool preventing SSH brute-force attacks, could be used to perform remote denial of service against the SSH daemon.

Incorrectly specified regular expressions used to detect brute force attacks in authentication logs could be exploited by a malicious user to forge crafted login names in order to make denyhosts ban arbitrary IP addresses.

A solution is proposed by the reporter, which is to tighten up the regular expressions for matching log file entries. Specifically including the $ pattern to match the end of log lines.

References:
http://seclists.org/oss-sec/2013/q4/535
http://www.debian.org/security/2013/dsa-2826

Comment 1 Ratul Gupta 2013-12-23 06:40:17 UTC
Created denyhosts tracking bugs for this issue:

Affects: fedora-all [bug 1045983]
Affects: epel-all [bug 1045984]

Comment 2 Ratul Gupta 2013-12-23 06:42:16 UTC
Created attachment 840691 [details]
Patch for this vulnerability.

This patch was attached by the reporter on the oss-sec post.

Comment 4 Fedora Update System 2015-01-04 20:06:24 UTC
denyhosts-2.6-19.el6.1 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Fedora Update System 2015-01-04 20:08:17 UTC
denyhosts-2.6-5.el5.1 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2015-01-05 07:38:11 UTC
denyhosts-2.6-28.fc19.1 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2015-01-05 07:38:50 UTC
denyhosts-2.6-29.fc20.1 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Rodney 2015-01-14 18:41:01 UTC
I recently found that denyhosts was not detecting *any* attacks on root.

This change in regex.py seems to guarantee that the regex will never be matched since those lines end with a port number and the word "ssh2" in my /var/log/secure file:
12c12
< FAILED_ENTRY_REGEX = re.compile(r"""Failed (?P<method>.*) for (?P<invalid>inva
lid user |illegal user )?(?P<user>.*?) .*from (::ffff:)?(?P<host>\d{1,3}\.\d{1,3
}\.\d{1,3}\.\d{1,3})""")
---
> FAILED_ENTRY_REGEX = re.compile(r"""Failed (?P<method>\S*) for (?P<invalid>inv
alid user |illegal user )?(?P<user>.*) from (::ffff:)?(?P<host>\d{1,3}\.\d{1,3}\
.\d{1,3}\.\d{1,3})$""")

Sorry if I'm not following protocol or soemthing; I'm a rather infrequent user of this site.

Rodney


Note You need to log in before you can comment on or make changes to this bug.