]> git.baikalelectronics.ru Git - kernel.git/commit
apparmor: Check buffer bounds when mapping permissions mask
authorTyler Hicks <tyhicks@canonical.com>
Fri, 6 Jul 2018 05:25:00 +0000 (05:25 +0000)
committerJohn Johansen <john.johansen@canonical.com>
Thu, 19 Jul 2018 23:24:43 +0000 (16:24 -0700)
commit09415da9597e3974381e862e835c07a7c67b21cc
tree51d693e57cc5734aee692b1cebab08acd1aab511
parentd10afffbe48dc3a66831ae016a02402498c85dbf
apparmor: Check buffer bounds when mapping permissions mask

Don't read past the end of the buffer containing permissions
characters or write past the end of the destination string.

Detected by CoverityScan CID#14153611415376 ("Out-of-bounds access")

Fixes: 29df5ea0427d ("apparmor: rework perm mapping to a slightly broader set")
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/file.c
security/apparmor/include/perms.h
security/apparmor/lib.c