Skip to content

Commit f53a244

Browse files
committed
Merge tag 'for-linus-fwctl' of git://git.kernel.org/pub/scm/linux/kernel/git/fwctl/fwctl
Pull fwctl fix from Jason Gunthorpe: - Buffer overflow due to missing input validation in pds * tag 'for-linus-fwctl' of git://git.kernel.org/pub/scm/linux/kernel/git/fwctl/fwctl: fwctl: pds: Validate RPC input size before parsing
2 parents 79bd2dd + e753773 commit f53a244

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/fwctl/pds/main.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,9 @@ static void *pdsfc_fw_rpc(struct fwctl_uctx *uctx, enum fwctl_rpc_scope scope,
362362
void *out = NULL;
363363
int err;
364364

365+
if (in_len < sizeof(*rpc))
366+
return ERR_PTR(-EINVAL);
367+
365368
err = pdsfc_validate_rpc(pdsfc, rpc, scope);
366369
if (err)
367370
return ERR_PTR(err);

0 commit comments

Comments
 (0)