|
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14, v6.14-rc7, v6.14-rc6, v6.14-rc5, v6.14-rc4, v6.14-rc3, v6.14-rc2, v6.14-rc1 |
|
| #
35fcac7a |
| 29-Jan-2025 |
Huacai Chen <[email protected]> |
audit: Initialize lsmctx to avoid memory allocation error
When audit is enabled in a kernel build, and there are no LSMs active that support LSM labeling, it is possible that local variable lsmctx i
audit: Initialize lsmctx to avoid memory allocation error
When audit is enabled in a kernel build, and there are no LSMs active that support LSM labeling, it is possible that local variable lsmctx in the AUDIT_SIGNAL_INFO handler in audit_receive_msg() could be used before it is properly initialize. Then kmalloc() will try to allocate a large amount of memory with the uninitialized length.
This patch corrects this problem by initializing the lsmctx to a safe value when it is declared, which avoid errors like:
WARNING: CPU: 2 PID: 443 at mm/page_alloc.c:4727 __alloc_pages_noprof ... ra: 9000000003059644 ___kmalloc_large_node+0x84/0x1e0 ERA: 900000000304d588 __alloc_pages_noprof+0x4c8/0x1040 CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE) PRMD: 00000004 (PPLV0 +PIE -PWE) EUEN: 00000007 (+FPE +SXE +ASXE -BTE) ECFG: 00071c1d (LIE=0,2-4,10-12 VS=7) ESTAT: 000c0000 [BRK] (IS= ECode=12 EsubCode=0) PRID: 0014c010 (Loongson-64bit, Loongson-3A5000) CPU: 2 UID: 0 PID: 443 Comm: auditd Not tainted 6.13.0-rc1+ #1899 ... Call Trace: [<9000000002def6a8>] show_stack+0x30/0x148 [<9000000002debf58>] dump_stack_lvl+0x68/0xa0 [<9000000002e0fe18>] __warn+0x80/0x108 [<900000000407486c>] report_bug+0x154/0x268 [<90000000040ad468>] do_bp+0x2a8/0x320 [<9000000002dedda0>] handle_bp+0x120/0x1c0 [<900000000304d588>] __alloc_pages_noprof+0x4c8/0x1040 [<9000000003059640>] ___kmalloc_large_node+0x80/0x1e0 [<9000000003061504>] __kmalloc_noprof+0x2c4/0x380 [<9000000002f0f7ac>] audit_receive_msg+0x764/0x1530 [<9000000002f1065c>] audit_receive+0xe4/0x1c0 [<9000000003e5abe8>] netlink_unicast+0x340/0x450 [<9000000003e5ae9c>] netlink_sendmsg+0x1a4/0x4a0 [<9000000003d9ffd0>] __sock_sendmsg+0x48/0x58 [<9000000003da32f0>] __sys_sendto+0x100/0x170 [<9000000003da3374>] sys_sendto+0x14/0x28 [<90000000040ad574>] do_syscall+0x94/0x138 [<9000000002ded318>] handle_syscall+0xb8/0x158
Fixes: 6fba89813ccf333d ("lsm: ensure the correct LSM context releaser") Signed-off-by: Huacai Chen <[email protected]> [PM: resolved excessive line length in the backtrace] Signed-off-by: Paul Moore <[email protected]>
show more ...
|
|
Revision tags: v6.13, v6.13-rc7, v6.13-rc6, v6.13-rc5, v6.13-rc4, v6.13-rc3, v6.13-rc2, v6.13-rc1, v6.12, v6.12-rc7, v6.12-rc6, v6.12-rc5 |
|
| #
2d470c77 |
| 23-Oct-2024 |
Casey Schaufler <[email protected]> |
lsm: replace context+len with lsm_context
Replace the (secctx,seclen) pointer pair with a single lsm_context pointer to allow return of the LSM identifier along with the context and context length.
lsm: replace context+len with lsm_context
Replace the (secctx,seclen) pointer pair with a single lsm_context pointer to allow return of the LSM identifier along with the context and context length. This allows security_release_secctx() to know how to release the context. Callers have been modified to use or save the returned data from the new structure.
security_secid_to_secctx() and security_lsmproc_to_secctx() will now return the length value on success instead of 0.
Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: Todd Kjos <[email protected]> Signed-off-by: Casey Schaufler <[email protected]> [PM: subject tweak, kdoc fix, signedness fix from Dan Carpenter] Signed-off-by: Paul Moore <[email protected]>
show more ...
|
| #
6fba8981 |
| 23-Oct-2024 |
Casey Schaufler <[email protected]> |
lsm: ensure the correct LSM context releaser
Add a new lsm_context data structure to hold all the information about a "security context", including the string, its size and which LSM allocated the s
lsm: ensure the correct LSM context releaser
Add a new lsm_context data structure to hold all the information about a "security context", including the string, its size and which LSM allocated the string. The allocation information is necessary because LSMs have different policies regarding the lifecycle of these strings. SELinux allocates and destroys them on each use, whereas Smack provides a pointer to an entry in a list that never goes away.
Update security_release_secctx() to use the lsm_context instead of a (char *, len) pair. Change its callers to do likewise. The LSMs supporting this hook have had comments added to remind the developer that there is more work to be done.
The BPF security module provides all LSM hooks. While there has yet to be a known instance of a BPF configuration that uses security contexts, the possibility is real. In the existing implementation there is potential for multiple frees in that case.
Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] To: Pablo Neira Ayuso <[email protected]> Cc: [email protected] Cc: Todd Kjos <[email protected]> Signed-off-by: Casey Schaufler <[email protected]> [PM: subject tweak] Signed-off-by: Paul Moore <[email protected]>
show more ...
|
|
Revision tags: v6.12-rc4, v6.12-rc3 |
|
| #
37f670aa |
| 09-Oct-2024 |
Casey Schaufler <[email protected]> |
lsm: use lsm_prop in security_current_getsecid
Change the security_current_getsecid_subj() and security_task_getsecid_obj() interfaces to fill in a lsm_prop structure instead of a u32 secid. Audit
lsm: use lsm_prop in security_current_getsecid
Change the security_current_getsecid_subj() and security_task_getsecid_obj() interfaces to fill in a lsm_prop structure instead of a u32 secid. Audit interfaces will need to collect all possible security data for possible reporting.
Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Casey Schaufler <[email protected]> [PM: subject line tweak] Signed-off-by: Paul Moore <[email protected]>
show more ...
|
| #
e4f68220 |
| 09-Oct-2024 |
Casey Schaufler <[email protected]> |
audit: update shutdown LSM data
The audit process LSM information is changed from a secid audit_sig_sid to an lsm_prop in audit_sig_lsm. Update the users of this data appropriately. Calls to securit
audit: update shutdown LSM data
The audit process LSM information is changed from a secid audit_sig_sid to an lsm_prop in audit_sig_lsm. Update the users of this data appropriately. Calls to security_secid_to_secctx() are changed to use security_lsmprop_to_secctx() instead. security_current_getsecid_subj() is scaffolded. It will be updated in a subsequent patch.
Signed-off-by: Casey Schaufler <[email protected]> [PM: subject line tweak] Signed-off-by: Paul Moore <[email protected]>
show more ...
|
|
Revision tags: v6.12-rc2 |
|
| #
2132b355 |
| 30-Sep-2024 |
Julia Lawall <[email protected]> |
audit: Reorganize kerneldoc parameter names
Reorganize kerneldoc parameter names to match the parameter order in the function header.
Problems identified using Coccinelle.
Signed-off-by: Julia Law
audit: Reorganize kerneldoc parameter names
Reorganize kerneldoc parameter names to match the parameter order in the function header.
Problems identified using Coccinelle.
Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Paul Moore <[email protected]>
show more ...
|
|
Revision tags: v6.12-rc1, v6.11, v6.11-rc7, v6.11-rc6 |
|
| #
8c1867a2 |
| 31-Aug-2024 |
Hongbo Li <[email protected]> |
audit: Make use of str_enabled_disabled() helper
Use str_enabled_disabled() helper instead of open coding the same.
Signed-off-by: Hongbo Li <[email protected]> Signed-off-by: Paul Moore <paul@
audit: Make use of str_enabled_disabled() helper
Use str_enabled_disabled() helper instead of open coding the same.
Signed-off-by: Hongbo Li <[email protected]> Signed-off-by: Paul Moore <[email protected]>
show more ...
|
| #
61c60977 |
| 28-Aug-2024 |
Ricardo Robaina <[email protected]> |
audit: use task_tgid_nr() instead of task_pid_nr()
In a few audit records, PIDs were being recorded with task_pid_nr() instead of task_tgid_nr().
$ grep "task_pid_nr" kernel/audit*.c audit.c:
audit: use task_tgid_nr() instead of task_pid_nr()
In a few audit records, PIDs were being recorded with task_pid_nr() instead of task_tgid_nr().
$ grep "task_pid_nr" kernel/audit*.c audit.c: task_pid_nr(current), auditfilter.c: pid = task_pid_nr(current); auditsc.c: audit_log_format(ab, " pid=%u", task_pid_nr(current));
For single-thread applications, the process id (pid) and the thread group id (tgid) are the same. However, on multi-thread applications, task_pid_nr() returns the current thread id (user-space's TID), while task_tgid_nr() returns the main thread id (user-space's PID). Since the users are more interested in the process id (pid), rather than the thread id (tid), this patch converts these callers to the correct method.
Link: https://github.com/linux-audit/audit-kernel/issues/126
Reviewed-by: Richard Guy Briggs <[email protected]> Signed-off-by: Ricardo Robaina <[email protected]> Signed-off-by: Paul Moore <[email protected]>
show more ...
|
|
Revision tags: v6.11-rc5, v6.11-rc4, v6.11-rc3, v6.11-rc2, v6.11-rc1, v6.10, v6.10-rc7, v6.10-rc6, v6.10-rc5, v6.10-rc4, v6.10-rc3, v6.10-rc2, v6.10-rc1, v6.9, v6.9-rc7, v6.9-rc6, v6.9-rc5, v6.9-rc4, v6.9-rc3, v6.9-rc2, v6.9-rc1, v6.8, v6.8-rc7, v6.8-rc6, v6.8-rc5, v6.8-rc4, v6.8-rc3, v6.8-rc2 |
|
| #
aa13b709 |
| 24-Jan-2024 |
Kunwu Chan <[email protected]> |
audit: use KMEM_CACHE() instead of kmem_cache_create()
Use the new KMEM_CACHE() macro instead of direct kmem_cache_create to simplify the creation of SLAB caches.
Signed-off-by: Kunwu Chan <chentao
audit: use KMEM_CACHE() instead of kmem_cache_create()
Use the new KMEM_CACHE() macro instead of direct kmem_cache_create to simplify the creation of SLAB caches.
Signed-off-by: Kunwu Chan <[email protected]> [PM: subject line tweaks] Signed-off-by: Paul Moore <[email protected]>
show more ...
|
|
Revision tags: v6.8-rc1, v6.7, v6.7-rc8, v6.7-rc7, v6.7-rc6, v6.7-rc5, v6.7-rc4, v6.7-rc3, v6.7-rc2, v6.7-rc1, v6.6, v6.6-rc7 |
|
| #
022732e3 |
| 18-Oct-2023 |
Chris Riches <[email protected]> |
audit: Send netlink ACK before setting connection in auditd_set
When auditd_set sets the auditd_conn pointer, audit messages can immediately be put on the socket by other kernel threads. If the back
audit: Send netlink ACK before setting connection in auditd_set
When auditd_set sets the auditd_conn pointer, audit messages can immediately be put on the socket by other kernel threads. If the backlog is large or the rate is high, this can immediately fill the socket buffer. If the audit daemon requested an ACK for this operation, a full socket buffer causes the ACK to get dropped, also setting ENOBUFS on the socket.
To avoid this race and ensure ACKs get through, fast-track the ACK in this specific case to ensure it is sent before auditd_conn is set.
Signed-off-by: Chris Riches <[email protected]> [PM: fix some tab vs space damage] Signed-off-by: Paul Moore <[email protected]>
show more ...
|
|
Revision tags: v6.6-rc6, v6.6-rc5, v6.6-rc4, v6.6-rc3, v6.6-rc2, v6.6-rc1, v6.5, v6.5-rc7 |
|
| #
b1a0f64c |
| 15-Aug-2023 |
Atul Kumar Pant <[email protected]> |
audit: move trailing statements to next line
Fixes following checkpatch.pl issue: ERROR: trailing statements should be on next line
Signed-off-by: Atul Kumar Pant <[email protected]> [PM: su
audit: move trailing statements to next line
Fixes following checkpatch.pl issue: ERROR: trailing statements should be on next line
Signed-off-by: Atul Kumar Pant <[email protected]> [PM: subject line tweak] Signed-off-by: Paul Moore <[email protected]>
show more ...
|
|
Revision tags: v6.5-rc6, v6.5-rc5, v6.5-rc4, v6.5-rc3 |
|
| #
be4187fa |
| 20-Jul-2023 |
Xiu Jianfeng <[email protected]> |
audit: include security.h unconditionally
The ifdef-else logic is already in the header file, so include it unconditionally, no functional changes here.
Signed-off-by: Xiu Jianfeng <xiujianfeng@hua
audit: include security.h unconditionally
The ifdef-else logic is already in the header file, so include it unconditionally, no functional changes here.
Signed-off-by: Xiu Jianfeng <[email protected]> [PM: fixed misspelling in the subject] Signed-off-by: Paul Moore <[email protected]>
show more ...
|
|
Revision tags: v6.5-rc2, v6.5-rc1, v6.4, v6.4-rc7, v6.4-rc6, v6.4-rc5, v6.4-rc4, v6.4-rc3, v6.4-rc2, v6.4-rc1, v6.3, v6.3-rc7, v6.3-rc6, v6.3-rc5, v6.3-rc4, v6.3-rc3, v6.3-rc2, v6.3-rc1, v6.2, v6.2-rc8, v6.2-rc7, v6.2-rc6, v6.2-rc5, v6.2-rc4, v6.2-rc3, v6.2-rc2, v6.2-rc1, v6.1, v6.1-rc8, v6.1-rc7, v6.1-rc6, v6.1-rc5, v6.1-rc4, v6.1-rc3, v6.1-rc2, v6.1-rc1, v6.0, v6.0-rc7, v6.0-rc6, v6.0-rc5, v6.0-rc4 |
|
| #
501e4bb1 |
| 29-Aug-2022 |
wuchi <[email protected]> |
audit: use time_after to compare time
Using time_{*} macro to compare time is better
Signed-off-by: wuchi <[email protected]> Signed-off-by: Paul Moore <[email protected]>
|
|
Revision tags: v6.0-rc3, v6.0-rc2, v6.0-rc1, v5.19, v5.19-rc8, v5.19-rc7, v5.19-rc6, v5.19-rc5, v5.19-rc4, v5.19-rc3, v5.19-rc2 |
|
| #
54609320 |
| 11-Jun-2022 |
Xiu Jianfeng <[email protected]> |
audit: make is_audit_feature_set() static
Currently nobody use is_audit_feature_set() outside this file, so make it static.
Signed-off-by: Xiu Jianfeng <[email protected]> Signed-off-by: Paul
audit: make is_audit_feature_set() static
Currently nobody use is_audit_feature_set() outside this file, so make it static.
Signed-off-by: Xiu Jianfeng <[email protected]> Signed-off-by: Paul Moore <[email protected]>
show more ...
|
|
Revision tags: v5.19-rc1, v5.18, v5.18-rc7 |
|
| #
5ee6cfdd |
| 15-May-2022 |
Shreenidhi Shedi <[email protected]> |
audit: remove redundant data_len check
data_len is already getting checked if it's less than 2 earlier in this function.
Signed-off-by: Shreenidhi Shedi <[email protected]> Signed-off-by: Paul Moor
audit: remove redundant data_len check
data_len is already getting checked if it's less than 2 earlier in this function.
Signed-off-by: Shreenidhi Shedi <[email protected]> Signed-off-by: Paul Moore <[email protected]>
show more ...
|
|
Revision tags: v5.18-rc6, v5.18-rc5, v5.18-rc4, v5.18-rc3, v5.18-rc2, v5.18-rc1, v5.17, v5.17-rc8, v5.17-rc7, v5.17-rc6, v5.17-rc5, v5.17-rc4, v5.17-rc3, v5.17-rc2, v5.17-rc1 |
|
| #
f26d0433 |
| 13-Jan-2022 |
Paul Moore <[email protected]> |
audit: improve audit queue handling when "audit=1" on cmdline
When an admin enables audit at early boot via the "audit=1" kernel command line the audit queue behavior is slightly different; the audi
audit: improve audit queue handling when "audit=1" on cmdline
When an admin enables audit at early boot via the "audit=1" kernel command line the audit queue behavior is slightly different; the audit subsystem goes to greater lengths to avoid dropping records, which unfortunately can result in problems when the audit daemon is forcibly stopped for an extended period of time.
This patch makes a number of changes designed to improve the audit queuing behavior so that leaving the audit daemon in a stopped state for an extended period does not cause a significant impact to the system.
- kauditd_send_queue() is now limited to looping through the passed queue only once per call. This not only prevents the function from looping indefinitely when records are returned to the current queue, it also allows any recovery handling in kauditd_thread() to take place when kauditd_send_queue() returns.
- Transient netlink send errors seen as -EAGAIN now cause the record to be returned to the retry queue instead of going to the hold queue. The intention of the hold queue is to store, perhaps for an extended period of time, the events which led up to the audit daemon going offline. The retry queue remains a temporary queue intended to protect against transient issues between the kernel and the audit daemon.
- The retry queue is now limited by the audit_backlog_limit setting, the same as the other queues. This allows admins to bound the size of all of the audit queues on the system.
- kauditd_rehold_skb() now returns records to the end of the hold queue to ensure ordering is preserved in the face of recent changes to kauditd_send_queue().
Cc: [email protected] Fixes: 5b52330bbfe63 ("audit: fix auditd/kernel connection state tracking") Fixes: f4b3ee3c85551 ("audit: improve robustness of the audit queue handling") Reported-by: Gaosheng Cui <[email protected]> Tested-by: Gaosheng Cui <[email protected]> Reviewed-by: Richard Guy Briggs <[email protected]> Signed-off-by: Paul Moore <[email protected]>
show more ...
|
|
Revision tags: v5.16, v5.16-rc8, v5.16-rc7, v5.16-rc6 |
|
| #
30561b51 |
| 17-Dec-2021 |
Xiu Jianfeng <[email protected]> |
audit: use struct_size() helper in audit_[send|make]_reply()
Make use of struct_size() helper instead of an open-coded calculation.
Link: https://github.com/KSPP/linux/issues/160 Signed-off-by: Xiu
audit: use struct_size() helper in audit_[send|make]_reply()
Make use of struct_size() helper instead of an open-coded calculation.
Link: https://github.com/KSPP/linux/issues/160 Signed-off-by: Xiu Jianfeng <[email protected]> Signed-off-by: Paul Moore <[email protected]>
show more ...
|
|
Revision tags: v5.16-rc5 |
|
| #
f4b3ee3c |
| 09-Dec-2021 |
Paul Moore <[email protected]> |
audit: improve robustness of the audit queue handling
If the audit daemon were ever to get stuck in a stopped state the kernel's kauditd_thread() could get blocked attempting to send audit records t
audit: improve robustness of the audit queue handling
If the audit daemon were ever to get stuck in a stopped state the kernel's kauditd_thread() could get blocked attempting to send audit records to the userspace audit daemon. With the kernel thread blocked it is possible that the audit queue could grow unbounded as certain audit record generating events must be exempt from the queue limits else the system enter a deadlock state.
This patch resolves this problem by lowering the kernel thread's socket sending timeout from MAX_SCHEDULE_TIMEOUT to HZ/10 and tweaks the kauditd_send_queue() function to better manage the various audit queues when connection problems occur between the kernel and the audit daemon. With this patch, the backlog may temporarily grow beyond the defined limits when the audit daemon is stopped and the system is under heavy audit pressure, but kauditd_thread() will continue to make progress and drain the queues as it would for other connection problems. For example, with the audit daemon put into a stopped state and the system configured to audit every syscall it was still possible to shutdown the system without a kernel panic, deadlock, etc.; granted, the system was slow to shutdown but that is to be expected given the extreme pressure of recording every syscall.
The timeout value of HZ/10 was chosen primarily through experimentation and this developer's "gut feeling". There is likely no one perfect value, but as this scenario is limited in scope (root privileges would be needed to send SIGSTOP to the audit daemon), it is likely not worth exposing this as a tunable at present. This can always be done at a later date if it proves necessary.
Cc: [email protected] Fixes: 5b52330bbfe63 ("audit: fix auditd/kernel connection state tracking") Reported-by: Gaosheng Cui <[email protected]> Tested-by: Gaosheng Cui <[email protected]> Reviewed-by: Richard Guy Briggs <[email protected]> Signed-off-by: Paul Moore <[email protected]>
show more ...
|
| #
8f110f53 |
| 13-Dec-2021 |
Paul Moore <[email protected]> |
audit: ensure userspace is penalized the same as the kernel when under pressure
Due to the audit control mutex necessary for serializing audit userspace messages we haven't been able to block/penali
audit: ensure userspace is penalized the same as the kernel when under pressure
Due to the audit control mutex necessary for serializing audit userspace messages we haven't been able to block/penalize userspace processes that attempt to send audit records while the system is under audit pressure. The result is that privileged userspace applications have a priority boost with respect to audit as they are not bound by the same audit queue throttling as the other tasks on the system.
This patch attempts to restore some balance to the system when under audit pressure by blocking these privileged userspace tasks after they have finished their audit processing, and dropped the audit control mutex, but before they return to userspace.
Reported-by: Gaosheng Cui <[email protected]> Tested-by: Gaosheng Cui <[email protected]> Reviewed-by: Richard Guy Briggs <[email protected]> Signed-off-by: Paul Moore <[email protected]>
show more ...
|
| #
bc6e60a4 |
| 14-Dec-2021 |
Xiu Jianfeng <[email protected]> |
audit: use struct_size() helper in kmalloc()
Make use of struct_size() helper instead of an open-coded calucation.
Link: https://github.com/KSPP/linux/issues/160 Signed-off-by: Xiu Jianfeng <xiujia
audit: use struct_size() helper in kmalloc()
Make use of struct_size() helper instead of an open-coded calucation.
Link: https://github.com/KSPP/linux/issues/160 Signed-off-by: Xiu Jianfeng <[email protected]> Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Paul Moore <[email protected]>
show more ...
|
|
Revision tags: v5.16-rc4, v5.16-rc3, v5.16-rc2, v5.16-rc1, v5.15, v5.15-rc7, v5.15-rc6, v5.15-rc5, v5.15-rc4 |
|
| #
6326948f |
| 29-Sep-2021 |
Paul Moore <[email protected]> |
lsm: security_task_getsecid_subj() -> security_current_getsecid_subj()
The security_task_getsecid_subj() LSM hook invites misuse by allowing callers to specify a task even though the hook is only sa
lsm: security_task_getsecid_subj() -> security_current_getsecid_subj()
The security_task_getsecid_subj() LSM hook invites misuse by allowing callers to specify a task even though the hook is only safe when the current task is referenced. Fix this by removing the task_struct argument to the hook, requiring LSM implementations to use the current task. While we are changing the hook declaration we also rename the function to security_current_getsecid_subj() in an effort to reinforce that the hook captures the subjective credentials of the current task and not an arbitrary task on the system.
Reviewed-by: Serge Hallyn <[email protected]> Reviewed-by: Casey Schaufler <[email protected]> Signed-off-by: Paul Moore <[email protected]>
show more ...
|
|
Revision tags: v5.15-rc3, v5.15-rc2, v5.15-rc1, v5.14, v5.14-rc7, v5.14-rc6, v5.14-rc5, v5.14-rc4, v5.14-rc3, v5.14-rc2, v5.14-rc1, v5.13, v5.13-rc7, v5.13-rc6, v5.13-rc5, v5.13-rc4, v5.13-rc3, v5.13-rc2, v5.13-rc1, v5.12, v5.12-rc8, v5.12-rc7, v5.12-rc6, v5.12-rc5, v5.12-rc4, v5.12-rc3, v5.12-rc2, v5.12-rc1, v5.12-rc1-dontuse |
|
| #
4ebd7651 |
| 19-Feb-2021 |
Paul Moore <[email protected]> |
lsm: separate security_task_getsecid() into subjective and objective variants
Of the three LSMs that implement the security_task_getsecid() LSM hook, all three LSMs provide the task's objective secu
lsm: separate security_task_getsecid() into subjective and objective variants
Of the three LSMs that implement the security_task_getsecid() LSM hook, all three LSMs provide the task's objective security credentials. This turns out to be unfortunate as most of the hook's callers seem to expect the task's subjective credentials, although a small handful of callers do correctly expect the objective credentials.
This patch is the first step towards fixing the problem: it splits the existing security_task_getsecid() hook into two variants, one for the subjective creds, one for the objective creds.
void security_task_getsecid_subj(struct task_struct *p, u32 *secid); void security_task_getsecid_obj(struct task_struct *p, u32 *secid);
While this patch does fix all of the callers to use the correct variant, in order to keep this patch focused on the callers and to ease review, the LSMs continue to use the same implementation for both hooks. The net effect is that this patch should not change the behavior of the kernel in any way, it will be up to the latter LSM specific patches in this series to change the hook implementations and return the correct credentials.
Acked-by: Mimi Zohar <[email protected]> (IMA) Acked-by: Casey Schaufler <[email protected]> Reviewed-by: Richard Guy Briggs <[email protected]> Signed-off-by: Paul Moore <[email protected]>
show more ...
|
|
Revision tags: v5.11, v5.11-rc7, v5.11-rc6, v5.11-rc5, v5.11-rc4 |
|
| #
c1de4463 |
| 15-Jan-2021 |
Davidlohr Bueso <[email protected]> |
audit: Remove leftover reference to the audit_tasklet
This was replaced with a kauditd_wait kthread long ago, back in:
b7d1125817c (AUDIT: Send netlink messages from a separate kernel thread)
audit: Remove leftover reference to the audit_tasklet
This was replaced with a kauditd_wait kthread long ago, back in:
b7d1125817c (AUDIT: Send netlink messages from a separate kernel thread)
Update the stale comment.
Signed-off-by: Davidlohr Bueso <[email protected]> Signed-off-by: Paul Moore <[email protected]>
show more ...
|
|
Revision tags: v5.11-rc3, v5.11-rc2, v5.11-rc1, v5.10 |
|
| #
a1b861fa |
| 11-Dec-2020 |
Zheng Yongjun <[email protected]> |
kernel/audit: convert comma to semicolon
Replace a comma between expression statements by a semicolon.
Signed-off-by: Zheng Yongjun <[email protected]> Reviewed-by: Richard Guy Briggs <rgb@r
kernel/audit: convert comma to semicolon
Replace a comma between expression statements by a semicolon.
Signed-off-by: Zheng Yongjun <[email protected]> Reviewed-by: Richard Guy Briggs <[email protected]> Signed-off-by: Paul Moore <[email protected]>
show more ...
|
|
Revision tags: v5.10-rc7 |
|
| #
6b321184 |
| 30-Nov-2020 |
Yejune Deng <[email protected]> |
audit: replace atomic_add_return()
atomic_inc_return() is a little neater
Signed-off-by: Yejune Deng <[email protected]> Signed-off-by: Paul Moore <[email protected]>
|