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.0011
EPSS Percentile 1.8%
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 (28)
linux/Kernel 5.11.0 - 5.15.203linux
linux/Kernel 5.16.0 - 6.1.169linux
linux/Kernel 5.5.0 - 5.10.253linux
linux/Kernel 6.13.0 - 6.18.23linux
linux/Kernel 6.19.0 - 6.19.13linux
linux/Kernel 6.2.0 - 6.6.135linux
linux/Kernel 6.7.0 - 6.12.82linux
Linux/Linux < 5.5
Linux/Linux 5.10.253 - 5.10.*
Linux/Linux 5.15.203 - 5.15.*
... and 18 more
Published Apr 24, 2026
Tracked Since Apr 24, 2026