All of lore.kernel.org
 help / color / mirror / Atom feed
* resend|stable: netfilter: xt_quota: fix wrong return value (error case)
@ 2009-08-11 17:50 Jan Engelhardt
  2009-08-13 13:42 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Engelhardt @ 2009-08-11 17:50 UTC (permalink / raw)
  To: kaber; +Cc: Netfilter Developer Mailing List

parent 244e5a09ed31c698654a7f9a2150b4c79efe46fd (v2.6.31-rc1-59-g244e5a0)
commit 8240c9c836726615e9fb164fb7637c0156560b2e
Author: Jan Engelhardt <jengelh@medozas.de>
Date:   Wed Jul 22 04:42:09 2009 +0200

netfilter: xt_quota: fix wrong return value (error case)

Success was indicated on a memory allocation failure, thereby causing
a crash due to a later NULL deref.
(Affects v2.6.30-rc1 up to here.)

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

diff --git a/net/netfilter/xt_quota.c b/net/netfilter/xt_quota.c
index ad0ed79..0de9fcf 100644
--- a/net/netfilter/xt_quota.c
+++ b/net/netfilter/xt_quota.c
@@ -52,7 +52,7 @@ static bool quota_mt_check(const struct xt_mtchk_param *par)
 
 	q->master = kmalloc(sizeof(*q->master), GFP_KERNEL);
 	if (q->master == NULL)
-		return -ENOMEM;
+		return false;
 
 	q->master->quota = q->quota;
 	return true;
-- 
# Created with git-export-patch

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

* Re: resend|stable: netfilter: xt_quota: fix wrong return value (error case)
  2009-08-11 17:50 resend|stable: netfilter: xt_quota: fix wrong return value (error case) Jan Engelhardt
@ 2009-08-13 13:42 ` Patrick McHardy
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2009-08-13 13:42 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Netfilter Developer Mailing List

Jan Engelhardt wrote:
> parent 244e5a09ed31c698654a7f9a2150b4c79efe46fd (v2.6.31-rc1-59-g244e5a0)
> commit 8240c9c836726615e9fb164fb7637c0156560b2e
> Author: Jan Engelhardt <jengelh@medozas.de>
> Date:   Wed Jul 22 04:42:09 2009 +0200
> 
> netfilter: xt_quota: fix wrong return value (error case)
> 
> Success was indicated on a memory allocation failure, thereby causing
> a crash due to a later NULL deref.
> (Affects v2.6.30-rc1 up to here.)

Applied, thanks. I'll pass it to -stable once it hits upstream.

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

end of thread, other threads:[~2009-08-13 13:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-11 17:50 resend|stable: netfilter: xt_quota: fix wrong return value (error case) Jan Engelhardt
2009-08-13 13:42 ` Patrick McHardy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.