linux-wpan.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@gmail.com>
To: Pavel Skripkin <paskripkin@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 07:45:12 -0400	[thread overview]
Message-ID: <CAB_54W7R6ZmMQQPscc04PhJsGu_uoaVqVx=PAiLrqb4nZqTWzw@mail.gmail.com> (raw)
In-Reply-To: <20210412105851.24809-1-paskripkin@gmail.com>

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.

- Alex

  reply	other threads:[~2021-04-12 11:45 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 [this message]
2021-04-12 16:41   ` Pavel Skripkin

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='CAB_54W7R6ZmMQQPscc04PhJsGu_uoaVqVx=PAiLrqb4nZqTWzw@mail.gmail.com' \
    --to=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=paskripkin@gmail.com \
    --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).