Thread (3 messages) 3 messages, 2 authors, 3d ago

Re: [PATCH] atm: solos-pci: validate DMA receive size

From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-07-06 15:14:24
Also in: lkml

On Sun, Jul 05, 2026 at 04:45:04PM +0800, Pengpeng Hou wrote:
The DMA receive path reads header->size from the RX buffer and uses it
to extend the skb with skb_put(skb, size + sizeof(*header)). RX DMA skbs
are allocated with RX_DMA_SIZE bytes, but the DMA path did not check
that the device-provided size fits in that buffer. The MMIO path already
has a similar size check against card->buffer_size.

Reject an oversized DMA receive item before skb_put() and drop the
invalid skb, then continue through the normal DMA RX refill path so the
port is not left without a replacement receive buffer.
Subject: line

    Andrew

---
pw-bot: cr
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help