projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aaaddfe
)
drivers/char/hpet.c: fix information leak to userland
author
Vasiliy Kulikov
<
[email protected]
>
Tue, 26 Oct 2010 21:22:15 +0000
(14:22 -0700)
committer
Linus Torvalds
<
[email protected]
>
Tue, 26 Oct 2010 23:52:11 +0000
(16:52 -0700)
Structure info is copied to userland with some padding fields unitialized.
It leads to leaking of stack memory.
[
[email protected]
: remove now-unneeded zeroing of info->hi_ireqfreq]
Signed-off-by: Vasiliy Kulikov <
[email protected]
>
Cc: Clemens Ladisch <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/char/hpet.c
patch
|
blob
|
history
diff --git
a/drivers/char/hpet.c
b/drivers/char/hpet.c
index fcb5f0d6ce700f1e3414ab53234e824baa673629..55b8667f739f64a82731ab926738601825cbb00c 100644
(file)
--- a/
drivers/char/hpet.c
+++ b/
drivers/char/hpet.c
@@
-596,11
+596,10
@@
hpet_ioctl_common(struct hpet_dev *devp, int cmd, unsigned long arg,
break;
case HPET_INFO:
{
+ memset(info, 0, sizeof(*info));
if (devp->hd_ireqfreq)
info->hi_ireqfreq =
hpet_time_div(hpetp, devp->hd_ireqfreq);
- else
- info->hi_ireqfreq = 0;
info->hi_flags =
readq(&timer->hpet_config) & Tn_PER_INT_CAP_MASK;
info->hi_hpet = hpetp->hp_which;