Bug 237449 (CVE-2007-5715)
Summary: | CVE-2007-5715 Login attempts as root may go unnoticed | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jonathan Underwood <jonathan.underwood> | ||||
Component: | denyhosts | Assignee: | Jason Tibbitts <j> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 6 | CC: | dennis, fedora-security-list | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | 2.6-4 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2007-04-24 22:21:33 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Jonathan Underwood
2007-04-23 10:07:41 UTC
Do you have any configuration entries defined which match REGEX? If not, I believe this is a known upstream bug. My understanding, however, is that it is harmless; ssh doesn't provide a hostname in that message so there is no way to extract a hostname to block from it, and the message you see in your logs is informing you of that. I am not sure that ssh actually provides the messages necessary to do what you are attempting to do, although please include it if so. Otherwise I don't see that the underlying problem is something that can be solved with denyhosts. http://www.mail-archive.com/denyhosts-user@lists.sourceforge.net/msg00132.html Note also that there was no upstream response to this; in fact, upstream seems to have gone dormant. If you have other suggestions on how we could make minor modifications to the denyhosts packaging to accommodate this, I'm happy to hear them. But my feeling now is that in the absense of additional messages from openssh which aren't being considered, this is not a denyhosts bug. If you look at the openssh log message provided above, you'll see the IP of the offending host, and so there is sufficient information - denyhosts blocks by IP rather than hostname. So, I believe denyhosts should block that host, and this is a fairly severe bug. Looking a bit harder into it, I think (as suggested by your mail to the user-list) that in file /usr/lib/python2.4/site-packages/DenyHosts/regex.py FAILED_ENTRY_REGEX7 = re.compile(r"""User (?P<user>.*) not allowed because not listed in AllowUsers""") should be replaced with FAILED_ENTRY_REGEX7 = re.compile(r"""User (?P<user>.*) .*from (::ffff:)?(?P<host>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) not allowed because not listed in AllowUsers""") I'll test this locally, but that seems to be the crux of it - REGEX7 contains no pattern to match the host. Have confirmed that fix works by placing the following line in denyhosts.conf FAILED_ENTRY_REGEX7 = User (?P<user>.*) .*from (::ffff:)?(?P<host>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) not allowed because not listed in AllowUsers [All one line, not wrapped] And so my suggestion of the replacement line in Comment #2 for /usr/lib/python2.4/site-packages/DenyHosts/regex.py is the correct fix. Will attach a patch. Any clue as to what this looks like for an IPv6 denial? Created attachment 153291 [details]
Fix REGEX7
(In reply to comment #4) > Any clue as to what this looks like for an IPv6 denial? Um, no. Seems irrelevant though, this fix is as IPV6 safe as the rest of DenyHosts - basically it brings REGEX7 into alignment with the other REGEXs - if this is broken for IPV6, then all the others are too. I don't have any way to test this I'm afraid. OK, let me do a build and see if I can get this past releng for F7. OK, thanks. An update for FC6 would also be much appreciated. I did some testing and let the new version stew on my servers overnight. Since that went OK, I pushed and built for F7, FC6, FC5, EL5 and EL4. Splendid, thanks. CVE id CVE-2007-5715 was assigned to this old issue. |