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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ef26f7e5-f05d-382a-784b-ef5647b9a1b6@mojatatu.com>
Date:   Wed, 16 May 2018 07:45:50 -0400
From:   Jamal Hadi Salim <jhs@...atatu.com>
To:     Davide Caratti <dcaratti@...hat.com>,
        "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
        Jiri Pirko <jiri@...nulli.us>
Cc:     Roman Mashak <mrv@...atatu.com>
Subject: Re: [PATCH net] net/sched: fix refcnt leak in the error path of
 tcf_vlan_init()

On 16/05/18 06:54 AM, Davide Caratti wrote:
> Similarly to what was done with commit a52956dfc503 ("net sched actions:
> fix refcnt leak in skbmod"), fix the error path of tcf_vlan_init() to avoid
> refcnt leaks when wrong value of TCA_VLAN_PUSH_VLAN_PROTOCOL is given.
> 
> Fixes: 5026c9b1bafc ("net sched: vlan action fix late binding")
> CC: Roman Mashak <mrv@...atatu.com>
> Signed-off-by: Davide Caratti <dcaratti@...hat.com>
> ---
>   net/sched/act_vlan.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/net/sched/act_vlan.c b/net/sched/act_vlan.c
> index 853604685965..1fb39e1f9d07 100644
> --- a/net/sched/act_vlan.c
> +++ b/net/sched/act_vlan.c
> @@ -161,6 +161,8 @@ static int tcf_vlan_init(struct net *net, struct nlattr *nla,
>   			case htons(ETH_P_8021AD):
>   				break;
>   			default:
> +				if (exists)
> +					tcf_idr_release(*a, bind);
>   				return -EPROTONOSUPPORT;

LGTM.
Note: 5026c9b1bafc fixed the bug that existed. It missed a few
spots like the one here. If there was an "Updates" tag, it would
be more appropriate.

Acked-by: Jamal Hadi Salim <jhs@...atatu.com>

cheers,
jamal

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ