]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
ACPI: Limit access to custom_method
authorMatthew Garrett <matthew.garrett@nebula.com>
Fri, 9 Mar 2012 13:39:37 +0000 (08:39 -0500)
committerTim Gardner <tim.gardner@canonical.com>
Wed, 6 Apr 2016 09:29:37 +0000 (10:29 +0100)
BugLink: http://bugs.launchpad.net/bugs/1566221
custom_method effectively allows arbitrary access to system memory, making
it possible for an attacker to circumvent restrictions on module loading.
Disable it if any such restrictions have been enabled.

Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/acpi/custom_method.c

index c68e72414a67a9b00231b095335945d5cdd2f31e..4277938af700d128fab69ccb10f73f93e29957c1 100644 (file)
@@ -29,6 +29,9 @@ static ssize_t cm_write(struct file *file, const char __user * user_buf,
        struct acpi_table_header table;
        acpi_status status;
 
+       if (secure_modules())
+               return -EPERM;
+
        if (!(*ppos)) {
                /* parse the table header to get the table length */
                if (count <= sizeof(struct acpi_table_header))