diff options
author | Ondrej Mosnacek <omosnace@redhat.com> | 2021-04-02 10:56:18 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-04-14 08:41:57 +0200 |
commit | 4f29b08e238fdd2ed8cbbd4fa2d4ab51b0ddef1f (patch) | |
tree | c980df0c852c65d02d1d8c82f18256b595fe9218 /security/selinux/ss/conditional.c | |
parent | a12a2fa9a129d3200065fde95f6eb0a98672a2c3 (diff) | |
download | kernel_replicant_linux-4f29b08e238fdd2ed8cbbd4fa2d4ab51b0ddef1f.tar.gz kernel_replicant_linux-4f29b08e238fdd2ed8cbbd4fa2d4ab51b0ddef1f.tar.bz2 kernel_replicant_linux-4f29b08e238fdd2ed8cbbd4fa2d4ab51b0ddef1f.zip |
selinux: make nslot handling in avtab more robust
commit 442dc00f82a9727dc0c48c44f792c168f593c6df upstream.
1. Make sure all fileds are initialized in avtab_init().
2. Slightly refactor avtab_alloc() to use the above fact.
3. Use h->nslot == 0 as a sentinel in the access functions to prevent
dereferencing h->htable when it's not allocated.
Cc: stable@vger.kernel.org
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'security/selinux/ss/conditional.c')
0 files changed, 0 insertions, 0 deletions