From: yangerkun <yangerkun@huawei.com>
To: <gregkh@linuxfoundation.org>
Cc: <stable@vger.kernel.org>, <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH 4.4-stable] slip: stop double free sl->dev in slip_open
Date: Mon, 24 Feb 2020 11:06:48 +0800 [thread overview]
Message-ID: <4e89e339-e161-fd8e-85e0-e59cdcc9688f@huawei.com> (raw)
In-Reply-To: <20200222094649.10933-1-yangerkun@huawei.com>
cc David and netdev mail list too.
On 2020/2/22 17:46, yangerkun wrote:
> After commit e4c157955483 ("slip: Fix use-after-free Read in slip_open"),
> we will double free sl->dev since sl_free_netdev will free sl->dev too.
> It's fine for mainline since sl_free_netdev in mainline won't free
> sl->dev.
>
> Signed-off-by: yangerkun <yangerkun@huawei.com>
> ---
> drivers/net/slip/slip.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/net/slip/slip.c b/drivers/net/slip/slip.c
> index ef6b25ec75a1..7fe9183fad0e 100644
> --- a/drivers/net/slip/slip.c
> +++ b/drivers/net/slip/slip.c
> @@ -861,7 +861,6 @@ err_free_chan:
> tty->disc_data = NULL;
> clear_bit(SLF_INUSE, &sl->flags);
> sl_free_netdev(sl->dev);
> - free_netdev(sl->dev);
>
> err_exit:
> rtnl_unlock();
>
next prev parent reply other threads:[~2020-02-24 3:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-22 9:46 [PATCH 4.4-stable] slip: stop double free sl->dev in slip_open yangerkun
2020-02-24 3:06 ` yangerkun [this message]
2020-02-27 12:49 ` Greg KH
2020-02-27 14:20 ` yangerkun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4e89e339-e161-fd8e-85e0-e59cdcc9688f@huawei.com \
--to=yangerkun@huawei.com \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).