Merge tag 'lsm-pr-20240227' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm
Pull lsm fixes from Paul Moore: "Two small patches, one for AppArmor and one for SELinux, to fix potential uninitialized variable problems in the new LSM syscalls we added during the v6.8 merge window. We haven't been able to get a response from John on the AppArmor patch, but considering both the importance of the patch and it's rather simple nature it seems like a good idea to get this merged sooner rather than later. I'm sure John is just taking some much needed vacation; if we need to revise this when he gets back to his email we can" * tag 'lsm-pr-20240227' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm: apparmor: fix lsm_get_self_attr() selinux: fix lsm_get_self_attr()
This commit is contained in:
@@ -784,7 +784,7 @@ static int apparmor_getselfattr(unsigned int attr, struct lsm_ctx __user *lx,
|
||||
int error = -ENOENT;
|
||||
struct aa_task_ctx *ctx = task_ctx(current);
|
||||
struct aa_label *label = NULL;
|
||||
char *value;
|
||||
char *value = NULL;
|
||||
|
||||
switch (attr) {
|
||||
case LSM_ATTR_CURRENT:
|
||||
|
||||
@@ -6559,7 +6559,7 @@ static int selinux_getselfattr(unsigned int attr, struct lsm_ctx __user *ctx,
|
||||
size_t *size, u32 flags)
|
||||
{
|
||||
int rc;
|
||||
char *val;
|
||||
char *val = NULL;
|
||||
int val_len;
|
||||
|
||||
val_len = selinux_lsm_getattr(attr, current, &val);
|
||||
|
||||
Reference in New Issue
Block a user