lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 25 Sep 2023 09:34:03 +0200
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: Alexander Aring <aahringo@...hat.com>
Cc: Alexander Aring <alex.aring@...il.com>, Stefan Schmidt
 <stefan@...enfreihafen.org>, linux-wpan@...r.kernel.org, "David S. Miller"
 <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni
 <pabeni@...hat.com>, Eric Dumazet <edumazet@...gle.com>,
 netdev@...r.kernel.org, David Girault <david.girault@...vo.com>, Romuald
 Despres <romuald.despres@...vo.com>, Frederic Blain
 <frederic.blain@...vo.com>, Nicolas Schodet <nico@...fr.eu.org>, Guilhem
 Imberton <guilhem.imberton@...vo.com>, Thomas Petazzoni
 <thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH wpan-next v4 01/11] ieee802154: Let PAN IDs be reset

Hi Alexander,

aahringo@...hat.com wrote on Sun, 24 Sep 2023 16:42:31 -0400:

> Hi,
> 
> On Fri, Sep 22, 2023 at 11:50 AM Miquel Raynal
> <miquel.raynal@...tlin.com> wrote:
> >
> > Soon association and disassociation will be implemented, which will
> > require to be able to either change the PAN ID from 0xFFFF to a real
> > value when association succeeded, or to reset the PAN ID to 0xFFFF upon
> > disassociation. Let's allow to do that manually for now.
> >  
> 
> ok. But keep in mind what happens when a device is associated and the
> user sets a short address manually to 0xFFFF?
> 
> It should be a kind of forced mode of disassociation?

I believe once you start interacting with other devices with proper
associations, random user requests cannot all be addressed, in
particular once you are officially associated with another device, you
cannot change your own short address or PAN ID like that. So in the
right next series (after this one) I have a couple of small
additions through the tree to handle this kind of corner case. Here
is how it will look like in nl802154.c:

nl802154_set_short_addr():

        /* The short address only has a meaning when part of a PAN, after a
         * proper association procedure. However, we want to still offer the
         * possibility to create static networks so changing the short address
         * is only allowed when not already associated to other devices with
         * the official handshake.
         */
        if (cfg802154_device_is_associated(wpan_dev)) {
                NL_SET_ERR_MSG(info->extack,
                               "Existing associations, changing short address forbidden");
                return -EINVAL;
        }

nl802154_set_pan_id():

        /* Only allow changing the PAN ID when the device has no more
         * associations ongoing to avoid confusing peers.
         */
        if (cfg802154_device_is_associated(wpan_dev)) {
                NL_SET_ERR_MSG(info->extack,
                               "Existing associations, changing PAN ID forbidden");
                return -EINVAL;
        }

I did not want to bloat this series with too much corner case handling,
so there are a couple of "misc additions" in the next series to handle
exactly that.

Thanks,
Miquèl

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ