1 Mar 2012 10:16
[PATCH 1/3] netfilter: Fix copy_to_user too small size parametre.
santosh nayak <santoshprasadnayak <at> gmail.com>
2012-03-01 09:16:30 GMT
2012-03-01 09:16:30 GMT
From: Santosh Nayak <santoshprasadnayak <at> gmail.com>
While copying to userspace, the size of source is 29byte where as
size parametre is 32 byte. Its leaking extra-information from
kernel space to user space.
Replace EBT_FUNCTION_MAXNAMELEN by XT_EXTENSION_MAXNAMELEN.
Signed-off-by: Santosh Nayak <santoshprasadnayak <at> gmail.com>
---
net/bridge/netfilter/ebtables.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
index 5864cc4..f3fcbd9 100644
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
<at> <at> -1335,7 +1335,7 <at> <at> static inline int ebt_make_matchname(const struct ebt_entry_match *m,
const char *base, char __user *ubase)
{
char __user *hlp = ubase + ((char *)m - base);
- if (copy_to_user(hlp, m->u.match->name, EBT_FUNCTION_MAXNAMELEN))
+ if (copy_to_user(hlp, m->u.match->name, XT_EXTENSION_MAXNAMELEN))
return -EFAULT;
return 0;
}
<at> <at> -1344,7 +1344,7 <at> <at> static inline int ebt_make_watchername(const struct ebt_entry_watcher *w,
const char *base, char __user *ubase)
{
char __user *hlp = ubase + ((char *)w - base);
- if (copy_to_user(hlp , w->u.watcher->name, EBT_FUNCTION_MAXNAMELEN))
(Continue reading)
RSS Feed