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#1415361, 1415376 ("Out-of-bounds access")
Fixes: e53cfe6c ("apparmor: rework perm mapping to a slightly broader set")
Signed-off-by:  Tyler Hicks <tyhicks@canonical.com>
Acked-by:
Tyler Hicks <tyhicks@canonical.com>
Acked-by:  Serge Hallyn <serge@hallyn.com>
Signed-off-by:
Serge Hallyn <serge@hallyn.com>
Signed-off-by:  John Johansen <john.johansen@canonical.com>
John Johansen <john.johansen@canonical.com>
Loading
Please register or sign in to comment
