* [PATCH net-next] net: bridge: use vzalloc() instead of vmalloc() as counterstmp is not cleared before it is used in get_counters(). counterstmp might be leaked partially when it is sent to userland later on.
@ 2015-10-28 15:56 Loganaden Velvindron
2015-10-28 18:10 ` Sergei Shtylyov
2015-10-28 18:35 ` Loganaden Velvindron
0 siblings, 2 replies; 4+ messages in thread
From: Loganaden Velvindron @ 2015-10-28 15:56 UTC (permalink / raw)
To: netdev
---
net/bridge/netfilter/ebtables.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
index f46ca41..26922e9 100644
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -989,7 +989,7 @@ static int do_replace_finish(struct net *net, struct ebt_replace *repl,
the check on the size is done later, when we have the lock */
if (repl->num_counters) {
unsigned long size = repl->num_counters * sizeof(*counterstmp);
- counterstmp = vmalloc(size);
+ counterstmp = vzalloc(size);
if (!counterstmp)
return -ENOMEM;
}
@@ -1410,7 +1410,7 @@ static int copy_counters_to_user(struct ebt_table *t,
return -EINVAL;
}
- counterstmp = vmalloc(nentries * sizeof(*counterstmp));
+ counterstmp = vzalloc(nentries * sizeof(*counterstmp));
if (!counterstmp)
return -ENOMEM;
--
2.6.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: bridge: use vzalloc() instead of vmalloc() as counterstmp is not cleared before it is used in get_counters(). counterstmp might be leaked partially when it is sent to userland later on.
2015-10-28 15:56 [PATCH net-next] net: bridge: use vzalloc() instead of vmalloc() as counterstmp is not cleared before it is used in get_counters(). counterstmp might be leaked partially when it is sent to userland later on Loganaden Velvindron
@ 2015-10-28 18:10 ` Sergei Shtylyov
2015-10-28 18:34 ` Loganaden Velvindron
2015-10-28 18:35 ` Loganaden Velvindron
1 sibling, 1 reply; 4+ messages in thread
From: Sergei Shtylyov @ 2015-10-28 18:10 UTC (permalink / raw)
To: Loganaden Velvindron, netdev
Hello.
Your subject is too long, it should have been placed in the changelog
partially. You you didn't sign off on the patch, so it can't applied.
MBR, Sergei
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: bridge: use vzalloc() instead of vmalloc() as counterstmp is not cleared before it is used in get_counters(). counterstmp might be leaked partially when it is sent to userland later on.
2015-10-28 18:10 ` Sergei Shtylyov
@ 2015-10-28 18:34 ` Loganaden Velvindron
0 siblings, 0 replies; 4+ messages in thread
From: Loganaden Velvindron @ 2015-10-28 18:34 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: netdev
On Wed, Oct 28, 2015 at 09:10:20PM +0300, Sergei Shtylyov wrote:
> Hello.
>
> Your subject is too long, it should have been placed in the changelog
> partially. You you didn't sign off on the patch, so it can't applied.
>
> MBR, Sergei
Thank you. Please reject this patch. I re-sent a proper one in another mail.
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: bridge: use vzalloc() instead of vmalloc() as counterstmp is not cleared before it is used in get_counters(). counterstmp might be leaked partially when it is sent to userland later on.
2015-10-28 15:56 [PATCH net-next] net: bridge: use vzalloc() instead of vmalloc() as counterstmp is not cleared before it is used in get_counters(). counterstmp might be leaked partially when it is sent to userland later on Loganaden Velvindron
2015-10-28 18:10 ` Sergei Shtylyov
@ 2015-10-28 18:35 ` Loganaden Velvindron
1 sibling, 0 replies; 4+ messages in thread
From: Loganaden Velvindron @ 2015-10-28 18:35 UTC (permalink / raw)
To: netdev
Please reject this patch. I sent a proper one with the sign-on later on.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-10-28 18:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-28 15:56 [PATCH net-next] net: bridge: use vzalloc() instead of vmalloc() as counterstmp is not cleared before it is used in get_counters(). counterstmp might be leaked partially when it is sent to userland later on Loganaden Velvindron
2015-10-28 18:10 ` Sergei Shtylyov
2015-10-28 18:34 ` Loganaden Velvindron
2015-10-28 18:35 ` Loganaden Velvindron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).