[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpWKQ+59GfAP8RTntEM55FC7AYvZgo_hhPXNMbxCpo-c=g@mail.gmail.com>
Date: Wed, 5 Feb 2020 10:03:45 -0800
From: Cong Wang <xiyou.wangcong@...il.com>
To: Dan Carpenter <dan.carpenter@...cle.com>
Cc: Jamal Hadi Salim <jhs@...atatu.com>, Jiri Pirko <jiri@...nulli.us>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Mohit Bhasi <mohitbhasi1998@...il.com>,
"V. Saicharan" <vsaicharan1998@...il.com>,
Leslie Monis <lesliemonis@...il.com>,
"Sachin D. Patil" <sdp.sachin@...il.com>,
Gautam Ramakrishnan <gautamramk@...il.com>,
Linux Kernel Network Developers <netdev@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH v2 net] net: sched: prevent a use after free
On Wed, Feb 5, 2020 at 3:56 AM Dan Carpenter <dan.carpenter@...cle.com> wrote:
>
> The bug is that we call kfree_skb(skb) and then pass "skb" to
> qdisc_pkt_len(skb) on the next line, which is a use after free.
> Also Cong Wang points out that it's better to delay the actual
> frees until we drop the rtnl lock so we should use rtnl_kfree_skbs()
> instead of kfree_skb().
>
> Cc: Cong Wang <xiyou.wangcong@...il.com>
> Fixes: ec97ecf1ebe4 ("net: sched: add Flow Queue PIE packet scheduler")
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
Acked-by: Cong Wang <xiyou.wangcong@...il.com>
Thanks!
Powered by blists - more mailing lists