On Wed, Jun 04, 2014 at 12:58:36PM -0400, Joe Lawrence wrote:
> Hi Dan,
>
> kzalloc silenced that smatch warning, but the code looks like:
>
> (calculate data_size)
> ...
> karg = kmalloc(data_size, GFP_KERNEL);
> ...
> if (copy_from_user(karg, uarg, data_size)) {
> ...
> if (copy_to_user((char __user *)arg, karg, data_size)) {
>
> where 'data_size' once calculated, is unchanged. Since the size
> allocated is the same copied from the user and the same copied back out
> to the user, would this really be considered an info leak?
I think the stastic checker is wrong here. But the code would still
benefit from switching to memdup_user, which should shut up the checker
in addition to simplifying the code.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html