Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347941
b: refs/heads/master
c: e910d7e
h: refs/heads/master
i:
  347939: ac632bc
v: v3
  • Loading branch information
Alasdair G Kergon committed Dec 21, 2012
1 parent e2243ba commit b016d8f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 550929faf89e2e2cdb3e9945ea87d383989274cf
refs/heads/master: e910d7ebecd1aac43125944a8641b6cb1a0dfabe
8 changes: 8 additions & 0 deletions trunk/drivers/md/dm-ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1566,6 +1566,14 @@ static int copy_params(struct dm_ioctl __user *user, struct dm_ioctl **param)
if (copy_from_user(dmi, user, tmp.data_size))
goto bad;

/*
* Abort if something changed the ioctl data while it was being copied.
*/
if (dmi->data_size != tmp.data_size) {
DMERR("rejecting ioctl: data size modified while processing parameters");
goto bad;
}

/* Wipe the user buffer so we do not return it to userspace */
if (secure_data && clear_user(user, tmp.data_size))
goto bad;
Expand Down

0 comments on commit b016d8f

Please sign in to comment.