Skip to content

Commit e4311f7

Browse files
committed
Merge tag 'selinux-pr-20230821' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux
Pull selinux fix from Paul Moore: "A small fix for a potential problem when cleaning up after a failed SELinux policy load (list next pointer not being properly initialized to NULL early enough)" * tag 'selinux-pr-20230821' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: set next pointer before attaching to list
2 parents f775712 + 70d91dc commit e4311f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

security/selinux/ss/policydb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2005,6 +2005,7 @@ static int filename_trans_read_helper(struct policydb *p, void *fp)
20052005
if (!datum)
20062006
goto out;
20072007

2008+
datum->next = NULL;
20082009
*dst = datum;
20092010

20102011
/* ebitmap_read() will at least init the bitmap */
@@ -2017,7 +2018,6 @@ static int filename_trans_read_helper(struct policydb *p, void *fp)
20172018
goto out;
20182019

20192020
datum->otype = le32_to_cpu(buf[0]);
2020-
datum->next = NULL;
20212021

20222022
dst = &datum->next;
20232023
}

0 commit comments

Comments
 (0)