Files
erofs-linux/drivers/dibs
Dust Li 78237e3c07 dibs: loopback: validate offset and size in move_data()
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: f7a22071db ("net/smc: implement DMB-related operations of loopback-ism")
Cc: [email protected]
Reported-by: Federico Kirschbaum <[email protected]>
Signed-off-by: Dust Li <[email protected]>
Reported-by: Baul Lee <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
2026-07-09 12:44:00 +02:00
..
…