]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kernel/groups.c: fix integer overflow in groups_search
authorJerome Marchand <jmarchan@redhat.com>
Thu, 9 Sep 2010 23:37:59 +0000 (16:37 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 20 Sep 2010 20:17:54 +0000 (13:17 -0700)
commit0776127797119f67f8bc350938e32dbe68631edc
treefdb021f1a06511f685dade0772fbfab359218913
parenta0c42c23e8dc2d7f1c3bae407d98c709c9f6b89b
kernel/groups.c: fix integer overflow in groups_search

commit 1c24de60e50fb19b94d94225458da17c720f0729 upstream.

gid_t is a unsigned int.  If group_info contains a gid greater than
MAX_INT, groups_search() function may look on the wrong side of the search
tree.

This solves some unfair "permission denied" problems.

Signed-off-by: Jerome Marchand <jmarchan@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/groups.c