Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2c5c4ccd authored by Eric Dumazet's avatar Eric Dumazet Committed by Chenbo Feng
Browse files

UPSTREAM: tcp: fix possible deadlock in TCP stack vs BPF filter



Filtering the ACK packet was not put at the right place.

At this place, we already allocated a child and put it
into accept queue.

We absolutely need to call tcp_child_process() to release
its spinlock, or we will deadlock at accept() or close() time.

Found by syzkaller team (Thanks a lot !)

Fixes: 8fac365f63c8 ("tcp: Add a tcp_filter hook before handle ack packet")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Reported-by: default avatarDmitry Vyukov <dvyukov@google.com>
Cc: Chenbo Feng <fengc@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
(cherry picked from commit d624d276d1ddacbcb12ad96832ce0c7b82cd25db)

Bug: 64616244
Bug: 30950746
Change-Id: I9b0aa14252c9698fb7179ea7da3ada18b465f442
parent 76782662
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment