diff options
author | Jann Horn <jannh@google.com> | 2019-05-28 17:32:26 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-06-25 11:36:51 +0800 |
commit | 4758984fa3ba0b1ac39687750e74ca0350ada753 (patch) | |
tree | aa508999ef986b14bc06de846ca5a0018932fddd /scripts/gcc-plugins/randomize_layout_plugin.c | |
parent | fadee027bf8fa90f3057a98a89871cbe8dd4adf5 (diff) |
apparmor: enforce nullbyte at end of tag string
commit 8404d7a674c49278607d19726e0acc0cae299357 upstream.
A packed AppArmor policy contains null-terminated tag strings that are read
by unpack_nameX(). However, unpack_nameX() uses string functions on them
without ensuring that they are actually null-terminated, potentially
leading to out-of-bounds accesses.
Make sure that the tag string is null-terminated before passing it to
strcmp().
Cc: stable@vger.kernel.org
Fixes: 736ec752d95e ("AppArmor: policy routines for loading and unpacking policy")
Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/gcc-plugins/randomize_layout_plugin.c')
0 files changed, 0 insertions, 0 deletions