]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
security: check for kstrdup() failure in lsm_append()
authorEric Biggers <ebiggers@google.com>
Tue, 17 Jul 2018 17:36:04 +0000 (10:36 -0700)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:49:10 +0000 (19:49 -0600)
commitcf5fe9803edc6fdfc6efb32a6ef1104199376a46
tree17814a7c58cf89c2d95634fb00984c3651ee9323
parent42b09c9704fff0a81f88d52d3fc81cb5e34b0eb3
security: check for kstrdup() failure in lsm_append()

BugLink: https://bugs.launchpad.net/bugs/1836117
[ Upstream commit 87ea58433208d17295e200d56be5e2a4fe4ce7d6 ]

lsm_append() should return -ENOMEM if memory allocation failed.

Fixes: d69dece5f5b6 ("LSM: Add /sys/kernel/security/lsm")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: James Morris <james.morris@microsoft.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
security/security.c