diff options
| author | Felipe Pereira Stival <v0idpwn@gmail.com> | 2026-11-18 17:35:48 -0300 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2026-11-26 11:27:06 +0100 |
| commit | 285ca329ad4bfc32d0f383340c40a40c8157ac7c (patch) | |
| tree | a9151f67ca06b7f9ab2ef4e95bc93cf6c138c124 /tools/perf/scripts/python | |
| parent | e509726660dd06ce107437aecf7c106c9d3fc1e7 (diff) | |
tls: don't hide a queued KeyUpdate from poll()
When application data and a KeyUpdate are both queued, the recv() for
the data can also decrypt the KeyUpdate. That makes a rekey pending,
and the KeyUpdate is left on rx_list because its record type differs.
tls_sk_poll() reports no read events while a rekey is pending, so the
socket doesn't poll readable although a recvmsg() would return the
KeyUpdate. A reader that waits for a read event before each recv()
never reads it, never provides the new key and receives nothing more.
Report read events for records on rx_list while a rekey is pending,
since they are already decrypted. Keep ignoring the records still in
the strparser, so once the KeyUpdate has been read there are no read
events until the new key is provided, as before. Update the
documentation to say so.
Found with a level-triggered epoll reader that does one recv() per
read event. Without this patch it gets the data and then no read event
for the KeyUpdate; with it, the KeyUpdate is reported and the rekey
completes.
Fixes: 47069594e67e ("tls: implement rekey for TLS1.3")
Signed-off-by: Felipe Pereira Stival <v0idpwn@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Link: https://patch.msgid.link/20261118-v0idpwn-tls-poll-parked-keyupdate-v1-1-8e25101e7be6@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
