Re: [net-next v38] mctp pcc: Implement MCTP over PCC Transport

Jeremy Kerr
2026-04-13T02:15:14Z

Hi Adam,

> > +       memcpy_toio(outbox->chan->shmem,  skb->data, skb->len);
>
> Is it possible to read out of bounds here if the skb is fragmented?
>
> The skb->data pointer only points to the linear portion of the packet, while
> skb->len represents the total packet length including page fragments.
> skb_cow_head() does not linearize the packet, so a call to skb_linearize()
> might be needed before copying.

I assume that we should only be seeing linear skbs here, as the driver
does not advertise NETIF_F_FRAGLIST or NETIF_F_SG.

(that said, this could support fragmented skbs quite easily, but that
would be more suitable for a follow-up change)

Cheers,

Jeremy