[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20200323.130312.657468851247957068.davem@davemloft.net>
Date: Mon, 23 Mar 2020 13:03:12 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: edumazet@...gle.com
Cc: netdev@...r.kernel.org, eric.dumazet@...il.com,
syzkaller@...glegroups.com
Subject: Re: [PATCH net] tcp: repair: fix TCP_QUEUE_SEQ implementation
From: Eric Dumazet <edumazet@...gle.com>
Date: Wed, 18 Mar 2020 19:21:02 -0700
> When application uses TCP_QUEUE_SEQ socket option to
> change tp->rcv_next, we must also update tp->copied_seq.
>
> Otherwise, stuff relying on tcp_inq() being precise can
> eventually be confused.
>
> For example, tcp_zerocopy_receive() might crash because
> it does not expect tcp_recv_skb() to return NULL.
>
> We could add tests in various places to fix the issue,
> or simply make sure tcp_inq() wont return a random value,
> and leave fast path as it is.
>
> Note that this fixes ioctl(fd, SIOCINQ, &val) at the same
> time.
>
> Fixes: ee9952831cfd ("tcp: Initial repair mode")
> Fixes: 05255b823a61 ("tcp: add TCP_ZEROCOPY_RECEIVE support for zerocopy receive")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Reported-by: syzbot <syzkaller@...glegroups.com>
Applied and queued up for -stable, thanks Eric.
Powered by blists - more mailing lists