mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
ACPI: configfs: Disallow loading ACPI tables when locked down
commit 75b0cea7bf307f362057cc778efe89af4c615354 upstream. 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+ <[email protected]> # 5.4+ Signed-off-by: Jason A. Donenfeld <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
3c4f9a5541
commit
824d0b6225
1 changed files with 5 additions and 1 deletions
|
|
@ -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"
|
||||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue