[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHC9VhSf72zUZpcDUYU01B9w789ydbsj5ZYoByyySpZamk=Bng@mail.gmail.com>
Date: Fri, 10 Mar 2017 15:28:27 -0500
From: Paul Moore <paul@...l-moore.com>
To: glider@...gle.com
Cc: David Miller <davem@...emloft.net>,
Stephen Smalley <sds@...ho.nsa.gov>, dvyukov@...gle.com,
kcc@...gle.com, keescook@...omium.org, edumazet@...gle.com,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
selinux@...ho.nsa.gov
Subject: Re: [PATCH v2] selinux: check for address length in selinux_socket_bind()
On Fri, Mar 10, 2017 at 7:01 AM, Paul Moore <paul@...l-moore.com> wrote:
> On Thu, Mar 9, 2017 at 2:12 AM, David Miller <davem@...emloft.net> wrote:
>> From: Alexander Potapenko <glider@...gle.com>
>> Date: Mon, 6 Mar 2017 19:46:14 +0100
>>
>>> KMSAN (KernelMemorySanitizer, a new error detection tool) reports use of
>>> uninitialized memory in selinux_socket_bind():
>> ...
>>> (the line numbers are relative to 4.8-rc6, but the bug persists upstream)
>>>
>>> , when I run the following program as root:
>> ...
>>> (for different values of |size| other error reports are printed).
>>>
>>> This happens because bind() unconditionally copies |size| bytes of
>>> |addr| to the kernel, leaving the rest uninitialized. Then
>>> security_socket_bind() reads the IP address bytes, including the
>>> uninitialized ones, to determine the port, or e.g. pass them further to
>>> sel_netnode_find(), which uses them to calculate a hash.
>>>
>>> Signed-off-by: Alexander Potapenko <glider@...gle.com>
>>
>> Are the SELINUX folks going to pick this up or should I?
>
> Yes, it's on my list of things to merge, I was just a bit distracted
> this week with yet another audit problem. I'm going to start making
> my way through the patch backlog today.
Just merged into selinux/next, thanks. My apologies for the delay.
--
paul moore
www.paul-moore.com
Powered by blists - more mailing lists