[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZGZH1NayhKiHMZTh@corigine.com>
Date: Thu, 18 May 2023 17:44:20 +0200
From: Simon Horman <simon.horman@...igine.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, borisp@...dia.com, john.fastabend@...il.com,
tariqt@...dia.com, Shai Amiram <samiram@...dia.com>
Subject: Re: [PATCH net 4/7] tls: rx: strp: fix determining record length in
copy mode
On Tue, May 16, 2023 at 06:50:39PM -0700, Jakub Kicinski wrote:
> We call tls_rx_msg_size(skb) before doing skb->len += chunk.
> So the tls_rx_msg_size() code will see old skb->len, most
> likely leading to an over-read.
>
> Worst case we will over read an entire record, next iteration
> will try to trim the skb but may end up turning frag len negative
> or discarding the subsequent record (since we already told TCP
> we've read it during previous read but now we'll trim it out of
> the skb).
>
> Fixes: 84c61fe1a75b ("tls: rx: do not use the standard strparser")
> Tested-by: Shai Amiram <samiram@...dia.com>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
Reviewed-by: Simon Horman <simon.horman@...igine.com>
Powered by blists - more mailing lists