mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
lsm/stable-6.5 PR 20230626
-----BEGIN PGP SIGNATURE----- iQJIBAABCAAyFiEES0KozwfymdVUl37v6iDy2pc3iXMFAmSZuh0UHHBhdWxAcGF1 bC1tb29yZS5jb20ACgkQ6iDy2pc3iXNpuxAAxChGqME9nE7iITx1TaFRrbK49mDF 1RZh/5cwzde72lLLFkTFKB6ErMSQkrrtA+jFH7vKsrOslBel1+yO80vkXmhYCeZU P3m0FeREUpuU4QV0tbQamPeR+SWohmKi2dYWd+VdpLA+1aTK3KNYsi2NFkDIreap BqeRq4S0Rqc4u3/5juk6JCGFhTRWaH16YJQrzIKHF/K3DK+gMhAY5sjuAWzFc6ma /5bbD55kdVVDfnsxNSe+lzJ7zEf7TYedLG6BN+R9cVrU+El12a38M29kASaAof5w vpb92a27hA9Q5EyQ2O9QXnr2L5CShT4bvAZCGkK4cmZerGNTdM0iojhYj1s7FAV/ USkWgkDmEuSatp0+DdXlfQyUmZZWlw1W0oiEfZwR8w7TY7q9CU7aD8K7+GDSIazB g89nYznVjlaC/oA4/owMraoWP3eiDiAcsQdO052Vv63TVyJtTiRiKyBq5EFLrX8L iaUCa4cBaYFc94kN1PZeNXZKwqRc2F6oAFT1YuXnFWBGmixN0kUL023C0xjl/J7P 02jYYSVzLm22aU39GU0DSnaLfAwl3muazOB3XuyGOhUWHFYzjkc9UhmGp0W50DkK qigW3ONA8s8CKUS/q7QSGq+Vf+CVZA5f+daDDPGYstPfCTk61eu0wjwfwek3W0o+ xKzBr2Od3vTOzAs= =3nWy -----END PGP SIGNATURE----- Merge tag 'lsm-pr-20230626' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm Pull lsm updates from Paul Moore: - A SafeSetID patch to correct what appears to be a cut-n-paste typo in the code causing a UID to be printed where a GID was desired. This is coming via the LSM tree because we haven't been able to get a response from the SafeSetID maintainer (Micah Morton) in several months. Hopefully we are able to get in touch with Micah, but until we do I'm going to pick them up in the LSM tree. - A small fix to the reiserfs LSM xattr code. We're continuing to work through some issues with the reiserfs code as we try to fixup the LSM xattr handling, but in the process we're uncovering some ugly problems in reiserfs and we may just end up removing the LSM xattr support in reiserfs prior to reiserfs' removal. For better or worse, this shouldn't impact any of the reiserfs users, as we discovered that LSM xattrs on reiserfs were completely broken, meaning no one is currently using the combo of reiserfs and a file labeling LSM. - A tweak to how the cap_user_data_t struct/typedef is declared in the header file to appease the Sparse gods. - In the process of trying to sort out the SafeSetID lost-maintainer problem I realized that I needed to update the labeled networking entry to "Supported". - Minor comment/documentation and spelling fixes. * tag 'lsm-pr-20230626' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm: device_cgroup: Fix kernel-doc warnings in device_cgroup SafeSetID: fix UID printed instead of GID MAINTAINERS: move labeled networking to "supported" capability: erase checker warnings about struct __user_cap_data_struct lsm: fix a number of misspellings reiserfs: Initialize sec->length in reiserfs_security_init(). capability: fix kernel-doc warnings in capability.c
This commit is contained in:
commit
21953eb16c
@ -14727,7 +14727,7 @@ NETWORKING [LABELED] (NetLabel, Labeled IPsec, SECMARK)
|
||||
M: Paul Moore <paul@paul-moore.com>
|
||||
L: netdev@vger.kernel.org
|
||||
L: linux-security-module@vger.kernel.org
|
||||
S: Maintained
|
||||
S: Supported
|
||||
W: https://github.com/netlabel
|
||||
F: Documentation/netlabel/
|
||||
F: include/net/calipso.h
|
||||
|
@ -67,6 +67,7 @@ int reiserfs_security_init(struct inode *dir, struct inode *inode,
|
||||
|
||||
sec->name = NULL;
|
||||
sec->value = NULL;
|
||||
sec->length = 0;
|
||||
|
||||
/* Don't add selinux attributes on xattrs - they'll never get used */
|
||||
if (IS_PRIVATE(dir))
|
||||
|
@ -41,11 +41,12 @@ typedef struct __user_cap_header_struct {
|
||||
int pid;
|
||||
} __user *cap_user_header_t;
|
||||
|
||||
typedef struct __user_cap_data_struct {
|
||||
struct __user_cap_data_struct {
|
||||
__u32 effective;
|
||||
__u32 permitted;
|
||||
__u32 inheritable;
|
||||
} __user *cap_user_data_t;
|
||||
};
|
||||
typedef struct __user_cap_data_struct __user *cap_user_data_t;
|
||||
|
||||
|
||||
#define VFS_CAP_REVISION_MASK 0xFF000000
|
||||
|
@ -467,6 +467,7 @@ EXPORT_SYMBOL(file_ns_capable);
|
||||
/**
|
||||
* privileged_wrt_inode_uidgid - Do capabilities in the namespace work over the inode?
|
||||
* @ns: The user namespace in question
|
||||
* @idmap: idmap of the mount @inode was found from
|
||||
* @inode: The inode in question
|
||||
*
|
||||
* Return true if the inode uid and gid are within the namespace.
|
||||
@ -481,6 +482,7 @@ bool privileged_wrt_inode_uidgid(struct user_namespace *ns,
|
||||
|
||||
/**
|
||||
* capable_wrt_inode_uidgid - Check nsown_capable and uid and gid mapped
|
||||
* @idmap: idmap of the mount @inode was found from
|
||||
* @inode: The inode in question
|
||||
* @cap: The capability in question
|
||||
*
|
||||
|
@ -314,7 +314,7 @@ int cap_inode_need_killpriv(struct dentry *dentry)
|
||||
* the vfsmount must be passed through @idmap. This function will then
|
||||
* take care to map the inode according to @idmap before checking
|
||||
* permissions. On non-idmapped mounts or if permission checking is to be
|
||||
* performed on the raw inode simply passs @nop_mnt_idmap.
|
||||
* performed on the raw inode simply pass @nop_mnt_idmap.
|
||||
*
|
||||
* Return: 0 if successful, -ve on error.
|
||||
*/
|
||||
@ -522,7 +522,7 @@ static bool validheader(size_t size, const struct vfs_cap_data *cap)
|
||||
* the vfsmount must be passed through @idmap. This function will then
|
||||
* take care to map the inode according to @idmap before checking
|
||||
* permissions. On non-idmapped mounts or if permission checking is to be
|
||||
* performed on the raw inode simply passs @nop_mnt_idmap.
|
||||
* performed on the raw inode simply pass @nop_mnt_idmap.
|
||||
*
|
||||
* Return: On success, return the new size; on error, return < 0.
|
||||
*/
|
||||
@ -630,7 +630,7 @@ static inline int bprm_caps_from_vfs_caps(struct cpu_vfs_cap_data *caps,
|
||||
* the vfsmount must be passed through @idmap. This function will then
|
||||
* take care to map the inode according to @idmap before checking
|
||||
* permissions. On non-idmapped mounts or if permission checking is to be
|
||||
* performed on the raw inode simply passs @nop_mnt_idmap.
|
||||
* performed on the raw inode simply pass @nop_mnt_idmap.
|
||||
*/
|
||||
int get_vfs_caps_from_disk(struct mnt_idmap *idmap,
|
||||
const struct dentry *dentry,
|
||||
@ -1133,7 +1133,7 @@ int cap_task_fix_setuid(struct cred *new, const struct cred *old, int flags)
|
||||
break;
|
||||
|
||||
case LSM_SETID_FS:
|
||||
/* juggle the capabilties to follow FSUID changes, unless
|
||||
/* juggle the capabilities to follow FSUID changes, unless
|
||||
* otherwise suppressed
|
||||
*
|
||||
* FIXME - is fsuser used for all CAP_FS_MASK capabilities?
|
||||
@ -1184,10 +1184,10 @@ static int cap_safe_nice(struct task_struct *p)
|
||||
}
|
||||
|
||||
/**
|
||||
* cap_task_setscheduler - Detemine if scheduler policy change is permitted
|
||||
* cap_task_setscheduler - Determine if scheduler policy change is permitted
|
||||
* @p: The task to affect
|
||||
*
|
||||
* Detemine if the requested scheduler policy change is permitted for the
|
||||
* Determine if the requested scheduler policy change is permitted for the
|
||||
* specified task.
|
||||
*
|
||||
* Return: 0 if permission is granted, -ve if denied.
|
||||
@ -1198,11 +1198,11 @@ int cap_task_setscheduler(struct task_struct *p)
|
||||
}
|
||||
|
||||
/**
|
||||
* cap_task_setioprio - Detemine if I/O priority change is permitted
|
||||
* cap_task_setioprio - Determine if I/O priority change is permitted
|
||||
* @p: The task to affect
|
||||
* @ioprio: The I/O priority to set
|
||||
*
|
||||
* Detemine if the requested I/O priority change is permitted for the specified
|
||||
* Determine if the requested I/O priority change is permitted for the specified
|
||||
* task.
|
||||
*
|
||||
* Return: 0 if permission is granted, -ve if denied.
|
||||
@ -1213,11 +1213,11 @@ int cap_task_setioprio(struct task_struct *p, int ioprio)
|
||||
}
|
||||
|
||||
/**
|
||||
* cap_task_setnice - Detemine if task priority change is permitted
|
||||
* cap_task_setnice - Determine if task priority change is permitted
|
||||
* @p: The task to affect
|
||||
* @nice: The nice value to set
|
||||
*
|
||||
* Detemine if the requested task priority change is permitted for the
|
||||
* Determine if the requested task priority change is permitted for the
|
||||
* specified task.
|
||||
*
|
||||
* Return: 0 if permission is granted, -ve if denied.
|
||||
|
@ -421,7 +421,7 @@ static bool verify_new_ex(struct dev_cgroup *dev_cgroup,
|
||||
} else {
|
||||
/*
|
||||
* new exception in the child will add more devices
|
||||
* that can be acessed, so it can't match any of
|
||||
* that can be accessed, so it can't match any of
|
||||
* parent's exceptions, even slightly
|
||||
*/
|
||||
match = match_exception_partial(&dev_cgroup->exceptions,
|
||||
@ -822,7 +822,6 @@ struct cgroup_subsys devices_cgrp_subsys = {
|
||||
|
||||
/**
|
||||
* devcgroup_legacy_check_permission - checks if an inode operation is permitted
|
||||
* @dev_cgroup: the dev cgroup to be tested against
|
||||
* @type: device type
|
||||
* @major: device major number
|
||||
* @minor: device minor number
|
||||
|
@ -200,7 +200,7 @@ static void dump_common_audit_data(struct audit_buffer *ab,
|
||||
char comm[sizeof(current->comm)];
|
||||
|
||||
/*
|
||||
* To keep stack sizes in check force programers to notice if they
|
||||
* To keep stack sizes in check force programmers to notice if they
|
||||
* start making this union too large! See struct lsm_network_audit
|
||||
* as an example of how to deal with large data.
|
||||
*/
|
||||
|
@ -131,7 +131,7 @@ static int safesetid_security_capable(const struct cred *cred,
|
||||
* set*gid() (e.g. setting up userns gid mappings).
|
||||
*/
|
||||
pr_warn("Operation requires CAP_SETGID, which is not available to GID %u for operations besides approved set*gid transitions\n",
|
||||
__kuid_val(cred->uid));
|
||||
__kgid_val(cred->gid));
|
||||
return -EPERM;
|
||||
default:
|
||||
/* Error, the only capabilities were checking for is CAP_SETUID/GID */
|
||||
|
@ -2491,7 +2491,7 @@ int security_inode_copy_up_xattr(const char *name)
|
||||
/*
|
||||
* The implementation can return 0 (accept the xattr), 1 (discard the
|
||||
* xattr), -EOPNOTSUPP if it does not know anything about the xattr or
|
||||
* any other error code incase of an error.
|
||||
* any other error code in case of an error.
|
||||
*/
|
||||
hlist_for_each_entry(hp,
|
||||
&security_hook_heads.inode_copy_up_xattr, list) {
|
||||
@ -4693,7 +4693,7 @@ int security_mptcp_add_subflow(struct sock *sk, struct sock *ssk)
|
||||
* @subnet_prefix: subnet prefix of the port
|
||||
* @pkey: IB pkey
|
||||
*
|
||||
* Check permission to access a pkey when modifing a QP.
|
||||
* Check permission to access a pkey when modifying a QP.
|
||||
*
|
||||
* Return: Returns 0 if permission is granted.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user