linux-wpan.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Skripkin <paskripkin@gmail.com>
To: Alexander Aring <alex.aring@gmail.com>
Cc: Stefan Schmidt <stefan@datenfreihafen.org>,
	"David S. Miller" <davem@davemloft.net>,
	linux-wpan - ML <linux-wpan@vger.kernel.org>,
	"open list:NETWORKING [GENERAL]" <netdev@vger.kernel.org>,
	kernel list <linux-kernel@vger.kernel.org>,
	syzbot+bf8b5834b7ec229487ce@syzkaller.appspotmail.com
Subject: Re: [PATCH] net: mac802154: fix WARNING in ieee802154_del_device
Date: Mon, 12 Apr 2021 19:41:58 +0300	[thread overview]
Message-ID: <dd04fe4401f5e516885798541b6ebb5b0e40892b.camel@gmail.com> (raw)
In-Reply-To: <CAB_54W7R6ZmMQQPscc04PhJsGu_uoaVqVx=PAiLrqb4nZqTWzw@mail.gmail.com>

Hi!

On Mon, 2021-04-12 at 07:45 -0400, Alexander Aring wrote:
> Hi,
> 
> On Mon, 12 Apr 2021 at 06:58, Pavel Skripkin <paskripkin@gmail.com>
> wrote:
> > 
> > syzbot reported WARNING in ieee802154_del_device. The problem
> > was in uninitialized mutex. In case of NL802154_IFTYPE_MONITOR
> > mutex won't be initialized, but ieee802154_del_device() accessing
> > it.
> > 
> > Reported-by: syzbot+bf8b5834b7ec229487ce@syzkaller.appspotmail.com
> > Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
> > ---
> >  net/mac802154/iface.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/net/mac802154/iface.c b/net/mac802154/iface.c
> > index 1cf5ac09edcb..be8d2a02c882 100644
> > --- a/net/mac802154/iface.c
> > +++ b/net/mac802154/iface.c
> > @@ -599,6 +599,7 @@ ieee802154_setup_sdata(struct
> > ieee802154_sub_if_data *sdata,
> > 
> >                 break;
> >         case NL802154_IFTYPE_MONITOR:
> > +               mutex_init(&sdata->sec_mtx);
> >                 sdata->dev->needs_free_netdev = true;
> >                 sdata->dev->netdev_ops = &mac802154_monitor_ops;
> >                 wpan_dev->promiscuous_mode = true;
> 
> yes that will fix the issue, but will let the user notify that
> setting
> any security setting is supported by monitors which is not the case.
> There are patches around which should return -EOPNOTSUPP for
> monitors.
> However we might support it in future to let the kernel encrypt air
> frames, but this isn't supported yet and the user should be aware
> that
> it isn't.
> 

Thank you for your feedback. I am still not familiar with net internals
yet :) Next time I ll try to go deeper. Thanks!

> - Alex

With regards,
Pavel Skripkin



      reply	other threads:[~2021-04-12 16:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-12 10:58 [PATCH] net: mac802154: fix WARNING in ieee802154_del_device Pavel Skripkin
2021-04-12 11:45 ` Alexander Aring
2021-04-12 16:41   ` Pavel Skripkin [this message]

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=dd04fe4401f5e516885798541b6ebb5b0e40892b.camel@gmail.com \
    --to=paskripkin@gmail.com \
    --cc=alex.aring@gmail.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wpan@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stefan@datenfreihafen.org \
    --cc=syzbot+bf8b5834b7ec229487ce@syzkaller.appspotmail.com \
    /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).