<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/kernel/auditsc.c, branch linux-5.0.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.0.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.0.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-05-31T13:45:20Z</updated>
<entry>
<title>audit: fix a memleak caused by auditing load module</title>
<updated>2019-05-31T13:45:20Z</updated>
<author>
<name>Li RongQing</name>
</author>
<published>2019-03-07T01:16:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0698bdff44d4909ab20094c2f9a1b3ae4e9eb852'/>
<id>urn:sha1:0698bdff44d4909ab20094c2f9a1b3ae4e9eb852</id>
<content type='text'>
[ Upstream commit 95e0b46fcebd7dbf6850dee96046e4c4ddc7f69c ]

module.name will be allocated unconditionally when auditing load
module, and audit_log_start() can fail with other reasons, or
audit_log_exit maybe not called, caused module.name is not freed

so free module.name in audit_free_context and __audit_syscall_exit

unreferenced object 0xffff88af90837d20 (size 8):
  comm "modprobe", pid 1036, jiffies 4294704867 (age 3069.138s)
  hex dump (first 8 bytes):
    69 78 67 62 65 00 ff ff                          ixgbe...
  backtrace:
    [&lt;0000000008da28fe&gt;] __audit_log_kern_module+0x33/0x80
    [&lt;00000000c1491e61&gt;] load_module+0x64f/0x3850
    [&lt;000000007fc9ae3f&gt;] __do_sys_init_module+0x218/0x250
    [&lt;0000000000d4a478&gt;] do_syscall_64+0x117/0x400
    [&lt;000000004924ded8&gt;] entry_SYSCALL_64_after_hwframe+0x49/0xbe
    [&lt;000000007dc331dd&gt;] 0xffffffffffffffff

Fixes: ca86cad7380e3 ("audit: log module name on init_module")
Signed-off-by: Zhang Yu &lt;zhangyu31@baidu.com&gt;
Signed-off-by: Li RongQing &lt;lirongqing@baidu.com&gt;
[PM: manual merge fixup in __audit_syscall_exit()]
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>audit: hand taken context to audit_kill_trees for syscall logging</title>
<updated>2019-04-05T20:34:51Z</updated>
<author>
<name>Richard Guy Briggs</name>
</author>
<published>2018-12-10T22:17:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e78d5e16f1d6ea80c67c0eb1631f86add4896c26'/>
<id>urn:sha1:e78d5e16f1d6ea80c67c0eb1631f86add4896c26</id>
<content type='text'>
[ Upstream commit 9e36a5d49c3a6fc4a2e0ba2dc11b27c4a8ae6303 ]

Since the context is derived from the task parameter handed to
__audit_free(), hand the context to audit_kill_trees() so it can be used
to associate with a syscall record.  This requires adding the context
parameter to kill_rules() rather than using the current audit_context.

The callers of trim_marked() and evict_chunk() still have their context.

The EOE record was being issued prior to the pruning of the killed_tree
list.

Move the kill_trees call before the audit_log_exit call in
__audit_free() and __audit_syscall_exit() so that any pruned trees
CONFIG_CHANGE records are included with the associated syscall event by
the user library due to the EOE record flagging the end of the event.

See: https://github.com/linux-audit/audit-kernel/issues/50
See: https://github.com/linux-audit/audit-kernel/issues/59

Signed-off-by: Richard Guy Briggs &lt;rgb@redhat.com&gt;
[PM: fixed merge fuzz in kernel/audit_tree.c]
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>audit: use current whenever possible</title>
<updated>2018-11-26T23:41:21Z</updated>
<author>
<name>Paul Moore</name>
</author>
<published>2018-11-26T23:40:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2a1fe215e7300c7ebd6a7a24afcab71db5107bb0'/>
<id>urn:sha1:2a1fe215e7300c7ebd6a7a24afcab71db5107bb0</id>
<content type='text'>
There are many places, notably audit_log_task_info() and
audit_log_exit(), that take task_struct pointers but in reality they
are always working on the current task.  This patch eliminates the
task_struct arguments and uses current directly which allows a number
of cleanups as well.

Acked-by: Richard Guy Briggs &lt;rgb@redhat.com&gt;
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
</content>
</entry>
<entry>
<title>audit: minimize our use of audit_log_format()</title>
<updated>2018-11-26T23:40:00Z</updated>
<author>
<name>Paul Moore</name>
</author>
<published>2018-08-02T21:56:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d0a3f18a70f2d9700bf9f5e9c4a505472388a7c1'/>
<id>urn:sha1:d0a3f18a70f2d9700bf9f5e9c4a505472388a7c1</id>
<content type='text'>
There are some cases where we are making multiple audit_log_format()
calls in a row, for no apparent reason.  Squash these down to a
single audit_log_format() call whenever possible.

Acked-by: Richard Guy Briggs &lt;rgb@redhat.com&gt;
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;

</content>
</entry>
<entry>
<title>audit: remove WATCH and TREE config options</title>
<updated>2018-11-19T21:29:50Z</updated>
<author>
<name>Richard Guy Briggs</name>
</author>
<published>2018-11-16T17:17:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c8fc5d49c341805fee7fc295f2ea8a709f78aec4'/>
<id>urn:sha1:c8fc5d49c341805fee7fc295f2ea8a709f78aec4</id>
<content type='text'>
Remove the CONFIG_AUDIT_WATCH and CONFIG_AUDIT_TREE config options since
they are both dependent on CONFIG_AUDITSYSCALL and force
CONFIG_FSNOTIFY.

Signed-off-by: Richard Guy Briggs &lt;rgb@redhat.com&gt;
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
</content>
</entry>
<entry>
<title>audit: print empty EXECVE args</title>
<updated>2018-11-05T21:41:49Z</updated>
<author>
<name>Richard Guy Briggs</name>
</author>
<published>2018-10-10T20:22:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ea956d8be91edc702a98b7fe1f9463e7ca8c42ab'/>
<id>urn:sha1:ea956d8be91edc702a98b7fe1f9463e7ca8c42ab</id>
<content type='text'>
Empty executable arguments were being skipped when printing out the list
of arguments in an EXECVE record, making it appear they were somehow
lost.  Include empty arguments as an itemized empty string.

Reproducer:
	autrace /bin/ls "" "/etc"
	ausearch --start recent -m execve -i | grep EXECVE
	type=EXECVE msg=audit(10/03/2018 13:04:03.208:1391) : argc=3 a0=/bin/ls a2=/etc

With fix:
	type=EXECVE msg=audit(10/03/2018 21:51:38.290:194) : argc=3 a0=/bin/ls a1= a2=/etc
	type=EXECVE msg=audit(1538617898.290:194): argc=3 a0="/bin/ls" a1="" a2="/etc"

Passes audit-testsuite.  GH issue tracker at
https://github.com/linux-audit/audit-kernel/issues/99

Signed-off-by: Richard Guy Briggs &lt;rgb@redhat.com&gt;
[PM: cleaned up the commit metadata]
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'audit-pr-20180814' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit</title>
<updated>2018-08-15T17:46:54Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2018-08-15T17:46:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8c326850304d495deee6ff9a609173a340c5245b'/>
<id>urn:sha1:8c326850304d495deee6ff9a609173a340c5245b</id>
<content type='text'>
Pull audit patches from Paul Moore:
 "Twelve audit patches for v4.19 and they run the full gamut from fixes
  to features.

  Notable changes include the ability to use the "exe" audit filter
  field in a wider variety of filter types, a fix for our comparison of
  GID/EGID in audit filter rules, better association of related audit
  records (connecting related audit records together into one audit
  event), and a fix for a potential use-after-free in audit_add_watch().

  All the patches pass the audit-testsuite and merge cleanly on your
  current master branch"

* tag 'audit-pr-20180814' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit:
  audit: fix use-after-free in audit_add_watch
  audit: use ktime_get_coarse_real_ts64() for timestamps
  audit: use ktime_get_coarse_ts64() for time access
  audit: simplify audit_enabled check in audit_watch_log_rule_change()
  audit: check audit_enabled in audit_tree_log_remove_rule()
  cred: conditionally declare groups-related functions
  audit: eliminate audit_enabled magic number comparison
  audit: rename FILTER_TYPE to FILTER_EXCLUDE
  audit: Fix extended comparison of GID/EGID
  audit: tie ANOM_ABEND records to syscall
  audit: tie SECCOMP records to syscall
  audit: allow other filter list types for AUDIT_EXE
</content>
</entry>
<entry>
<title>audit: fix potential null dereference 'context-&gt;module.name'</title>
<updated>2018-07-30T22:09:37Z</updated>
<author>
<name>Yi Wang</name>
</author>
<published>2018-07-25T02:26:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b305f7ed0f4f494ad6f3ef5667501535d5a8fa31'/>
<id>urn:sha1:b305f7ed0f4f494ad6f3ef5667501535d5a8fa31</id>
<content type='text'>
The variable 'context-&gt;module.name' may be null pointer when
kmalloc return null, so it's better to check it before using
to avoid null dereference.
Another one more thing this patch does is using kstrdup instead
of (kmalloc + strcpy), and signal a lost record via audit_log_lost.

Cc: stable@vger.kernel.org # 4.11
Signed-off-by: Yi Wang &lt;wang.yi59@zte.com.cn&gt;
Reviewed-by: Jiang Biao &lt;jiang.biao2@zte.com.cn&gt;
Reviewed-by: Richard Guy Briggs &lt;rgb@redhat.com&gt;
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
</content>
</entry>
<entry>
<title>audit: use ktime_get_coarse_real_ts64() for timestamps</title>
<updated>2018-07-17T18:45:08Z</updated>
<author>
<name>Paul Moore</name>
</author>
<published>2018-07-17T18:45:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=290e44b7dd116cc61cf37b7ca0be13313bb11e37'/>
<id>urn:sha1:290e44b7dd116cc61cf37b7ca0be13313bb11e37</id>
<content type='text'>
Commit c72051d5778a ("audit: use ktime_get_coarse_ts64() for time
access") converted audit's use of current_kernel_time64() to the
new ktime_get_coarse_ts64() function.  Unfortunately this resulted
in incorrect timestamps, e.g. events stamped with the year 1969
despite it being 2018.  This patch corrects this by using
ktime_get_coarse_real_ts64() just like the current_kernel_time64()
wrapper.

Fixes: c72051d5778a ("audit: use ktime_get_coarse_ts64() for time access")
Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
</content>
</entry>
<entry>
<title>audit: use ktime_get_coarse_ts64() for time access</title>
<updated>2018-07-03T14:12:54Z</updated>
<author>
<name>Arnd Bergmann</name>
</author>
<published>2018-06-18T14:58:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c72051d5778a9c0e5df31d6553a6fa3507b3685c'/>
<id>urn:sha1:c72051d5778a9c0e5df31d6553a6fa3507b3685c</id>
<content type='text'>
The API got renamed for consistency with the other time accessors,
this changes the audit caller as well.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reviewed-by: Richard Guy Briggs &lt;rgb@redhat.com&gt;
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
</content>
</entry>
</feed>
