public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Emese Revfy <re.emese@gmail.com>,
	PaX Team <pageexec@freemail.hu>,
	Kees Cook <keescook@chromium.org>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Oleg Nesterov <oleg@redhat.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Serge Hallyn <serge.hallyn@canonical.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: [ 05/23] kernel/signal.c: stop info leak via the tkill and the tgkill syscalls
Date: Tue, 23 Apr 2013 14:56:12 -0700	[thread overview]
Message-ID: <20130423215456.851626377@linuxfoundation.org> (raw)
In-Reply-To: <20130423215456.307216898@linuxfoundation.org>

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Emese Revfy <re.emese@gmail.com>

commit b9e146d8eb3b9ecae5086d373b50fa0c1f3e7f0f upstream.

This fixes a kernel memory contents leak via the tkill and tgkill syscalls
for compat processes.

This is visible in the siginfo_t->_sifields._rt.si_sigval.sival_ptr field
when handling signals delivered from tkill.

The place of the infoleak:

int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from)
{
        ...
        put_user_ex(ptr_to_compat(from->si_ptr), &to->si_ptr);
        ...
}

Signed-off-by: Emese Revfy <re.emese@gmail.com>
Reviewed-by: PaX Team <pageexec@freemail.hu>
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 kernel/signal.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -2664,7 +2664,7 @@ do_send_specific(pid_t tgid, pid_t pid,
 
 static int do_tkill(pid_t tgid, pid_t pid, int sig)
 {
-	struct siginfo info;
+	struct siginfo info = {};
 
 	info.si_signo = sig;
 	info.si_errno = 0;



  parent reply	other threads:[~2013-04-23 21:56 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-23 21:56 [ 00/23] 3.0.75-stable review Greg Kroah-Hartman
2013-04-23 21:56 ` [ 01/23] hrtimer: Dont reinitialize a cpu_base lock on CPU_UP Greg Kroah-Hartman
2013-04-23 21:56 ` [ 02/23] Revert "8021q: fix a potential use-after-free" Greg Kroah-Hartman
2013-04-23 21:56 ` [ 03/23] can: sja1000: fix handling on dt properties on little endian systems Greg Kroah-Hartman
2013-04-24 22:55   ` Ben Hutchings
2013-04-23 21:56 ` [ 04/23] hugetlbfs: add swap entry check in follow_hugetlb_page() Greg Kroah-Hartman
2013-04-23 21:56 ` Greg Kroah-Hartman [this message]
2013-04-23 21:56 ` [ 06/23] hfsplus: fix potential overflow in hfsplus_file_truncate() Greg Kroah-Hartman
2013-04-23 21:56 ` [ 07/23] KVM: x86: fix for buffer overflow in handling of MSR_KVM_SYSTEM_TIME (CVE-2013-1796) Greg Kroah-Hartman
2013-04-23 21:56 ` [ 08/23] KVM: x86: Convert MSR_KVM_SYSTEM_TIME to use gfn_to_hva_cache functions (CVE-2013-1797) Greg Kroah-Hartman
2013-04-23 21:56 ` [ 09/23] KVM: Fix bounds checking in ioapic indirect register reads (CVE-2013-1798) Greg Kroah-Hartman
2013-04-23 21:56 ` [ 10/23] KVM: Allow cross page reads and writes from cached translations Greg Kroah-Hartman
2013-04-23 21:56 ` [ 11/23] ARM: 7696/1: Fix kexec by setting outer_cache.inv_all for Feroceon Greg Kroah-Hartman
2013-04-23 21:56 ` [ 12/23] ath9k_htc: accept 1.x firmware newer than 1.3 Greg Kroah-Hartman
2013-04-23 21:56 ` [ 13/23] sched: Convert BUG_ON()s in try_to_wake_up_local() to WARN_ON_ONCE()s Greg Kroah-Hartman
2013-04-23 21:56 ` [ 14/23] crypto: algif - suppress sending source address information in recvmsg Greg Kroah-Hartman
2013-04-23 21:56 ` [ 15/23] Revert "sysfs: fix race between readdir and lseek" Greg Kroah-Hartman
2013-04-23 21:56 ` [ 16/23] perf: Treat attr.config as u64 in perf_swevent_init() Greg Kroah-Hartman
2013-04-23 21:56 ` [ 17/23] fbcon: fix locking harder Greg Kroah-Hartman
2013-04-23 21:56 ` [ 18/23] vm: add vm_iomap_memory() helper function Greg Kroah-Hartman
2013-04-23 21:56 ` [ 19/23] vm: convert snd_pcm_lib_mmap_iomem() to vm_iomap_memory() helper Greg Kroah-Hartman
2013-04-23 21:56 ` [ 20/23] vm: convert fb_mmap " Greg Kroah-Hartman
2013-04-23 21:56 ` [ 21/23] vm: convert HPET mmap " Greg Kroah-Hartman
2013-04-23 21:56 ` [ 22/23] vm: convert mtdchar " Greg Kroah-Hartman
2013-04-23 21:56 ` [ 23/23] Btrfs: make sure nbytes are right after log replay Greg Kroah-Hartman
2013-04-24 16:21 ` [ 00/23] 3.0.75-stable review Shuah Khan
2013-04-25 10:40 ` Satoru Takeuchi

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=20130423215456.851626377@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=pageexec@freemail.hu \
    --cc=re.emese@gmail.com \
    --cc=serge.hallyn@canonical.com \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /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