lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081125103319.19de15c3@extreme>
Date:	Tue, 25 Nov 2008 10:33:19 -0800
From:	Stephen Hemminger <shemminger@...tta.com>
To:	Patrick McHardy <kaber@...sh.net>
Cc:	David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH 2/2] tc: policing requires a rate estimator

On Tue, 25 Nov 2008 19:32:13 +0100
Patrick McHardy <kaber@...sh.net> wrote:

> Stephen Hemminger wrote:
> > Found that while trying average rate policing, it was possible to
> > request average rate policing without a rate estimator. This results
> > in no policing which is harmless but incorrect.
> > 
> > Since policing could be setup in two steps, need to check
> > in the kernel.
> > 
> > Signed-off-by: Stephen Hemminger <shemminger@...tta.com>
> > 
> > 
> > ---
> >  include/net/gen_stats.h  |    1 +
> >  net/core/gen_estimator.c |   30 +++++++++++++++++++++++++++---
> >  net/sched/act_police.c   |   16 ++++++++++++----
> >  3 files changed, 40 insertions(+), 7 deletions(-)
> > 
> > --- a/net/sched/act_police.c	2008-11-25 10:15:50.000000000 -0800
> > +++ b/net/sched/act_police.c	2008-11-25 10:17:54.000000000 -0800
> > @@ -182,6 +182,12 @@ override:
> >  		R_tab = qdisc_get_rtab(&parm->rate, tb[TCA_POLICE_RATE]);
> >  		if (R_tab == NULL)
> >  			goto failure;
> > +
> > +		if (!est && !gen_estimator_active(&police->tcf_rate_est)) {
> > +			err = -EINVAL;
> > +			goto failure;
> 
> This leaks the R_tab reference.

The previous patch added a put at the failure: tag.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ