]> git.proxmox.com Git - mirror_ubuntu-bionic-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, 10 Apr 2018 18:06:24 +0000 (13:06 -0500)
commit36788bfe15f16b2eba39d0e563ae8027c5072b98
tree7f4f550a709d44e552c29a03c95e2d1240113a36
parentf14e289850b3f585e4bfc3178a091c7259bd7fc0
UBUNTU: SAUCE: LSM stacking: check for invalid zero sized writes

BugLink: http://bugs.launchpad.net/bugs/1720779
BugLink: http://bugs.launchpad.net/bugs/1763062
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