Message ID | 20200618231429.630733-3-seth.forshee@canonical.com |
---|---|
State | New |
Headers | show
Return-Path: <kernel-team-bounces@lists.ubuntu.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49nyVQ6wvGz9sRW; Fri, 19 Jun 2020 09:16:14 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from <kernel-team-bounces@lists.ubuntu.com>) id 1jm3lR-0001Zk-U1; Thu, 18 Jun 2020 23:16:09 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from <seth.forshee@canonical.com>) id 1jm3jy-0000VT-Ca for kernel-team@lists.ubuntu.com; Thu, 18 Jun 2020 23:14:38 +0000 Received: from mail-il1-f200.google.com ([209.85.166.200]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from <seth.forshee@canonical.com>) id 1jm3ju-00007n-38 for kernel-team@lists.ubuntu.com; Thu, 18 Jun 2020 23:14:34 +0000 Received: by mail-il1-f200.google.com with SMTP id o4so5155596ilc.15 for <kernel-team@lists.ubuntu.com>; Thu, 18 Jun 2020 16:14:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vOjOfI7L9QjbZz5oFDUMUugT/IIJIMihfOSaJYuNffw=; b=OiCP9cNIFp/HscJa8iTz3cC617843EuuM0xtkHE5uPGG8f8rusMBZChuqPFPjtNLN7 ZF0hDcn3HNicEMPuSuV2l8KgaClHNKV8ShcOdzpNWnihHBtdAADkHb2E0iijx6ObmhKe LoxCeeQCKs0Rh/tpbgkGOC3fp+7PkcGV3WjTCdHto85K+UWtbLsi8YdvGkSXR0zTySUi ryBh/bhA5v3KTcP7gW3/2aBytLsXLzDTEskI+6cW5cJ1Pr2WyrKJ8PjdDMyIpGg19DfX 7Y0emArkF9XJC2oKJJtTGZ1aahPg7Ff1BwHhDzyFfZZkzguDMOMh1pUnF67Bf/CRJF4+ Z3kA== X-Gm-Message-State: AOAM533HNABOgfZsYHtczk7779+WWXjPTlQvhckPderENvr2vgkKXe7g KEUGNbQBQN3X2H7jbaMsKJWDMDk15947OB7GW2voQwK4iWf2+Y3iKu5b0FdgDgfQvXbtsU/OD0E GFPfHqGeCvtIB5RGstz8nlszRGEIcwmcQsIIF9L9sfQ== X-Received: by 2002:a05:6602:164c:: with SMTP id y12mr1197181iow.143.1592522073032; Thu, 18 Jun 2020 16:14:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWuJA3lxkhZ9UmXUkT9wqHrJqjjeefuGoLwtvuiS8Fqhazshh7hq345NGxoCB4K0MftRnYpw== X-Received: by 2002:a05:6602:164c:: with SMTP id y12mr1197167iow.143.1592522072747; Thu, 18 Jun 2020 16:14:32 -0700 (PDT) Received: from localhost ([2605:a601:ac0f:820:f090:1573:c2fc:6389]) by smtp.gmail.com with ESMTPSA id k126sm2404000iof.50.2020.06.18.16.14.32 for <kernel-team@lists.ubuntu.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jun 2020 16:14:32 -0700 (PDT) From: Seth Forshee <seth.forshee@canonical.com> To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/9][D] UBUNTU: SAUCE: (efi-lockdown) kexec_file: Restrict at runtime if the kernel is locked down Date: Thu, 18 Jun 2020 18:14:22 -0500 Message-Id: <20200618231429.630733-3-seth.forshee@canonical.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200618231429.630733-1-seth.forshee@canonical.com> References: <20200618231429.630733-1-seth.forshee@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions <kernel-team.lists.ubuntu.com> List-Unsubscribe: <https://lists.ubuntu.com/mailman/options/kernel-team>, <mailto:kernel-team-request@lists.ubuntu.com?subject=unsubscribe> List-Archive: <https://lists.ubuntu.com/archives/kernel-team> List-Post: <mailto:kernel-team@lists.ubuntu.com> List-Help: <mailto:kernel-team-request@lists.ubuntu.com?subject=help> List-Subscribe: <https://lists.ubuntu.com/mailman/listinfo/kernel-team>, <mailto:kernel-team-request@lists.ubuntu.com?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" <kernel-team-bounces@lists.ubuntu.com> |
Series |
Lockdown updates
|
expand
|
diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c index 67f3a866eabe..0cfe4f6f7f85 100644 --- a/kernel/kexec_file.c +++ b/kernel/kexec_file.c @@ -239,6 +239,12 @@ kimage_file_prepare_segments(struct kimage *image, int kernel_fd, int initrd_fd, } ret = 0; + + if (kernel_is_locked_down(reason)) { + ret = -EPERM; + goto out; + } + break; /* All other errors are fatal, including nomem, unparseable