Skip to content

Commit cf11829

Browse files
committed
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()
2 parents 5e10bf6 + 6d2fb47 commit cf11829

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

security/apparmor/lsm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ static int apparmor_getselfattr(unsigned int attr, struct lsm_ctx __user *lx,
784784
int error = -ENOENT;
785785
struct aa_task_ctx *ctx = task_ctx(current);
786786
struct aa_label *label = NULL;
787-
char *value;
787+
char *value = NULL;
788788

789789
switch (attr) {
790790
case LSM_ATTR_CURRENT:

security/selinux/hooks.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6559,7 +6559,7 @@ static int selinux_getselfattr(unsigned int attr, struct lsm_ctx __user *ctx,
65596559
size_t *size, u32 flags)
65606560
{
65616561
int rc;
6562-
char *val;
6562+
char *val = NULL;
65636563
int val_len;
65646564

65656565
val_len = selinux_lsm_getattr(attr, current, &val);

0 commit comments

Comments
 (0)