<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/kernel/audit.c, branch linux-5.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.7.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.7.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-08-05T07:58:36Z</updated>
<entry>
<title>revert: 1320a4052ea1 ("audit: trigger accompanying records when no rules present")</title>
<updated>2020-08-05T07:58:36Z</updated>
<author>
<name>Paul Moore</name>
</author>
<published>2020-07-28T19:33:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a5e79834a5cd304ba114fa4b05d75f10a4dce80e'/>
<id>urn:sha1:a5e79834a5cd304ba114fa4b05d75f10a4dce80e</id>
<content type='text'>
commit 8ac68dc455d9d18241d44b96800d73229029ed34 upstream.

Unfortunately the commit listed in the subject line above failed
to ensure that the task's audit_context was properly initialized/set
before enabling the "accompanying records".  Depending on the
situation, the resulting audit_context could have invalid values in
some of it's fields which could cause a kernel panic/oops when the
task/syscall exists and the audit records are generated.

We will revisit the original patch, with the necessary fixes, in a
future kernel but right now we just want to fix the kernel panic
with the least amount of added risk.

Cc: stable@vger.kernel.org
Fixes: 1320a4052ea1 ("audit: trigger accompanying records when no rules present")
Reported-by: j2468h@googlemail.com
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>audit: fix a net reference leak in audit_list_rules_send()</title>
<updated>2020-06-22T07:32:31Z</updated>
<author>
<name>Paul Moore</name>
</author>
<published>2020-04-21T13:10:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6f0ac9f266c1286e411840ff363419ad316a5bf3'/>
<id>urn:sha1:6f0ac9f266c1286e411840ff363419ad316a5bf3</id>
<content type='text'>
[ Upstream commit 3054d06719079388a543de6adb812638675ad8f5 ]

If audit_list_rules_send() fails when trying to create a new thread
to send the rules it also fails to cleanup properly, leaking a
reference to a net structure.  This patch fixes the error patch and
renames audit_send_list() to audit_send_list_thread() to better
match its cousin, audit_send_reply_thread().

Reported-by: teroincn@gmail.com
Reviewed-by: Richard Guy Briggs &lt;rgb@redhat.com&gt;
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: fix a net reference leak in audit_send_reply()</title>
<updated>2020-06-22T07:32:30Z</updated>
<author>
<name>Paul Moore</name>
</author>
<published>2020-04-20T14:09:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3b6768b51e00f7eb70ff42f49f008011135129f1'/>
<id>urn:sha1:3b6768b51e00f7eb70ff42f49f008011135129f1</id>
<content type='text'>
[ Upstream commit a48b284b403a4a073d8beb72d2bb33e54df67fb6 ]

If audit_send_reply() fails when trying to create a new thread to
send the reply it also fails to cleanup properly, leaking a reference
to a net structure.  This patch fixes the error path and makes a
handful of other cleanups that came up while fixing the code.

Reported-by: teroincn@gmail.com
Reviewed-by: Richard Guy Briggs &lt;rgb@redhat.com&gt;
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: check the length of userspace generated audit records</title>
<updated>2020-04-20T21:10:58Z</updated>
<author>
<name>Paul Moore</name>
</author>
<published>2020-04-20T20:24:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=763dafc520add02a1f4639b500c509acc0ea8e5b'/>
<id>urn:sha1:763dafc520add02a1f4639b500c509acc0ea8e5b</id>
<content type='text'>
Commit 756125289285 ("audit: always check the netlink payload length
in audit_receive_msg()") fixed a number of missing message length
checks, but forgot to check the length of userspace generated audit
records.  The good news is that you need CAP_AUDIT_WRITE to submit
userspace audit records, which is generally only given to trusted
processes, so the impact should be limited.

Cc: stable@vger.kernel.org
Fixes: 756125289285 ("audit: always check the netlink payload length in audit_receive_msg()")
Reported-by: syzbot+49e69b4d71a420ceda3e@syzkaller.appspotmail.com
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'audit-pr-20200330' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit</title>
<updated>2020-03-31T22:04:17Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2020-03-31T22:04:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=674d85eb2d7dc6ef436f46f770f7ab3f1b9c6669'/>
<id>urn:sha1:674d85eb2d7dc6ef436f46f770f7ab3f1b9c6669</id>
<content type='text'>
Pull audit updates from Paul Moore:
 "We've got two audit patches for the v5.7 merge window with a stellar
  14 lines changed between the two patches. The patch descriptions are
  far more lengthy than the patches themselves, which is a very good
  thing for patches this size IMHO. The patches pass our test suites and
  a quick summary is below:

   - Stop logging inode information when updating an audit file watch.

     Since we are not changing the inode, or the fact that we are
     watching the associated file, the inode information is just noise
     that we can do without.

   - Fix a problem where mandatory audit records were missing their
     accompanying audit records (e.g. SYSCALL records were missing).

     The missing records often meant that we didn't have the necessary
     context to understand what was going on when the event occurred"

* tag 'audit-pr-20200330' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit:
  audit: trigger accompanying records when no rules present
  audit: CONFIG_CHANGE don't log internal bookkeeping as an event
</content>
</entry>
<entry>
<title>audit: trigger accompanying records when no rules present</title>
<updated>2020-03-12T14:42:51Z</updated>
<author>
<name>Richard Guy Briggs</name>
</author>
<published>2020-03-10T13:20:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1320a4052ea11eb2879eb7361da15a106a780972'/>
<id>urn:sha1:1320a4052ea11eb2879eb7361da15a106a780972</id>
<content type='text'>
When there are no audit rules registered, mandatory records (config,
etc.) are missing their accompanying records (syscall, proctitle, etc.).

This is due to audit context dummy set on syscall entry based on absence
of rules that signals that no other records are to be printed.

Clear the dummy bit if any record is generated.

The proctitle context and dummy checks are pointless since the
proctitle record will not be printed if no syscall records are printed.

Please see upstream github issue
https://github.com/linux-audit/audit-kernel/issues/120

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: always check the netlink payload length in audit_receive_msg()</title>
<updated>2020-02-24T21:38:57Z</updated>
<author>
<name>Paul Moore</name>
</author>
<published>2020-02-24T21:38:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=756125289285f6e55a03861bf4b6257aa3d19a93'/>
<id>urn:sha1:756125289285f6e55a03861bf4b6257aa3d19a93</id>
<content type='text'>
This patch ensures that we always check the netlink payload length
in audit_receive_msg() before we take any action on the payload
itself.

Cc: stable@vger.kernel.org
Reported-by: syzbot+399c44bf1f43b8747403@syzkaller.appspotmail.com
Reported-by: syzbot+e4b12d8d202701f08b6d@syzkaller.appspotmail.com
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
</content>
</entry>
<entry>
<title>audit: Add __rcu annotation to RCU pointer</title>
<updated>2019-12-09T20:19:03Z</updated>
<author>
<name>Amol Grover</name>
</author>
<published>2019-12-01T18:33:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cb5172d96d16df72db8b55146b0ec00bfd97f079'/>
<id>urn:sha1:cb5172d96d16df72db8b55146b0ec00bfd97f079</id>
<content type='text'>
Add __rcu annotation to RCU-protected global pointer auditd_conn.

auditd_conn is an RCU-protected global pointer,i.e., accessed
via RCU methods rcu_dereference() and rcu_assign_pointer(),
hence it must be annotated with __rcu for sparse to report
warnings/errors correctly.

Fix multiple instances of the sparse error:
error: incompatible types in comparison expression
(different address spaces)

Reviewed-by: Joel Fernandes (Google) &lt;joel@joelfernandes.org&gt;
Signed-off-by: Amol Grover &lt;frextrite@gmail.com&gt;
[PM: tweak subject line]
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
</content>
</entry>
<entry>
<title>audit: remove redundant condition check in kauditd_thread()</title>
<updated>2019-10-25T15:48:14Z</updated>
<author>
<name>Yunfeng Ye</name>
</author>
<published>2019-10-23T13:27:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c34c78dfc1fc68a1f5403f996de8ca62f298d7b2'/>
<id>urn:sha1:c34c78dfc1fc68a1f5403f996de8ca62f298d7b2</id>
<content type='text'>
Warning is found by the code analysis tool:
  "the condition 'if(ac &amp;&amp; rc &lt; 0)' is redundant: ac"

The @ac variable has been checked before. It can't be a null pointer
here, so remove the redundant condition check.

Signed-off-by: Yunfeng Ye &lt;yeyunfeng@huawei.com&gt;
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
</content>
</entry>
<entry>
<title>audit: Report suspicious O_CREAT usage</title>
<updated>2019-10-03T17:59:29Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2019-10-02T23:41:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=245d73698ed7abdc7e520dfa38048bb80ce89571'/>
<id>urn:sha1:245d73698ed7abdc7e520dfa38048bb80ce89571</id>
<content type='text'>
This renames the very specific audit_log_link_denied() to
audit_log_path_denied() and adds the AUDIT_* type as an argument. This
allows for the creation of the new AUDIT_ANOM_CREAT that can be used to
report the fifo/regular file creation restrictions that were introduced
in commit 30aba6656f61 ("namei: allow restricted O_CREAT of FIFOs and
regular files").

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
</content>
</entry>
</feed>
