Skip to content

Commit

Permalink
ACPI: configfs: Disallow loading ACPI tables when locked down
Browse files Browse the repository at this point in the history
Like other vectors already patched, this one here allows the root
user to load ACPI tables, which enables arbitrary physical address
writes, which in turn makes it possible to disable lockdown.

Prevents this by checking the lockdown status before allowing a new
ACPI table to be installed. The link in the trailer shows a PoC of
how this might be used.

Link: https://git.zx2c4.com/american-unsigned-language/tree/american-unsigned-language-2.sh
Cc: 5.4+ <stable@vger.kernel.org> # 5.4+
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
zx2c4 authored and rafaeljw committed Jun 22, 2020
1 parent 4877846 commit 75b0cea
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/acpi/acpi_configfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <linux/module.h>
#include <linux/configfs.h>
#include <linux/acpi.h>
#include <linux/security.h>

#include "acpica/accommon.h"
#include "acpica/actables.h"
Expand All @@ -28,7 +29,10 @@ static ssize_t acpi_table_aml_write(struct config_item *cfg,
{
const struct acpi_table_header *header = data;
struct acpi_table *table;
int ret;
int ret = security_locked_down(LOCKDOWN_ACPI_TABLES);

if (ret)
return ret;

table = container_of(cfg, struct acpi_table, cfg);

Expand Down

0 comments on commit 75b0cea

Please sign in to comment.