Re: [PATCH] selinux: keep context struct members in sync

From: Paul Moore
Date: Thu May 18 2023 - 13:39:29 EST


On May 11, 2023 =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@xxxxxxxxxxxxxx> wrote:
>
> Commit 53f3517ae087 ("selinux: do not leave dangling pointer behind")
> reset the `str` field of the `context` struct in an OOM error branch.
> In this struct the fields `str` and `len` are coupled and should be kept
> in sync. Set the length to zero according to the string be set to NULL.
>
> Fixes: 53f3517ae087 ("selinux: do not leave dangling pointer behind")
> Signed-off-by: Christian Göttsche <cgzones@xxxxxxxxxxxxxx>
> ---
> security/selinux/ss/context.h | 1 +
> 1 file changed, 1 insertion(+)

Merged into selinux/next, thanks.

--
paul-moore.com