Skip to content

Commit c16a98e

Browse files
Eric Dumazetdavem330
authored andcommitted
ipv6: tcp: fix panic in SYN processing
commit 72a3eff ([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: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 4d65a24 commit c16a98e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ipv6/inet6_connection_sock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ struct dst_entry *inet6_csk_route_req(struct sock *sk,
8585
* request_sock (formerly open request) hash tables.
8686
*/
8787
static u32 inet6_synq_hash(const struct in6_addr *raddr, const __be16 rport,
88-
const u32 rnd, const u16 synq_hsize)
88+
const u32 rnd, const u32 synq_hsize)
8989
{
9090
u32 c;
9191

0 commit comments

Comments
 (0)