CVE-2026-31660

MEDIUM

nfc: pn533: allocate rx skb before consuming bytes

Title source: cna
STIX 2.1

Description

In the Linux kernel, the following vulnerability has been resolved: nfc: pn533: allocate rx skb before consuming bytes pn532_receive_buf() reports the number of accepted bytes to the serdev core. The current code consumes bytes into recv_skb and may already hand a complete frame to pn533_recv_frame() before allocating a fresh receive buffer. If that alloc_skb() fails, the callback returns 0 even though it has already consumed bytes, and it leaves recv_skb as NULL for the next receive callback. That breaks the receive_buf() accounting contract and can also lead to a NULL dereference on the next skb_put_u8(). Allocate the receive skb lazily before consuming the next byte instead. If allocation fails, return the number of bytes already accepted.

Scores

CVSS v3 5.5
EPSS 0.0001
EPSS Percentile 2.4%
Attack Vector LOCAL
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Details

Status published
Products (21)
Linux/Linux < 5.5
Linux/Linux 5.10.253 - 5.10.*
Linux/Linux 5.15.203 - 5.15.*
Linux/Linux 5.5
Linux/Linux 6.1.169 - 6.1.*
Linux/Linux 6.12.82 - 6.12.*
Linux/Linux 6.18.23 - 6.18.*
Linux/Linux 6.19.13 - 6.19.*
Linux/Linux 6.6.135 - 6.6.*
Linux/Linux 7.0
... and 11 more
Published Apr 24, 2026
Tracked Since Apr 24, 2026