diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-07-29 08:30:04 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-07-29 08:30:04 +0200 |
commit | 2a0f4f16d20127ae0c3f0a3f0190dbbb4d286ba7 (patch) | |
tree | 60ad34da8aa2a054d8b562cbac9d06d37c52d5cc /security/selinux/ss/sidtab.c | |
parent | 6389a62ff798e781567645c0b0ca3dd7b8a4289d (diff) | |
parent | 609488bc979f99f805f34e9a32c1e3b71179d10b (diff) |
Merge 5.3-rc2 into usb-next
We need the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'security/selinux/ss/sidtab.c')
-rw-r--r-- | security/selinux/ss/sidtab.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/security/selinux/ss/sidtab.c b/security/selinux/ss/sidtab.c index e63a90ff2728..1f0a6eaa2d6a 100644 --- a/security/selinux/ss/sidtab.c +++ b/security/selinux/ss/sidtab.c @@ -286,6 +286,11 @@ static int sidtab_reverse_lookup(struct sidtab *s, struct context *context, ++count; } + /* bail out if we already reached max entries */ + rc = -EOVERFLOW; + if (count >= SIDTAB_MAX) + goto out_unlock; + /* insert context into new entry */ rc = -ENOMEM; dst = sidtab_do_lookup(s, count, 1); |