Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VOePm-0002P2-4x for mharc-grub-devel@gnu.org; Tue, 24 Sep 2013 22:01:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOePi-0002OZ-CB for grub-devel@gnu.org; Tue, 24 Sep 2013 22:01:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VOePh-0001Qg-1S for grub-devel@gnu.org; Tue, 24 Sep 2013 22:01:14 -0400 Received: from mail-yh0-x24a.google.com ([2607:f8b0:4002:c01::24a]:44525) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOePg-0001QU-Sr for grub-devel@gnu.org; Tue, 24 Sep 2013 22:01:12 -0400 Received: by mail-yh0-f74.google.com with SMTP id c41so623380yho.5 for ; Tue, 24 Sep 2013 19:01:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=wDJf06b/rZgtDc0ot43/ujEhd8bOddr9xY35BkyjNDc=; b=Z2mGvEfAMIoXEleCJsuc9bClVa2vBHG51esOoiFOo7tThffB6p0+CsuYcINNwT264c EhEqC8YaZiGiTfrQ4Wky2ZVQqvFkmIvgjdH5I9SjnW7s+z/Vm5wZhJUCvW3mVO+74beE 503TSHTO2F//qwRMFarvB6UaOzWd9gcgzBc4tMAt/WPSU7+q5VTnvzQ0uM3pmCM7vUwy bjnQwIEmfY6MY2wExkmysVfLJl3gZi4HInJLMEbTy6EryDaVGGpMKo7Wi6fYUVsUHqjj OCyoT+Xspv5J864WaS7DJvZzaWTs5Cf1qLlGr6F1Hi07OTff/SGZOPzcF1EnuPCncLGn XTxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=wDJf06b/rZgtDc0ot43/ujEhd8bOddr9xY35BkyjNDc=; b=aWCcf9zhtXuGRmzSWgGFxiugKBQjRJ+0T61W7boGWhuAx17ZYX2HkIdkJUfuMCeycd 29xYq01BwBBmEkO9jDXQlYyeg8JKi5i8n3x6ku86fRaLl07RBthlehfkQw/lLZ3roj8C T1AZvKMuTIOVlw661JJi57q2gPozQ7d4vxRF5hcAHVEHjFAAv9EXsmU7nAoxg6hTMdh7 y958L4YIQ437mDcKccc4rgfeMLBOLFjJdnffSudcRfaPvVQ+AhRAGWv8UqrZfh2e90IB BhpNznYom18UaUGRsuzCidwE6pWYSdClEYq6Wz0VcobX7WD+zm8CS+KUl+dPV0bmVUCr M9tw== X-Gm-Message-State: ALoCoQlFGT/hap6KiwxFqdgLrtPCXcEw6bRkyoi3IYIhMTAS8BvedX020aPO8BewoyfBNneHCsINcl8K6CPxS6sEB2nIKtuiyoLYyyRFO3py+hePn/ZiuETYL1u9gkpUibxAWzqNqe3ilH98FHO/qfo9JkP+4Z9QpLFJXCVk7uaginS745HImlpjvyPy2oyAfpS6m/p0kMbjf97oKLNobPOJeFyx33cAts1EYRrDxPJWhZmPV4rxiVQ= X-Received: by 10.236.93.45 with SMTP id k33mr10425739yhf.19.1380074471893; Tue, 24 Sep 2013 19:01:11 -0700 (PDT) Received: from corp2gmr1-2.hot.corp.google.com (corp2gmr1-2.hot.corp.google.com [172.24.189.93]) by gmr-mx.google.com with ESMTPS id d23si5009146yhn.2.1969.12.31.16.00.00 (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Tue, 24 Sep 2013 19:01:11 -0700 (PDT) Received: from yinz.mtv.corp.google.com (yinz.mtv.corp.google.com [172.17.81.122]) by corp2gmr1-2.hot.corp.google.com (Postfix) with ESMTP id 7E7D55A4288; Tue, 24 Sep 2013 19:01:11 -0700 (PDT) Received: by yinz.mtv.corp.google.com (Postfix, from userid 184367) id 28C20C3E8E; Tue, 24 Sep 2013 19:01:11 -0700 (PDT) From: Jon McCune To: grub-devel@gnu.org Subject: [PATCH v4 0/4] Add whitelisting support for load_env Date: Tue, 24 Sep 2013 19:00:28 -0700 Message-Id: <1380074432-27299-1-git-send-email-jonmccune@google.com> X-Mailer: git-send-email 1.8.4 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4002:c01::24a Cc: Jon McCune X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Sep 2013 02:01:16 -0000 These patches add support to load_env and save_env to work nicely in concert with check_signatures=enforce. This represents an evolution from the design in my email to grub-devel entitled "Proposal to enable savedefault, one-shot reboot, etc with check_signatures=enforce". In particular, no new commands are added. Instead, the behavior of load_env is modified based on the presence of a whitelist of environment variables to be updated from an untrusted grubenv-style file. Some additional work is done to make this support usable: A {-k, --pubkey} option is added to: grub-install, grub-mkrescue, grub-mkstandalone, grub-mknetdir. See the individual patch descriptions for more specifics. Jon McCune (4): style: indent --no-tabs --gnu-style grub-core/commands/loadenv.c load_env support for whitelisting which variables are read from an env file, even if check_signatures=enforce save_env should work, even if check_signatures=enforce Add (multiple) -k, --pubkey=FILE support to installation commands. grub-core/commands/loadenv.c | 139 ++++++++++++++++++++++++++++--------------- grub-core/lib/envblk.c | 20 ++++++- include/grub/lib/envblk.h | 8 +++ util/grub-editenv.c | 2 +- util/grub-install.in | 8 +-- util/grub-install_header | 17 ++++++ util/grub-mknetdir.in | 2 +- util/grub-mkrescue.in | 12 ++-- util/grub-mkstandalone.in | 2 +- 9 files changed, 146 insertions(+), 64 deletions(-) -- 1.8.4