Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1244900

Re: [PATCH] signal: Make the si_code check in rt_[tg]sigqueueinfo stricter

From "Amanieu d'Antras" <amanieu@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] signal: Make the si_code check in rt_[tg]sigqueueinfo stricter
Date 2015-10-12 18:40 +0200
Message-ID <qiOiK-4vG-21@gated-at.bofh.it> (permalink)
References <qiNmG-38X-37@gated-at.bofh.it> <qiNG2-3wf-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Oct 12, 2015 at 4:54 PM, Oleg Nesterov <oleg@redhat.com> wrote:
> Yes, copy_siginfo_to_user() does __put_user((short)from->si_code).
> But SI_FROMUSER/SI_FROMKERNEL are internal kernel checks, we mostly
> use them in copy_siginfo_to_user().
>
> And note that if ->si_code < 0 we simply do __copy_to_user(), so
> userspace can't see something which looks like "from kernel", in
> this case we do not truncate ->si_code.

Ah my bad, I seem to have missed that case. So copy_siginfo_to_user
seems to be safe, but it is still an issue for copy_siginfo_to_user32
which doesn't have this check.

Maybe this should be fixed in the compat code instead?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] signal: Make the si_code check in rt_[tg]sigqueueinfo stricter Amanieu d'Antras <amanieu@gmail.com> - 2015-10-12 17:40 +0200
  Re: [PATCH] signal: Make the si_code check in rt_[tg]sigqueueinfo  stricter Oleg Nesterov <oleg@redhat.com> - 2015-10-12 18:00 +0200
    Re: [PATCH] signal: Make the si_code check in rt_[tg]sigqueueinfo stricter "Amanieu d'Antras" <amanieu@gmail.com> - 2015-10-12 18:40 +0200
      Re: [PATCH] signal: Make the si_code check in rt_[tg]sigqueueinfo  stricter Oleg Nesterov <oleg@redhat.com> - 2015-10-13 17:00 +0200
        Re: [PATCH] signal: Make the si_code check in rt_[tg]sigqueueinfo stricter "Amanieu d'Antras" <amanieu@gmail.com> - 2015-10-13 17:50 +0200

csiph-web