From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, stable@kernel.org
Cc: stable-review@kernel.org, torvalds@linux-foundation.org,
akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk,
Andi Kleen <ak@linux.intel.com>, Ingo Molnar <mingo@elte.hu>,
Oleg Nesterov <oleg@redhat.com>
Subject: [1/6] kernel/signal.c: fix kernel information leak with print-fatal-signals=1
Date: Thu, 14 Jan 2010 15:04:49 -0800 [thread overview]
Message-ID: <20100114230620.830938718@mini.kroah.org> (raw)
In-Reply-To: <20100114230640.GA7259@kroah.com>
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Andi Kleen <andi@firstfloor.org>
commit b45c6e76bc2c72f6426c14bed64fdcbc9bf37cb0 upstream.
When print-fatal-signals is enabled it's possible to dump any memory
reachable by the kernel to the log by simply jumping to that address from
user space.
Or crash the system if there's some hardware with read side effects.
The fatal signals handler will dump 16 bytes at the execution address,
which is fully controlled by ring 3.
In addition when something jumps to a unmapped address there will be up to
16 additional useless page faults, which might be potentially slow (and at
least is not very efficient)
Fortunately this option is off by default and only there on i386.
But fix it by checking for kernel addresses and also stopping when there's
a page fault.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Oleg Nesterov <oleg@redhat.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@suse.de>
---
kernel/signal.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -884,7 +884,8 @@ static void print_fatal_signal(struct pt
for (i = 0; i < 16; i++) {
unsigned char insn;
- __get_user(insn, (unsigned char *)(regs->ip + i));
+ if (get_user(insn, (unsigned char *)(regs->ip + i)))
+ break;
printk("%02x ", insn);
}
}
next prev parent reply other threads:[~2010-01-14 23:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-14 23:06 [0/6] 2.6.27.44-stable review Greg KH
2010-01-14 23:04 ` Greg KH [this message]
2010-01-14 23:04 ` [2/6] netfilter: ebtables: enforce CAP_NET_ADMIN Greg KH
2010-01-14 23:04 ` [3/6] fix braindamage in audit_tree.c untag_chunk() Greg KH
2010-01-14 23:04 ` [4/6] fix more leaks in audit_tree.c tag_chunk() Greg KH
2010-01-14 23:04 ` [5/6] powerpc: Disable VSX or current process in giveup_fpu/altivec Greg KH
2010-01-14 23:04 ` [6/6] powerpc: Handle VSX alignment faults correctly in little-endian mode Greg KH
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=20100114230620.830938718@mini.kroah.org \
--to=gregkh@suse.de \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=oleg@redhat.com \
--cc=stable-review@kernel.org \
--cc=stable@kernel.org \
--cc=torvalds@linux-foundation.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
Powered by JetHome