From: Kees Cook Date: Thu, 7 Jan 2016 19:24:29 +0000 (-0800) Subject: ACPI / property: avoid leaking format string into kobject name X-Git-Tag: v4.9.8~2969^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9db22d928ca92629f0deb18efed265c4b7c2aa5e;p=platform%2Fkernel%2Flinux-rpi3.git ACPI / property: avoid leaking format string into kobject name The dn->name is expected to be used as a literal, so add the missing "%s". Fixes: 263b4c1a64bc (ACPI / property: Expose data-only subnodes via sysfs) Signed-off-by: Kees Cook Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c index 707cf62..b9afb47d 100644 --- a/drivers/acpi/device_sysfs.c +++ b/drivers/acpi/device_sysfs.c @@ -104,7 +104,7 @@ static void acpi_expose_nondev_subnodes(struct kobject *kobj, init_completion(&dn->kobj_done); ret = kobject_init_and_add(&dn->kobj, &acpi_data_node_ktype, - kobj, dn->name); + kobj, "%s", dn->name); if (ret) acpi_handle_err(dn->handle, "Failed to expose (%d)\n", ret); else