netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* netfilter: xt_quota: fix incomplete initialization
@ 2009-06-18  4:54 Jan Engelhardt
  2009-06-19 11:59 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Engelhardt @ 2009-06-18  4:54 UTC (permalink / raw)
  To: kaber; +Cc: Netfilter Developer Mailing List


Affects mainline and 2.6.30.

parent 167b2cd72bca6ca1cb3cf6a05d212cf11d65e08d (v2.6.30-rc6-1344-g167b2cd)
commit 93739b7ba1bbfdb010417a89fd72e08ae29890cc
Author: Jan Engelhardt <jengelh@medozas.de>
Date:   Thu Jun 18 06:47:44 2009 +0200

netfilter: xt_quota: fix incomplete initialization

Commit v2.6.29-rc5-872-gacc738f ("xtables: avoid pointer to self")
forgot to copy the initial quota value supplied by iptables into the
private structure, thus counting from whatever was in the memory
kmalloc returned.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
 net/netfilter/xt_quota.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/netfilter/xt_quota.c b/net/netfilter/xt_quota.c
index 01dd07b..98fc190 100644
--- a/net/netfilter/xt_quota.c
+++ b/net/netfilter/xt_quota.c
@@ -54,6 +54,7 @@ static bool quota_mt_check(const struct xt_mtchk_param *par)
 	if (q->master == NULL)
 		return -ENOMEM;
 
+	q->master->quota = q->quota;
 	return true;
 }
 
-- 
# Created with git-export-patch


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: netfilter: xt_quota: fix incomplete initialization
  2009-06-18  4:54 netfilter: xt_quota: fix incomplete initialization Jan Engelhardt
@ 2009-06-19 11:59 ` Patrick McHardy
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2009-06-19 11:59 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Netfilter Developer Mailing List

Jan Engelhardt wrote:
> Affects mainline and 2.6.30.
> 
> parent 167b2cd72bca6ca1cb3cf6a05d212cf11d65e08d (v2.6.30-rc6-1344-g167b2cd)
> commit 93739b7ba1bbfdb010417a89fd72e08ae29890cc
> Author: Jan Engelhardt <jengelh@medozas.de>
> Date:   Thu Jun 18 06:47:44 2009 +0200
> 
> netfilter: xt_quota: fix incomplete initialization
> 
> Commit v2.6.29-rc5-872-gacc738f ("xtables: avoid pointer to self")
> forgot to copy the initial quota value supplied by iptables into the
> private structure, thus counting from whatever was in the memory
> kmalloc returned.

Applied, thanks Jan,

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-06-19 11:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-18  4:54 netfilter: xt_quota: fix incomplete initialization Jan Engelhardt
2009-06-19 11:59 ` Patrick McHardy

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).