[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230214210925.23c005b1@kernel.org>
Date: Tue, 14 Feb 2023 21:09:25 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Sabrina Dubroca <sd@...asysnail.net>
Cc: netdev@...r.kernel.org, Vadim Fedorenko <vfedorenko@...ek.ru>,
Frantisek Krenzelok <fkrenzel@...hat.com>,
Kuniyuki Iwashima <kuniyu@...zon.com>,
Apoorv Kothari <apoorvko@...zon.com>,
Boris Pismenny <borisp@...dia.com>,
John Fastabend <john.fastabend@...il.com>,
Shuah Khan <shuah@...nel.org>, linux-kselftest@...r.kernel.org,
Gal Pressman <gal@...dia.com>,
Marcel Holtmann <marcel@...tmann.org>
Subject: Re: [PATCH net-next v2 2/5] tls: block decryption when a rekey is
pending
On Tue, 14 Feb 2023 12:17:39 +0100 Sabrina Dubroca wrote:
> @@ -2141,6 +2178,12 @@ ssize_t tls_sw_splice_read(struct socket *sock, loff_t *ppos,
> if (err < 0)
> return err;
>
> + /* a rekey is pending, let userspace deal with it */
> + if (unlikely(ctx->key_update_pending)) {
> + err = -EKEYEXPIRED;
> + goto splice_read_end;
> + }
This will prevent splicing peek()'ed data.
Just put the check in tls_rx_rec_wait().
Powered by blists - more mailing lists