acpi: avoid leaking format string into kobject name
PATCH 1/1 acpi: avoid leaking format string into kobject name
The dn->name is expected to be used as a literal, so add the missing "%s".
Signed-off-by Kees Cook <[email protected]>
--- drivers/acpi/device_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/device_sysfs.c +1 -1
@@ -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
Signature · 6 lines
2.6.3 -- Kees Cook Chrome OS & Brillo Security
Rafael J. Wysocki
AppliedQuoted 4 lines · Kees Cook
The
dn->nameis expected to be used as a literal, so add the missing "%s".Signed-off-by Kees Cook <[email protected]>
Applied, thanks!
Quoted 18 lines
--- drivers/acpi/device_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/acpi/device_sysfs.c +1
-1@@ -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
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.