Re: [PATCH] atm: solos-pci: validate DMA receive size
From: Andrew Lunn
Date: Mon Jul 06 2026 - 13:27:46 EST
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