mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 00:43:12 +00:00
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 <[email protected]> Reviewed-by: Simo Sorce <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>