]> git.baikalelectronics.ru Git - kernel.git/commit
mptcp: fix uninitialized value access
authorPaolo Abeni <pabeni@redhat.com>
Thu, 30 Apr 2020 13:03:22 +0000 (15:03 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Apr 2020 19:34:07 +0000 (12:34 -0700)
commitd09f3f8026594a3b79dfd9e74865796f2824a3e2
tree3d4f969f7f09664e88d7a35e811e174bcd6e1a49
parentf22cfa05b57219b62e0c8bdd9cf794d0d64ba847
mptcp: fix uninitialized value access

tcp_v{4,6}_syn_recv_sock() set 'own_req' only when returning
a not NULL 'child', let's check 'own_req' only if child is
available to avoid an - unharmful - UBSAN splat.

v1 -> v2:
 - reference the correct hash

Fixes: d74638366040 ("mptcp: avoid flipping mp_capable field in syn_recv_sock()")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/subflow.c