[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJedcCxE3gbiF4_MTeTXNpcr4zPA0KtBw_qEq_pP8x=3PhVo5Q@mail.gmail.com>
Date: Thu, 31 Aug 2023 14:46:38 +0800
From: Zheng Hacker <hackerzheng666@...il.com>
To: Lee Jones <lee@...nel.org>,
Simon Horman <simon.horman@...igine.com>
Cc: Zheng Wang <zyytlz.wz@....com>, s.shtylyov@....ru,
linyunsheng@...wei.com, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, richardcochran@...il.com,
p.zabel@...gutronix.de, geert+renesas@...der.be,
magnus.damm@...il.com, yoshihiro.shimoda.uh@...esas.com,
biju.das.jz@...renesas.com, wsa+renesas@...g-engineering.com,
netdev@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
linux-kernel@...r.kernel.org, 1395428693sheep@...il.com,
alex000young@...il.com
Subject: Re: [PATCH v4] net: ravb: Fix possible UAF bug in ravb_remove
Hi everyone,
After reviewing all comments about the patch. I agree with Jakub. But
adding reference on net_device is a big move. All related drivers must
modify the code.
For now, I couldn't think a better idea about the fix. Thanks for your
effort and sorry for my late reply.
Best regards,
Zheng Wang
Zheng Hacker <hackerzheng666@...il.com> 于2023年8月30日周三 12:30写道:
>
> Sorry for my late reply. I'll update another patch later today.
>
> Best regards,
> Zheng
>
> Lee Jones <lee@...nel.org> 于2023年8月29日周二 21:46写道:
> >
> > On Tue, 15 Aug 2023, Lee Jones wrote:
> >
> > > On Tue, 25 Jul 2023, Zheng Wang wrote:
> > >
> > > > In ravb_probe, priv->work was bound with ravb_tx_timeout_work.
> > > > If timeout occurs, it will start the work. And if we call
> > > > ravb_remove without finishing the work, there may be a
> > > > use-after-free bug on ndev.
> > > >
> > > > Fix it by finishing the job before cleanup in ravb_remove.
> > > >
> > > > Note that this bug is found by static analysis, it might be
> > > > false positive.
> > > >
> > > > Fixes: c156633f1353 ("Renesas Ethernet AVB driver proper")
> > > > Signed-off-by: Zheng Wang <zyytlz.wz@....com>
> > > > Reviewed-by: Sergey Shtylyov <s.shtylyov@....ru>
> > > > ---
> > > > v4:
> > > > - add information about the bug was found suggested by Yunsheng Lin
> > > > v3:
> > > > - fix typo in commit message
> > > > v2:
> > > > - stop dev_watchdog so that handle no more timeout work suggested by Yunsheng Lin,
> > > > add an empty line to make code clear suggested by Sergey Shtylyov
> > > > ---
> > > > drivers/net/ethernet/renesas/ravb_main.c | 3 +++
> > > > 1 file changed, 3 insertions(+)
> > >
> > > Trying my best not to sound like a broken record, but ...
> > >
> > > What's the latest with this fix? Is a v5 en route?
> >
> > Any update please Zheng Wang?
> >
> > --
> > Lee Jones [李琼斯]
Powered by blists - more mailing lists