Revision 91874ecf32e41b5d86a4cb9d60e0bee50d828058 authored by Dmitry Safonov on 05 August 2018, 00:35:53 UTC, committed by David S. Miller on 05 August 2018, 00:52:51 UTC
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: 61f4b23769f0 ("netlink: Don't shift with UB on nlk->ngroups")
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Cc: netdev@vger.kernel.org
Cc: stable@vger.kernel.org
Reported-and-Tested-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 5dbfb6e
History
File Mode Size
Documentation
arch
.gitignore -rw-r--r-- 42 bytes
Build -rw-r--r-- 505 bytes
Makefile -rw-r--r-- 1.7 KB
arch.h -rw-r--r-- 1.9 KB
builtin-check.c -rw-r--r-- 1.9 KB
builtin-orc.c -rw-r--r-- 1.7 KB
builtin.h -rw-r--r-- 1012 bytes
cfi.h -rw-r--r-- 1.4 KB
check.c -rw-r--r-- 52.9 KB
check.h -rw-r--r-- 2.2 KB
elf.c -rw-r--r-- 13.8 KB
elf.h -rw-r--r-- 2.9 KB
objtool.c -rw-r--r-- 3.0 KB
orc.h -rw-r--r-- 948 bytes
orc_dump.c -rw-r--r-- 4.3 KB
orc_gen.c -rw-r--r-- 4.8 KB
special.c -rw-r--r-- 4.6 KB
special.h -rw-r--r-- 1.1 KB
sync-check.sh -rwxr-xr-x 584 bytes
warn.h -rw-r--r-- 1.7 KB

back to top