]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
UBUNTU: SAUCE: LSM stacking: check for invalid zero sized writes
authorColin Ian King <colin.king@canonical.com>
Tue, 3 Oct 2017 12:12:54 +0000 (13:12 +0100)
committerSeth Forshee <seth.forshee@canonical.com>
Tue, 3 Oct 2017 17:56:02 +0000 (12:56 -0500)
commite183fecae51e46444069cc5892a81683a23feeb3
tree0ef13bac96e72e27a0684dfd9ecca1c7c783db92
parentf058b66dcff28ae13c16f578a8b6c99a31ebdd57
UBUNTU: SAUCE: LSM stacking: check for invalid zero sized writes

BugLink: http://bugs.launchpad.net/bugs/1720779
Writing zero bytes to /proc/$pid/task/$pid/attr/context via
security_setprocattr cause an oops in memcpy_erms. Fix this by
checking for zero size and returning -EINVAL for this invalid
write size.

Detected by running stress-ng --procfs 0

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
security/security.c