Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1303841 > unrolled thread
| Started by | Kees Cook <keescook@chromium.org> |
|---|---|
| First post | 2016-01-07 20:30 +0100 |
| Last post | 2016-01-08 01:20 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] acpi: avoid leaking format string into kobject name Kees Cook <keescook@chromium.org> - 2016-01-07 20:30 +0100
Re: [PATCH] acpi: avoid leaking format string into kobject name "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-01-08 01:20 +0100
| From | Kees Cook <keescook@chromium.org> |
|---|---|
| Date | 2016-01-07 20:30 +0100 |
| Subject | [PATCH] acpi: avoid leaking format string into kobject name |
| Message-ID | <qOopY-47V-17@gated-at.bofh.it> |
The dn->name is expected to be used as a literal, so add the missing "%s". Signed-off-by: Kees Cook <keescook@chromium.org> --- drivers/acpi/device_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c index 707cf6213bc2..b9afb47db7ed 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 -- 2.6.3 -- Kees Cook Chrome OS & Brillo Security
[toc] | [next] | [standalone]
| From | "Rafael J. Wysocki" <rjw@rjwysocki.net> |
|---|---|
| Date | 2016-01-08 01:20 +0100 |
| Message-ID | <qOsWC-7b8-11@gated-at.bofh.it> |
| In reply to | #1303841 |
On Thursday, January 07, 2016 11:24:29 AM Kees Cook wrote: > The dn->name is expected to be used as a literal, so add the missing > "%s". > > Signed-off-by: Kees Cook <keescook@chromium.org> Applied, thanks! > --- > drivers/acpi/device_sysfs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c > index 707cf6213bc2..b9afb47db7ed 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 > -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web