sunrpc: integer underflow in rsc_parse()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 24 Feb 2015 15:34:01 +0000 (18:34 +0300)
committerJ. Bruce Fields <bfields@redhat.com>
Thu, 26 Feb 2015 20:40:16 +0000 (15:40 -0500)
If we call groups_alloc() with invalid values then it's might lead to
memory corruption.  For example, with a negative value then we might not
allocate enough for sizeof(struct group_info).

(We're doing this in the caller for consistency with other callers of
groups_alloc().  The other alternative might be to move the check out of
all the callers into groups_alloc().)

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Simo Sorce <simo@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
net/sunrpc/auth_gss/svcauth_gss.c

Simple merge