RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 975796 - [RFE] confusing aulast records for bad logins
Summary: [RFE] confusing aulast records for bad logins
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: audit
Version: 7.0
Hardware: Unspecified
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Steve Grubb
QA Contact: Ondrej Moriš
URL:
Whiteboard:
: 1019376 (view as bug list)
Depends On: 922508 1019376
Blocks: 947775
TreeView+ depends on / blocked
 
Reported: 2013-06-19 11:27 UTC by Ondrej Moriš
Modified: 2015-03-05 10:55 UTC (History)
1 user (show)

Fixed In Version: audit-2.4-1.el7
Doc Type: Enhancement
Doc Text:
Clone Of: 922508
Environment:
Last Closed: 2015-03-05 10:55:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0479 0 normal SHIPPED_LIVE audit bug fix and enhancement update 2015-03-05 15:29:29 UTC

Description Ondrej Moriš 2013-06-19 11:27:20 UTC
+++ This bug was initially created as a clone of Bug #922508 +++

Description of problem:

Aulast supports --bad option to report bad logins. Basically, one can distinguish between two types of unsuccessful logins:

a) username error
b) credentials error

Whenever b) happens (e.g. user typed wrong password), 'aulast --bad --proof' returns the following (single) record:

testuser ssh          127.0.0.1        Sun Mar 17 09:54   still logged in
    audit event proof serial numbers: 85084, 4197619, 140736879979400
    Session data can be found with this search:
    ausearch --start 03/17/2013 09:54:26 --end 03/17/2013 09:54:26


First minor issue is that "still logged in" might seem confusing. Second bigger issue is that the last two audit events clearly do not exist.

On the other hand, whenever a) happens, 'aulast --bad --proof' returns two records instead of a single one:

(unknown ssh          127.0.0.1        Sun Mar 17 09:54   still logged in
    audit event proof serial numbers: 85089, 4197619, 140736879979400
    Session data can be found with this search:
    ausearch --start 03/17/2013 09:54:27 --end 03/17/2013 09:54:27

(invalid ssh          127.0.0.1        Sun Mar 17 09:54   still logged in
    audit event proof serial numbers: 85097, 4197619, 140736879979400
    Session data can be found with this search:
    ausearch --start 03/17/2013 09:54:38 --end 03/17/2013 09:54:38

Again, there is a confusing "still logged in". Furthermore, there is some message instead of username (which is not known to aulast as far as I can see) and there are reported non-existing audit events as well.

Version-Release number of selected component (if applicable):

audit-2.1.3-3.el6

How reproducible:

100%

Steps to Reproduce:

1. make sure 'testuser' user exists
2. ssh testuser@localhost (use wrong password)
3. ssh non-existing-user@localhost
4. aulast --bad --proof
  
Actual results:

See above.

Expected results:

A single record per unsuccessful login. Correct times (instead of "still logged in") and the list of valid audit events. Moreover, it would be nice to have something else than "(invalid ssh" or "(unknown ssh" in case of username error.

--- Additional comment from Ondrej Moriš on 2013-03-17 12:16:49 EDT ---

This report also applies to audit-2.2-2.el6. Problem with non-existing audit events is caused by handling --proof option for both successful an unsuccessful login the same way (if (proof) { } branch in report_session function in aulast.c). Setting low/low priority/severity.

--- Additional comment from Steve Grubb on 2013-03-18 10:53:59 EDT ---

Fixed in upstream commit 765.

Comment 1 Ondrej Moriš 2013-06-19 11:28:43 UTC
On RHEL7 this applies to audit-2.3-2.el7.

Comment 4 Ondrej Moriš 2014-01-20 14:06:54 UTC
*** Bug 1019376 has been marked as a duplicate of this bug. ***

Comment 5 Ondrej Moriš 2014-01-20 15:00:24 UTC
Unfortunately, even with audit-2.3.2-4.el7 I still see some issues. First of all, the issue originally reported is still there:
(In reply to Ondrej Moriš from comment #0)

> for incorrect login 'aulast --bad --proof' returns two
> records instead of a single one:
> 
> (unknown ssh          127.0.0.1        Sun Mar 17 09:54   still logged in
>     audit event proof serial numbers: 85089, 4197619, 140736879979400
>     Session data can be found with this search:
>     ausearch --start 03/17/2013 09:54:27 --end 03/17/2013 09:54:27
> 
> (invalid ssh          127.0.0.1        Sun Mar 17 09:54   still logged in
>     audit event proof serial numbers: 85097, 4197619, 140736879979400
>     Session data can be found with this search:
>     ausearch --start 03/17/2013 09:54:38 --end 03/17/2013 09:54:38
> 
> Furthermore, there is some
> message instead of username (which is not known to aulast as far as I can
> see) and there are reported non-existing audit events as well.

Moreover, sometimes aulast reports non-existing event proofs:

# aulast --bad
...
testuser ssh          ::1              Mon Jan 20 09:55 - 09:55  (00:00)
    audit event proof serial numbers: 4922, 140309327265792, 140735685086333
    Session data can be found with this search:
    ausearch --start 01/20/2014 09:55:54 --end 01/20/2014 09:55:54

(unknown ssh          ::1              Mon Jan 20 09:56 - 09:56  (00:00)
    audit event proof serial numbers: 4927, 140309327265792, 140735685086333
    Session data can be found with this search:
    ausearch --start 01/20/2014 09:56:04 --end 01/20/2014 09:56:04

(invalid ssh          ::1              Mon Jan 20 09:56 - 09:56  (00:00)
    audit event proof serial numbers: 4935, 140309327265792, 140735685086333
    Session data can be found with this search:
    ausearch --start 01/20/2014 09:56:16 --end 01/20/2014 09:56:16

# ausearch -a 140735685086333
<no matches>
# ausearch -a 140309327265792
<no matches>

Clearly, those numbers seem to be incorrect (overflow?).

Comment 6 Ludek Smid 2014-06-26 10:47:02 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

Comment 7 Ludek Smid 2014-06-26 11:15:50 UTC
The comment above is incorrect. The correct version is bellow.
I'm sorry for any inconvenience.
---------------------------------------------------------------

This request was NOT resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you need
to escalate this bug.

Comment 8 Steve Grubb 2014-09-18 15:36:16 UTC
audit-2.4-1.el7 was built to resolve this issue.

Comment 12 errata-xmlrpc 2015-03-05 10:55:36 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0479.html


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