Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp881127pxa; Wed, 19 Aug 2020 18:22:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyP0AVcU+Kdd8/DLgkZgwps8LlAWLDzcxXQk6pi/ooO8rcjZ9aVGI1iReDh16Arv4A4cg8E X-Received: by 2002:a50:c3c4:: with SMTP id i4mr723245edf.244.1597886570756; Wed, 19 Aug 2020 18:22:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597886570; cv=none; d=google.com; s=arc-20160816; b=WXh6Qxie2Ev5jIDfBlOIDHmBE2o2WILnJ6LncHEgvHxI1oehihyrVFTBzHBMfgkM9h d3rXH9/0IhQ1QBoju0U6eSwAA+oxudzdOQHlmTN89aSUab3uBvenK9fbPjrpCaXcmsgJ 3VCWS/GYfnJen0zhJdsiPPZQ4O+3Lm19Vvj/IOZZ/Yq3K12BDIKUwgAk2gZ4UbHrndSz 1dU1DH+Mxxkt6kpP5YNA5WbTBR6pEdRQMSkzrGqW2xvzZkqZlVu1bsFXrbfyGc4M62tF picPZ2mPLM6HF3/agY7rs2Bw7GP/DnzQ2hGVjv07U4sWWGhWFDXPz/2EXZuZWCCChaOk u9QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=clSRpeeAhBeOa1Z/EGoW+BCJ0W1c3rpm/3iMv3CQBEg=; b=CM6UHsceABW57rTXp5Kfn+mF4YngMcDa5nSri00PX39eVO5eSfDxlGKcfCFEKoc8Wl mdoNfgbsPqn0WL67aeTnmC0GvtPy7t+GsVYGL6iq5l5gt4E/4NkOivu0wz5zF4qS1SfF ZhtBeQ2JWqGFpjNDKHe/MwIdbXwHhhLIA5/yGEC3k6UpoyN268wK8hEhACem1P4wphor CEj8TCYPH5hmM55LpFNg1BkknvbgCW6MBgT7523VFj7FatnQTw1M5EbQbG34eaWkq9Df +BZZ2gHNQTiMgtSB12Yyn55PG7ogFOzVIdLc8mWByzkD+GRWJ/EK7V1q9sW41zO65vkg 12sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=XxgsNqxM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nv5si261606ejb.144.2020.08.19.18.22.25; Wed, 19 Aug 2020 18:22:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=XxgsNqxM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726646AbgHTBVn (ORCPT + 99 others); Wed, 19 Aug 2020 21:21:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726578AbgHTBVm (ORCPT ); Wed, 19 Aug 2020 21:21:42 -0400 Received: from mail-ej1-x643.google.com (mail-ej1-x643.google.com [IPv6:2a00:1450:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60C92C061383 for ; Wed, 19 Aug 2020 18:21:41 -0700 (PDT) Received: by mail-ej1-x643.google.com with SMTP id kq25so687532ejb.3 for ; Wed, 19 Aug 2020 18:21:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=clSRpeeAhBeOa1Z/EGoW+BCJ0W1c3rpm/3iMv3CQBEg=; b=XxgsNqxMJXLMCQt0hvVtovYPMv5lUeVtNbekV18RPRgTSr0lhWryi6qkLfR94gGEFA PztV185NnjB+IYrEZe/xikgYrOfWzJcB4lRxCVUsGayaD7bm8YHeNDsf/DamWw8BVs2k +C5RLMsYP77t9xELeLr7BZ8TE9RPDTxUtbOCnIfrcwrBw8y3WSH+0ZHY3lxyoFNYInmd TDJMfUOKVrH8E2/fkwXZ0LCI2QSnPDsF872t5RLF6bYhssrqv69dNmVY8+Eghelm3/l9 teR8GTfWk0l6Uls7pTmAylPqw9UetBvz7mVqC+Lfnnr+ldA5FBptPQ9RJUdzYhBT78hX yNTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=clSRpeeAhBeOa1Z/EGoW+BCJ0W1c3rpm/3iMv3CQBEg=; b=r4GfIik/+6zkqaiwSSrRN177qKhOHjvZxkARFhdA3xZmYC4pJt1p5dOpGGDoF/bWIX KhXxUmEJiaWoU8FmdUD0zNRZq3w9TmKELoOjEs7SDjpDQNUs3heuwSf9FPwYSenpmzTk smd8qPyYcYVKyYN9ZgFdRGPL6bpVCzZqQpYA22/i0nqtkSyHI4Llm/VUZAUYhtgBo1tW 0tBIYCmwe65ljcwcUlnLMlOcFxvgtxcVHMt5xohkGNyI6d7B2tvRoxyrCV4aDaGx+QQP HwBEuuFX2TtEQXJLW4tOGFJGgbRVsk+DQTYjMrTuuVVRSDCdKyUheth4Zef+VO3xrCcf XjmQ== X-Gm-Message-State: AOAM5309JWXdnkq+EEEbk+17YyqyzG+BVHuN+czLH++C6QAXOVcZlG87 fXLPh6UtCRxjms66s6/HpXuz62x+GlGYQBdOFdTA X-Received: by 2002:a17:906:c1d8:: with SMTP id bw24mr998580ejb.91.1597886500276; Wed, 19 Aug 2020 18:21:40 -0700 (PDT) MIME-Version: 1.0 References: <543834b1-9e7e-187d-4f98-e8484362105b@gmail.com> <20200820083111.46e81b4c@canb.auug.org.au> In-Reply-To: <20200820083111.46e81b4c@canb.auug.org.au> From: Paul Moore Date: Wed, 19 Aug 2020 21:21:29 -0400 Message-ID: Subject: Re: Linux-next: Kernel panic - not syncing: Fatal exception in interrupt - RIP: 0010:security_port_sid To: Stephen Rothwell Cc: Stephen Smalley , Andy Shevchenko , Naresh Kamboju , Linux-Next Mailing List , X86 ML , selinux@vger.kernel.org, open list , lkft-triage@lists.linaro.org, Greg Kroah-Hartman , Stephen Smalley , Eric Paris , Ondrej Mosnacek , rgb@redhat.com, Kees Cook , Casey Schaufler , YueHaibing , jeffv@google.com, Kent Overstreet Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 19, 2020 at 6:31 PM Stephen Rothwell wrote: > Hi all, > > On Wed, 19 Aug 2020 11:12:44 -0400 Stephen Smalley wrote: > > > > Fix can be found at:https://patchwork.kernel.org/patch/11724203/ > > > > Thanks. > > I will add that to the selinux tree merge in linux-next until it turns > up in the tree. FYI, I just merged that patch into the selinux/next tree. commit 37ea433c66070fcef09c6d118492c36299eb72ba Author: Stephen Smalley Date: Wed Aug 19 09:45:41 2020 -0400 selinux: avoid dereferencing the policy prior to initialization Certain SELinux security server functions (e.g. security_port_sid, called during bind) were not explicitly testing to see if SELinux has been initialized (i.e. initial policy loaded) and handling the no-policy-loaded case. In the past this happened to work because the policydb was statically allocated and could always be accessed, but with the recent encapsulation of policy state and conversion to dynamic allocation, we can no longer access the policy state prior to initialization. Add a test of !selinux_initialized(state) to all of the exported functions that were missing them and handle appropriately. Fixes: 461698026ffa ("selinux: encapsulate policy state, refactor ...") Reported-by: Naresh Kamboju Tested-by: Andy Shevchenko Signed-off-by: Stephen Smalley Signed-off-by: Paul Moore -- paul moore www.paul-moore.com