Bug 975796 - [RFE] confusing aulast records for bad logins
[RFE] confusing aulast records for bad logins
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: audit (Show other bugs)
7.0
Unspecified Linux
low Severity low
: rc
: ---
Assigned To: Steve Grubb
Ondrej Moriš
: FutureFeature
: 1019376 (view as bug list)
Depends On: 922508 1019376
Blocks: 947775
  Show dependency treegraph
 
Reported: 2013-06-19 07:27 EDT by Ondrej Moriš
Modified: 2015-03-05 05:55 EST (History)
1 user (show)

See Also:
Fixed In Version: audit-2.4-1.el7
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 922508
Environment:
Last Closed: 2015-03-05 05:55:36 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ondrej Moriš 2013-06-19 07:27:20 EDT
+++ 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 07:28:43 EDT
On RHEL7 this applies to audit-2.3-2.el7.
Comment 4 Ondrej Moriš 2014-01-20 09:06:54 EST
*** Bug 1019376 has been marked as a duplicate of this bug. ***
Comment 5 Ondrej Moriš 2014-01-20 10:00:24 EST
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 06:47:02 EDT
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 07:15:50 EDT
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 11:36:16 EDT
audit-2.4-1.el7 was built to resolve this issue.
Comment 12 errata-xmlrpc 2015-03-05 05:55:36 EST
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.