ISST-LTE: pVM: aureport couldn't get the right auid from the audit log on ubuntu16.04
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
The Ubuntu-power-systems project |
Fix Released
|
Medium
|
Ubuntu Security Team | ||
audit (Ubuntu) |
Invalid
|
Medium
|
Unassigned | ||
Xenial |
Fix Released
|
Medium
|
Tyler Hicks | ||
Zesty |
Won't Fix
|
Medium
|
Tyler Hicks |
Bug Description
[Impact]
The aureport command, part of the audit userspace utilities, incorrectly reports the user id of successful logins. "-1" is printed instead of the expected user id.
[Test Case]
As root, run `login`. Proceed as follows:
1. Login with a blank username and any password
2. Login with an invalid username and any password
3. Login with a valid username and an invalid password
4. Login with a valid username and a valid password
5. Exit from the login shell
6. Run `aureport -l` and examine the last for login records
An unpatched aureport will print the following:
=======
# date time auid host term exe success event
=======
...
2. 10/17/2017 23:45:32 UNKNOWN ? /dev/pts/8 /bin/login no 97
3. 10/17/2017 23:45:39 UNKNOWN ? /dev/pts/8 /bin/login no 99
4. 10/17/2017 23:45:45 tyhicks ? /dev/pts/8 /bin/login no 101
5. 10/17/2017 23:45:49 -1 ? /dev/pts/8 /bin/login yes 107
A patch aureport will print the correct output:
Login Report
=======
# date time auid host term exe success event
=======
...
2. 10/17/2017 23:52:44 UNKNOWN ? /dev/pts/8 /bin/login no 165
3. 10/17/2017 23:52:52 UNKNOWN ? /dev/pts/8 /bin/login no 167
4. 10/17/2017 23:52:58 tyhicks ? /dev/pts/8 /bin/login no 169
5. 10/17/2017 23:53:02 1000 ? /dev/pts/8 /bin/login yes 175
Note the "1000" in the auid column on the #5 row. It should *not* be "-1".
[Regression Potential]
The regression potential is limited due to the change only affecting a single line of code, the fix comes from upstream, and that the aureport utility is not critical.
[Original Report]
== Comment: #0 - Miao Tao Feng <email address hidden> - 2016-11-23 02:46:25 ==
When we develop new testcase for audit, we found that command "aureport -l" print out wrong auid "-1" on ubuntu16.04 and it should be 1000 according to the audit.log.
The following are details:
root@roselp2:~# aureport -l
Login Report
=======
# date time auid host term exe success event
=======
1. 11/23/2016 02:20:12 -1 10.33.24.118 /dev/pts/0 /usr/sbin/sshd yes 18
The auid "-1" on the above line should be "1000? according to the audit.log.
root@roselp2:~# grep ":18" /var/log/
type=USER_LOGIN msg=audit(
root@roselp2:~# dpkg -s auditd
Package: auditd
Status: install ok installed
Priority: extra
Section: admin
Installed-Size: 1051
Maintainer: Ubuntu Developers <email address hidden>
Architecture: ppc64el
Source: audit
Version: 1:2.4.5-1ubuntu2
Depends: lsb-base (>= 3.0-6), mawk | gawk, init-system-helpers (>= 1.18~), libaudit1 (>= 1:2.4.2), libauparse0 (>= 1:2.3.1), libc6 (>= 2.17)
Suggests: audispd-plugins
root@roselp2:~# uname -a
Linux roselp2 4.4.0-47-generic #68-Ubuntu SMP Wed Oct 26 19:38:24 UTC 2016 ppc64le ppc64le ppc64le GNU/Linux
root@roselp2:~# service auditd status
? auditd.service - Security Auditing Service
Loaded: loaded (/lib/systemd/
Active: active (running) since Wed 2016-11-23 02:19:21 CST; 19s ago
Main PID: 4085 (auditd)
CGroup: /system.
??4085 /sbin/auditd -n
Nov 23 02:19:21 roselp2 auditctl[4086]: enabled 0
Nov 23 02:19:21 roselp2 auditctl[4086]: failure 1
Nov 23 02:19:21 roselp2 auditctl[4086]: pid 0
Nov 23 02:19:21 roselp2 auditctl[4086]: rate_limit 0
Nov 23 02:19:21 roselp2 auditctl[4086]: backlog_limit 320
Nov 23 02:19:21 roselp2 auditctl[4086]: lost 0
Nov 23 02:19:21 roselp2 auditctl[4086]: backlog 0
Nov 23 02:19:21 roselp2 auditctl[4086]: backlog_wait_time 15000
Nov 23 02:19:21 roselp2 systemd[1]: Started Security Auditing Service.
Nov 23 02:19:21 roselp2 auditd[4085]: Init complete, auditd 2.4.5 listening for
Please cherry pick https:/
tags: | added: architecture-ppc64le bugnameltc-149041 severity-medium targetmilestone-inin--- |
Changed in ubuntu: | |
assignee: | nobody → Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage) |
affects: | ubuntu → audit (Ubuntu) |
Changed in ubuntu-power-systems: | |
importance: | Undecided → Medium |
assignee: | nobody → Canonical Security Team (canonical-security) |
Changed in audit (Ubuntu Xenial): | |
importance: | Undecided → Medium |
Changed in audit (Ubuntu Zesty): | |
importance: | Undecided → Medium |
description: | updated |
Changed in ubuntu-power-systems: | |
status: | New → In Progress |
Changed in ubuntu-power-systems: | |
assignee: | Canonical Security Team (canonical-security) → Ubuntu Security Team (ubuntu-security) |
Changed in ubuntu-power-systems: | |
status: | In Progress → Fix Committed |
tags: | added: triage-g |
Changed in audit (Ubuntu Zesty): | |
status: | Fix Committed → Won't Fix |
Changed in ubuntu-power-systems: | |
status: | Fix Committed → Fix Released |
tags: |
added: targetmilestone-inin16043 removed: targetmilestone-inin--- |
I have verified this bug on Ubuntu 17.04 and Ubuntu 16.04 LTS. It does not affect Ubuntu 17.10 (artful) as the audit package is new enough in that release to have received the upstream fix.
While performing the backport of the fix, I noticed that the code comments around the area of the code that was modified were at odds with the code changes. After determining that the code was correct and the comments were incorrect, I opened a upstream pull request to fix the comments:
https:/ /github. com/linux- audit/audit- userspace/ pull/30
I'll proceed with only the code changes and leave the incorrect comment for the purposes of this SRU.