[PATCH] device_cgroup: Roll back to original exceptions after copy failure
Paul Moore
paul at paul-moore.com
Wed Nov 16 23:33:53 UTC 2022
On Tue, Oct 25, 2022 at 7:02 AM Wang Weiyang <wangweiyang2 at huawei.com> wrote:
>
> When add the 'a *:* rwm' entry to devcgroup A's whitelist, at first A's
> exceptions will be cleaned and A's behavior is changed to
> DEVCG_DEFAULT_ALLOW. Then parent's exceptions will be copyed to A's
> whitelist. If copy failure occurs, just return leaving A to grant
> permissions to all devices. And A may grant more permissions than
> parent.
>
> Backup A's whitelist and recover original exceptions after copy
> failure.
>
> Fixes: 4cef7299b478 ("device_cgroup: add proper checking when changing default behavior")
> Signed-off-by: Wang Weiyang <wangweiyang2 at huawei.com>
> ---
> security/device_cgroup.c | 33 +++++++++++++++++++++++++++++----
> 1 file changed, 29 insertions(+), 4 deletions(-)
Merged into lsm/next, but with a stable at vger tag. Normally I would
merge something like this into lsm/stable-X.Y and send it up to Linus
after a few days, but I'd really like this to spend some time in
linux-next before going up to Linus.
--
paul-moore.com
More information about the Linux-security-module-archive
mailing list