projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f6fc2d
)
thinkpad-acpi: restrict procfs count value to sane upper limit
author
Michael Buesch
<mb@bu3sch.de>
Sat, 1 Aug 2009 15:04:19 +0000
(12:04 -0300)
committer
Len Brown
<len.brown@intel.com>
Sun, 2 Aug 2009 03:50:40 +0000
(23:50 -0400)
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/platform/x86/thinkpad_acpi.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/platform/x86/thinkpad_acpi.c
b/drivers/platform/x86/thinkpad_acpi.c
index 27d68e719e90df73305f9bc43c477507b353ba27..18f9ee63c50a76f986560f8f1b9184923071720f 100644
(file)
--- a/
drivers/platform/x86/thinkpad_acpi.c
+++ b/
drivers/platform/x86/thinkpad_acpi.c
@@
-766,6
+766,8
@@
static int dispatch_procfs_write(struct file *file,
if (!ibm || !ibm->write)
return -EINVAL;
+ if (count > PAGE_SIZE - 2)
+ return -EINVAL;
kernbuf = kmalloc(count + 2, GFP_KERNEL);
if (!kernbuf)