From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Joas Antonio dos Santos via B4 Relay
<devnull+joasantonio108.gmail.com@kernel.org>
Cc: alex.aring@gmail.com, stefan@datenfreihafen.org,
joasantonio108@gmail.com, davem@davemloft.net,
edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
horms@kernel.org, linux-wpan@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH wpan] mac802154: llsec: reject secured frames with security level 0
Date: Tue, 17 Nov 2026 10:35:12 +0100 [thread overview]
Message-ID: <8733szol67.fsf@bootlin.com> (raw)
In-Reply-To: <20261110-llsec-seclevel-none-v1-1-06ef143e467f@gmail.com> (Joas Antonio dos Santos via's message of "Tue, 10 Nov 2026 09:03:23 +0000")
On 10/11/2026 at 09:03:23 GMT, Joas Antonio dos Santos via B4 Relay <devnull+joasantonio108.gmail.com@kernel.org> wrote:
> From: Joas Antonio dos Santos <joasantonio108@gmail.com>
>
> mac802154_llsec_decrypt() handles every received frame that has the
> Security Enabled bit set. The security level is taken from the
> auxiliary security header of the frame and is not required to be
> non-zero. The only check that looks at level 0 rejects the frame only
> if level 0 is not allowed by the matching seclevel entry, the entry has
> device_override set and the device is not seclevel_exempt:
>
> if (!(seclevel.sec_levels & BIT(hdr.sec.level)) &&
> (hdr.sec.level == 0 && seclevel.device_override &&
> !dev->dev.seclevel_exempt)) {
>
> Otherwise the frame reaches llsec_do_decrypt(), which sends every level
> other than IEEE802154_SCF_SECLEVEL_ENC to llsec_do_decrypt_auth().
> There ieee802154_sechdr_authtag_len() returns 0 for level 0 and
>
> req = aead_request_alloc(llsec_tfm_by_len(key, authlen), GFP_ATOMIC);
>
> looks for a transform with an authentication tag size of 0. The key
> only has transforms for tag sizes 4, 8 and 16, so llsec_tfm_by_len()
> runs into its BUG().
>
> The frame is not authenticated at that point. A station in radio range
> can crash a node that has llsec enabled if it sends a frame that matches
> a configured key entry and a device table entry (source address, key id
> mode and key id are sent in the clear and can be observed), uses a frame
> type that has a seclevel entry and carries a frame counter that is not
> lower than the stored one. No key material is needed. The frame
> counter of that device is also updated before the BUG() is reached.
>
> A frame with the Security Enabled bit set and security level 0 carries
> no protection and cannot be processed by the incoming security
> procedure. Reject it before any key or device state is looked up. The
> transmit side already leaves such frames alone in
> mac802154_llsec_encrypt().
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
prev parent reply other threads:[~2026-11-17 9:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 9:03 [PATCH wpan] mac802154: llsec: reject secured frames with security level 0 Joas Antonio dos Santos via B4 Relay
2026-11-17 9:35 ` Miquel Raynal [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=8733szol67.fsf@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=alex.aring@gmail.com \
--cc=davem@davemloft.net \
--cc=devnull+joasantonio108.gmail.com@kernel.org \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=joasantonio108@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wpan@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stable@vger.kernel.org \
--cc=stefan@datenfreihafen.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