mac802154: llsec: reject frames shorter than the authentication tag
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 4c14a2fb5d143e4ed94143be2b8c1961b47df9af · < f20dedce0429b293d4bad604e0d3f65d8ac96c83| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
mac802154: llsec: reject frames shorter than the authentication tag
llsec_do_decrypt_auth() computes the associated-data length for the AEAD request as
assoclen += datalen - authlen;
where datalen is the number of bytes after the MAC header and authlen (4, 8 or 16) is the length of the authentication tag. Nothing verifies that the frame actually carries at least authlen payload bytes. A secured frame whose payload is shorter than the tag makes datalen - authlen negative; assoclen is then passed to aead_request_set_ad() as an unsigned value close to 4 GiB, so crypto_aead_decrypt() walks far off the end of the scatterlist that only spans the real frame.
The frame is fully attacker-controlled and reaches this path from any IEEE 802.15.4 peer in radio range. Reject frames whose payload is shorter than the authentication tag before the subtraction.
Dynamically reproduced on a KASAN kernel as a general-protection-fault in the AEAD scatterwalk, and the fix confirmed.
From the CVE record · Linux
The Linux kernel's mac802154 llsec path fails to reject secured IEEE 802.15.4 frames with payloads shorter than their authentication tags. Any IEEE 802.15.4 peer in radio range can send such a frame, causing decryption to read beyond the frame; a kernel crash was reproduced.
Engineers running Linux kernels that use mac802154 llsec should check whether their kernel includes the fix; affected versions were not specified.