<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/audit.h, branch v6.16.3</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.16.3</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.16.3'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2025-08-15T14:38:20Z</updated>
<entry>
<title>audit,module: restore audit logging in load failure case</title>
<updated>2025-08-15T14:38:20Z</updated>
<author>
<name>Richard Guy Briggs</name>
<email>rgb@redhat.com</email>
</author>
<published>2025-06-13T19:58:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a0e728844e362bc26908a3da74c9e37cba00f505'/>
<id>urn:sha1:a0e728844e362bc26908a3da74c9e37cba00f505</id>
<content type='text'>
[ Upstream commit ae1ae11fb277f1335d6bcd4935ba0ea985af3c32 ]

The move of the module sanity check to earlier skipped the audit logging
call in the case of failure and to a place where the previously used
context is unavailable.

Add an audit logging call for the module loading failure case and get
the module name when possible.

Link: https://issues.redhat.com/browse/RHEL-52839
Fixes: 02da2cbab452 ("module: move check_modinfo() early to early_mod_check()")
Signed-off-by: Richard Guy Briggs &lt;rgb@redhat.com&gt;
Reviewed-by: Petr Pavlu &lt;petr.pavlu@suse.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>sem: Split out sem_types.h</title>
<updated>2023-12-21T00:26:32Z</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2023-12-11T20:52:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e034d49eb01c7c83a08a3ce2a1091b55f806b26b'/>
<id>urn:sha1:e034d49eb01c7c83a08a3ce2a1091b55f806b26b</id>
<content type='text'>
More sched.h dependency pruning.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>netfilter: nf_tables: Audit log rule reset</title>
<updated>2023-08-30T23:29:28Z</updated>
<author>
<name>Phil Sutter</name>
<email>phil@nwl.cc</email>
</author>
<published>2023-08-29T17:51:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ea078ae9108e25fc881c84369f7c03931d22e555'/>
<id>urn:sha1:ea078ae9108e25fc881c84369f7c03931d22e555</id>
<content type='text'>
Resetting rules' stateful data happens outside of the transaction logic,
so 'get' and 'dump' handlers have to emit audit log entries themselves.

Fixes: 8daa8fde3fc3f ("netfilter: nf_tables: Introduce NFT_MSG_GETRULE_RESET")
Signed-off-by: Phil Sutter &lt;phil@nwl.cc&gt;
Reviewed-by: Richard Guy Briggs &lt;rgb@redhat.com&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: nf_tables: Audit log setelem reset</title>
<updated>2023-08-30T23:29:27Z</updated>
<author>
<name>Phil Sutter</name>
<email>phil@nwl.cc</email>
</author>
<published>2023-08-29T17:51:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7e9be1124dbe7888907e82cab20164578e3f9ab7'/>
<id>urn:sha1:7e9be1124dbe7888907e82cab20164578e3f9ab7</id>
<content type='text'>
Since set element reset is not integrated into nf_tables' transaction
logic, an explicit log call is needed, similar to NFT_MSG_GETOBJ_RESET
handling.

For the sake of simplicity, catchall element reset will always generate
a dedicated log entry. This relieves nf_tables_dump_set() from having to
adjust the logged element count depending on whether a catchall element
was found or not.

Fixes: 079cd633219d7 ("netfilter: nf_tables: Introduce NFT_MSG_GETSETELEM_RESET")
Signed-off-by: Phil Sutter &lt;phil@nwl.cc&gt;
Reviewed-by: Richard Guy Briggs &lt;rgb@redhat.com&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>audit: avoid missing-prototype warnings</title>
<updated>2023-05-17T15:34:55Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2023-05-17T13:10:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e455ca40dbcf2cd50d1e59bf4b2752b300bcdad4'/>
<id>urn:sha1:e455ca40dbcf2cd50d1e59bf4b2752b300bcdad4</id>
<content type='text'>
Building with 'make W=1' reveals two function definitions without
a previous prototype in the audit code:

lib/compat_audit.c:32:5: error: no previous prototype for 'audit_classify_compat_syscall' [-Werror=missing-prototypes]
kernel/audit.c:1813:14: error: no previous prototype for 'audit_serial' [-Werror=missing-prototypes]

The first one needs a declaration from linux/audit.h but cannot
include that header without causing conflicting (compat) syscall number
definitions, so move the it into linux/audit_arch.h.

The second one is declared conditionally based on CONFIG_AUDITSYSCALL
but needed as a local function even when that option is disabled, so
move the declaration out of the #ifdef block.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
</content>
</entry>
<entry>
<title>fanotify,audit: Allow audit to use the full permission event response</title>
<updated>2023-02-07T11:53:53Z</updated>
<author>
<name>Richard Guy Briggs</name>
<email>rgb@redhat.com</email>
</author>
<published>2023-02-03T21:35:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=032bffd494e3924cc8b854b696ef9b5b7396b883'/>
<id>urn:sha1:032bffd494e3924cc8b854b696ef9b5b7396b883</id>
<content type='text'>
This patch passes the full response so that the audit function can use all
of it. The audit function was updated to log the additional information in
the AUDIT_FANOTIFY record.

Currently the only type of fanotify info that is defined is an audit
rule number, but convert it to hex encoding to future-proof the field.
Hex encoding suggested by Paul Moore &lt;paul@paul-moore.com&gt;.

The {subj,obj}_trust values are {0,1,2}, corresponding to no, yes, unknown.

Sample records:
  type=FANOTIFY msg=audit(1600385147.372:590): resp=2 fan_type=1 fan_info=3137 subj_trust=3 obj_trust=5
  type=FANOTIFY msg=audit(1659730979.839:284): resp=1 fan_type=0 fan_info=0 subj_trust=2 obj_trust=2

Suggested-by: Steve Grubb &lt;sgrubb@redhat.com&gt;
Link: https://lore.kernel.org/r/3075502.aeNJFYEL58@x2
Tested-by: Steve Grubb &lt;sgrubb@redhat.com&gt;
Acked-by: Steve Grubb &lt;sgrubb@redhat.com&gt;
Signed-off-by: Richard Guy Briggs &lt;rgb@redhat.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Message-Id: &lt;bcb6d552e517b8751ece153e516d8b073459069c.1675373475.git.rgb@redhat.com&gt;
</content>
</entry>
<entry>
<title>fanotify: Ensure consistent variable type for response</title>
<updated>2023-02-07T11:53:32Z</updated>
<author>
<name>Richard Guy Briggs</name>
<email>rgb@redhat.com</email>
</author>
<published>2023-02-03T21:35:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2e0a547164b1384a87fd3500a01297222b0971b0'/>
<id>urn:sha1:2e0a547164b1384a87fd3500a01297222b0971b0</id>
<content type='text'>
The user space API for the response variable is __u32. This patch makes
sure that the whole path through the kernel uses u32 so that there is
no sign extension or truncation of the user space response.

Suggested-by: Steve Grubb &lt;sgrubb@redhat.com&gt;
Link: https://lore.kernel.org/r/12617626.uLZWGnKmhe@x2
Signed-off-by: Richard Guy Briggs &lt;rgb@redhat.com&gt;
Acked-by: Paul Moore &lt;paul@paul-moore.com&gt;
Tested-by: Steve Grubb &lt;sgrubb@redhat.com&gt;
Acked-by: Steve Grubb &lt;sgrubb@redhat.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Message-Id: &lt;3778cb0b3501bc4e686ba7770b20eb9ab0506cf4.1675373475.git.rgb@redhat.com&gt;
</content>
</entry>
<entry>
<title>audit, io_uring, io-wq: Fix memory leak in io_sq_thread() and io_wqe_worker()</title>
<updated>2022-08-04T14:33:54Z</updated>
<author>
<name>Peilin Ye</name>
<email>peilin.ye@bytedance.com</email>
</author>
<published>2022-08-03T22:23:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f482aa98652795846cc55da98ebe331eb74f3d0b'/>
<id>urn:sha1:f482aa98652795846cc55da98ebe331eb74f3d0b</id>
<content type='text'>
Currently @audit_context is allocated twice for io_uring workers:

  1. copy_process() calls audit_alloc();
  2. io_sq_thread() or io_wqe_worker() calls audit_alloc_kernel() (which
     is effectively audit_alloc()) and overwrites @audit_context,
     causing:

  BUG: memory leak
  unreferenced object 0xffff888144547400 (size 1024):
&lt;...&gt;
    hex dump (first 32 bytes):
      00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00  ................
      00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    backtrace:
      [&lt;ffffffff8135cfc3&gt;] audit_alloc+0x133/0x210
      [&lt;ffffffff81239e63&gt;] copy_process+0xcd3/0x2340
      [&lt;ffffffff8123b5f3&gt;] create_io_thread+0x63/0x90
      [&lt;ffffffff81686604&gt;] create_io_worker+0xb4/0x230
      [&lt;ffffffff81686f68&gt;] io_wqe_enqueue+0x248/0x3b0
      [&lt;ffffffff8167663a&gt;] io_queue_iowq+0xba/0x200
      [&lt;ffffffff816768b3&gt;] io_queue_async+0x113/0x180
      [&lt;ffffffff816840df&gt;] io_req_task_submit+0x18f/0x1a0
      [&lt;ffffffff816841cd&gt;] io_apoll_task_func+0xdd/0x120
      [&lt;ffffffff8167d49f&gt;] tctx_task_work+0x11f/0x570
      [&lt;ffffffff81272c4e&gt;] task_work_run+0x7e/0xc0
      [&lt;ffffffff8125a688&gt;] get_signal+0xc18/0xf10
      [&lt;ffffffff8111645b&gt;] arch_do_signal_or_restart+0x2b/0x730
      [&lt;ffffffff812ea44e&gt;] exit_to_user_mode_prepare+0x5e/0x180
      [&lt;ffffffff844ae1b2&gt;] syscall_exit_to_user_mode+0x12/0x20
      [&lt;ffffffff844a7e80&gt;] do_syscall_64+0x40/0x80

Then,

  3. io_sq_thread() or io_wqe_worker() frees @audit_context using
     audit_free();
  4. do_exit() eventually calls audit_free() again, which is okay
     because audit_free() does a NULL check.

As suggested by Paul Moore, fix it by deleting audit_alloc_kernel() and
redundant audit_free() calls.

Fixes: 5bd2182d58e9 ("audit,io_uring,io-wq: add some basic audit support to io_uring")
Suggested-by: Paul Moore &lt;paul@paul-moore.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Peilin Ye &lt;peilin.ye@bytedance.com&gt;
Acked-by: Paul Moore &lt;paul@paul-moore.com&gt;
Link: https://lore.kernel.org/r/20220803222343.31673-1-yepeilin.cs@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>audit: make is_audit_feature_set() static</title>
<updated>2022-06-13T18:08:57Z</updated>
<author>
<name>Xiu Jianfeng</name>
<email>xiujianfeng@huawei.com</email>
</author>
<published>2022-06-11T09:23:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=546093206ba16623c18e344630dbfdd71a4327e0'/>
<id>urn:sha1:546093206ba16623c18e344630dbfdd71a4327e0</id>
<content type='text'>
Currently nobody use is_audit_feature_set() outside this file, so make
it static.

Signed-off-by: Xiu Jianfeng &lt;xiujianfeng@huawei.com&gt;
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
</content>
</entry>
<entry>
<title>audit,io_uring,io-wq: call __audit_uring_exit for dummy contexts</title>
<updated>2022-05-17T19:03:36Z</updated>
<author>
<name>Julian Orth</name>
<email>ju.orth@gmail.com</email>
</author>
<published>2022-05-17T10:32:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=69e9cd66ae1392437234a63a3a1d60b6655f92ef'/>
<id>urn:sha1:69e9cd66ae1392437234a63a3a1d60b6655f92ef</id>
<content type='text'>
Not calling the function for dummy contexts will cause the context to
not be reset. During the next syscall, this will cause an error in
__audit_syscall_entry:

	WARN_ON(context-&gt;context != AUDIT_CTX_UNUSED);
	WARN_ON(context-&gt;name_count);
	if (context-&gt;context != AUDIT_CTX_UNUSED || context-&gt;name_count) {
		audit_panic("unrecoverable error in audit_syscall_entry()");
		return;
	}

These problematic dummy contexts are created via the following call
chain:

       exit_to_user_mode_prepare
    -&gt; arch_do_signal_or_restart
    -&gt; get_signal
    -&gt; task_work_run
    -&gt; tctx_task_work
    -&gt; io_req_task_submit
    -&gt; io_issue_sqe
    -&gt; audit_uring_entry

Cc: stable@vger.kernel.org
Fixes: 5bd2182d58e9 ("audit,io_uring,io-wq: add some basic audit support to io_uring")
Signed-off-by: Julian Orth &lt;ju.orth@gmail.com&gt;
[PM: subject line tweaks]
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
</content>
</entry>
</feed>
