kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>
To: Richard Sailer <richard_siegfried@systemli.org>
Cc: kernelnewbies <Kernelnewbies@kernelnewbies.org>
Subject: Re: Dubios pointer casting with put_user()
Date: Fri, 17 Jul 2020 18:46:46 -0400	[thread overview]
Message-ID: <96764.1595026006@turing-police> (raw)
In-Reply-To: <d8a96eaf-3cbf-a088-5dd5-ad8b64ec9749@systemli.org>


[-- Attachment #1.1: Type: text/plain, Size: 337 bytes --]

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....

[-- Attachment #1.2: Type: application/pgp-signature, Size: 832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

  parent reply	other threads:[~2020-07-17 22:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-17  0:13 Dubios pointer casting with put_user() Richard Sailer
2020-07-17  0:19 ` Richard Sailer
2020-07-17 22:46 ` Valdis Klētnieks [this message]
2020-07-19 12:15   ` Richard Sailer
2020-07-19 22:50     ` Valdis Klētnieks

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=96764.1595026006@turing-police \
    --to=valdis.kletnieks@vt.edu \
    --cc=Kernelnewbies@kernelnewbies.org \
    --cc=richard_siegfried@systemli.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).