[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAM_iQpUbCggUxAr6OpLx9CM3Gy2N4+B+2+-cgVs=Dd1z_GdL4A@mail.gmail.com>
Date: Tue, 26 Jan 2016 10:13:29 -0800
From: Cong Wang <xiyou.wangcong@...il.com>
To: Dmitry Vyukov <dvyukov@...gle.com>
Cc: Samuel Ortiz <samuel@...tiz.org>,
"David S. Miller" <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
syzkaller <syzkaller@...glegroups.com>,
Kostya Serebryany <kcc@...gle.com>,
Alexander Potapenko <glider@...gle.com>,
Sasha Levin <sasha.levin@...cle.com>,
Eric Dumazet <edumazet@...gle.com>
Subject: Re: net/irda: use-after-free in ircomm_param_request
On Mon, Jan 25, 2016 at 7:59 AM, Dmitry Vyukov <dvyukov@...gle.com> wrote:
> It seems that skb can be freed after skb_put() and spinlock unlock,
> but ircomm_param_request reads skb->len afterwards:
>
> int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush)
> {
> ...
> skb_put(skb, count);
> spin_unlock_irqrestore(&self->spinlock, flags);
> pr_debug("%s(), skb->len=%d\n", __func__ , skb->len);
>
This looks correct to me. We can either get rid of that debugging
print or move it under spinlock.
Powered by blists - more mailing lists