lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 12 May 2020 17:10:05 -0400
From:   Paul Moore <paul@...l-moore.com>
To:     Paolo Abeni <pabeni@...hat.com>
Cc:     netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        linux-security-module@...r.kernel.org, ppandit@...hat.com,
        Matthew Sheets <matthew.sheets@...ms.com>
Subject: Re: [PATCH net] netlabel: cope with NULL catmap

On Tue, May 12, 2020 at 8:44 AM Paolo Abeni <pabeni@...hat.com> wrote:
>
> The cipso and calipso code can set the MLS_CAT attribute on
> successful parsing, even if the corresponding catmap has
> not been allocated, as per current configuration and external
> input.
>
> Later, selinux code tries to access the catmap if the MLS_CAT flag
> is present via netlbl_catmap_getlong(). That may cause null ptr
> dereference while processing incoming network traffic.
>
> Address the issue setting the MLS_CAT flag only if the catmap is
> really allocated. Additionally let netlbl_catmap_getlong() cope
> with NULL catmap.
>
> Reported-by: Matthew Sheets <matthew.sheets@...ms.com>
> Fixes: 4b8feff251da ("netlabel: fix the horribly broken catmap functions")
> Fixes: ceba1832b1b2 ("calipso: Set the calipso socket label to match the secattr.")
> Signed-off-by: Paolo Abeni <pabeni@...hat.com>
> ---
>  net/ipv4/cipso_ipv4.c        | 6 ++++--
>  net/ipv6/calipso.c           | 3 ++-
>  net/netlabel/netlabel_kapi.c | 6 ++++++
>  3 files changed, 12 insertions(+), 3 deletions(-)

Seems reasonable to me, thanks Paolo.

Acked-by: Paul Moore <paul@...l-moore.com>

-- 
paul moore
www.paul-moore.com

Powered by blists - more mailing lists