Re: [PATCH net] dibs: loopback: validate offset and size in move_data()
From: Andrew Lunn
Date: Tue Jul 07 2026 - 14:33:19 EST
On Tue, Jul 07, 2026 at 10:31:00PM +0800, Dust Li wrote:
> On 2026-07-07 15:43:18, Dust Li wrote:
> >The loopback move_data() performs a memcpy into the registered DMB
> >without checking whether offset + size exceeds the DMB length. Unlike
> >real ISM hardware, which enforces memory region bounds natively, the
> >software loopback has no such protection.
> >
> >A peer-supplied out-of-bounds offset or oversized write would result in
> >an OOB write past the allocated kernel buffer. Add an explicit bounds
> >check before the memcpy to reject such requests with -EINVAL.
> >
> >Fixes: f7a22071dbf3("net/smc: implement DMB-related operations of loopback-ism")
> >Cc: stable@xxxxxxxxxxxxxxx
> >Reported-by: Federico Kirschbaum <federico.kirschbaum@xxxxxxxx>
>
> Reported-by: Baul Lee <baul.lee@xxxxxxxx>
Could you provide a link to the report?
Thanks
Andrew