]> www.infradead.org Git - users/jedix/linux-maple.git/commit
regset: Prevent null pointer reference on readonly regsets
authorH. Peter Anvin <hpa@zytor.com>
Fri, 2 Mar 2012 18:43:48 +0000 (10:43 -0800)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Thu, 19 Apr 2012 22:37:46 +0000 (15:37 -0700)
commit1fbeb24a047b9ee7d41996b0da12172ebb26c258
tree7b9399fc7114b3140c8238d557530dbad5189a37
parenta2ba6db3f1c226320b6cbc2b825b6ceb4f2a4dc2
regset: Prevent null pointer reference on readonly regsets

The regset common infrastructure assumed that regsets would always
have .get and .set methods, but not necessarily .active methods.
Unfortunately people have since written regsets without .set methods.

Rather than putting in stub functions everywhere, handle regsets with
null .get or .set methods explicitly.
This fixes: CVE-2012-1097

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Roland McGrath <roland@hack.frob.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/binfmt_elf.c
include/linux/regset.h