Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
netlink: Don't shift on 64 for ngroups
It's legal to have 64 groups for netlink_sock. As user-supplied nladdr->nl_groups is __u32, it's possible to subscribe only to first 32 groups. The check for correctness of .bind() userspace supplied parameter is done by applying mask made from ngroups shift. Which broke Android as they have 64 groups and the shift for mask resulted in an overflow. Fixes: 61f4b23 ("netlink: Don't shift with UB on nlk->ngroups") Cc: "David S. Miller" <[email protected]> Cc: Herbert Xu <[email protected]> Cc: Steffen Klassert <[email protected]> Cc: [email protected] Cc: [email protected] Reported-and-Tested-by: Nathan Chancellor <[email protected]> Signed-off-by: Dmitry Safonov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
- Loading branch information