提交 c16a98ed 编写于 作者: E Eric Dumazet 提交者: David S. Miller

ipv6: tcp: fix panic in SYN processing

commit 72a3effa ([NET]: Size listen hash tables using backlog
hint) added a bug allowing inet6_synq_hash() to return an out of bound
array index, because of u16 overflow.

Bug can happen if system admins set net.core.somaxconn &
net.ipv4.tcp_max_syn_backlog sysctls to values greater than 65536
Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 4d65a246
...@@ -85,7 +85,7 @@ struct dst_entry *inet6_csk_route_req(struct sock *sk, ...@@ -85,7 +85,7 @@ struct dst_entry *inet6_csk_route_req(struct sock *sk,
* request_sock (formerly open request) hash tables. * request_sock (formerly open request) hash tables.
*/ */
static u32 inet6_synq_hash(const struct in6_addr *raddr, const __be16 rport, static u32 inet6_synq_hash(const struct in6_addr *raddr, const __be16 rport,
const u32 rnd, const u16 synq_hsize) const u32 rnd, const u32 synq_hsize)
{ {
u32 c; u32 c;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册