Dubios pointer casting with put_user()

Valdis Kl=?utf-8?Q?=c4=93?=tnieks valdis.kletnieks at vt.edu
Fri Jul 17 18:46:46 EDT 2020


On Fri, 17 Jul 2020 02:13:34 +0200, Richard Sailer said:

> unsigned long. Is this (correctness and security wise) sane? Because as
> I understand it put_user() determines the amount it copies from the
> pointer type.

> 		rc = put_user(amount, (int __user *)arg);

If that were true, you wouldn't need to pass the 'amount' variable....
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20200717/1bf4f4f2/attachment.sig>


More information about the Kernelnewbies mailing list