Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1595725

Re: [PATCH v2] selinux: check for address length in selinux_socket_bind()

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [PATCH v2] selinux: check for address length in selinux_socket_bind()
Date 2017-03-09 08:20 +0100
Message-ID <tj0wF-1HW-1@gated-at.bofh.it> (permalink)
References <ti5RL-3Nc-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Alexander Potapenko <glider@google.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@google.com>

Are the SELINUX folks going to pick this up or should I?

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2] selinux: check for address length in selinux_socket_bind() Alexander Potapenko <glider@google.com> - 2017-03-06 19:50 +0100
  Re: [PATCH v2] selinux: check for address length in  selinux_socket_bind() Eric Dumazet <eric.dumazet@gmail.com> - 2017-03-06 21:30 +0100
  Re: [PATCH v2] selinux: check for address length in  selinux_socket_bind() David Miller <davem@davemloft.net> - 2017-03-09 08:20 +0100
    Re: [PATCH v2] selinux: check for address length in selinux_socket_bind() Paul Moore <paul@paul-moore.com> - 2017-03-10 13:10 +0100
      Re: [PATCH v2] selinux: check for address length in selinux_socket_bind() Paul Moore <paul@paul-moore.com> - 2017-03-10 21:30 +0100

csiph-web