SELinux: check seqno when updating an avc_node
authorEric Paris <eparis@redhat.com>
Thu, 12 Feb 2009 19:50:11 +0000 (14:50 -0500)
committerJames Morris <jmorris@namei.org>
Fri, 13 Feb 2009 22:22:34 +0000 (09:22 +1100)
commita5dda683328f99c781f92c66cc52ffc0639bef58
tree2432f51e505fd9242f7081d5bf4e21ff322b73d6
parent4cb912f1d1447077160ace9ce3b3a10696dd74e5
SELinux: check seqno when updating an avc_node

The avc update node callbacks do not check the seqno of the caller with the
seqno of the node found.  It is possible that a policy change could happen
(although almost impossibly unlikely) in which a permissive or
permissive_domain decision is not valid for the entry found.  Simply pass
and check that the seqno of the caller and the seqno of the node found
match.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
security/selinux/avc.c