[PATCH v3] selinux: Fix error priority for bind with AF_UNSPEC on PF_INET6 socket

Paul Moore paul at paul-moore.com
Thu Jan 4 21:57:11 UTC 2024


On Thu, Jan 4, 2024 at 6:40 AM Muhammad Usama Anjum
<usama.anjum at collabora.com> wrote:
>
> On 1/3/24 9:34 PM, Mickaël Salaün wrote:
> > The IPv6 network stack first checks the sockaddr length (-EINVAL error)
> > before checking the family (-EAFNOSUPPORT error).
> >
> > This was discovered thanks to commit a549d055a22e ("selftests/landlock:
> > Add network tests").
> >
> > Cc: Eric Paris <eparis at parisplace.org>
> > Cc: Konstantin Meskhidze <konstantin.meskhidze at huawei.com>
> > Cc: Paul Moore <paul at paul-moore.com>
> > Cc: Stephen Smalley <stephen.smalley.work at gmail.com>
> > Reported-by: Muhammad Usama Anjum <usama.anjum at collabora.com>
> > Closes: https://lore.kernel.org/r/0584f91c-537c-4188-9e4f-04f192565667@collabora.com
> > Fixes: 0f8db8cc73df ("selinux: add AF_UNSPEC and INADDR_ANY checks to selinux_socket_bind()")
> > Signed-off-by: Mickaël Salaün <mic at digikod.net>
> Thank you Mickaël for the patch. Tested patch on v6.7-rc8.
>
> Tested-by: Muhammad Usama Anjum <usama.anjum at collabora.com>

This looks good to me, and since it is rather trivial I'm going to go
ahead and merge this into selinux/next so it should go up to Linus
during the upcoming merge window.

Thanks everyone!

-- 
paul-moore.com



More information about the Linux-security-module-archive mailing list