-
Notifications
You must be signed in to change notification settings - Fork 133
bpf,ktls: Fix data corruption caused by using bpf_msg_pop_data() in ktls #8990
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Upstream branch: 8259eb0 |
b8dcdbb
to
e85324d
Compare
Upstream branch: bfccacd |
ce6ed3b
to
4088749
Compare
e85324d
to
61c8df2
Compare
Upstream branch: 079e5c5 |
4088749
to
3af889f
Compare
61c8df2
to
708d4b4
Compare
Upstream branch: db22b13 |
3af889f
to
8e80682
Compare
708d4b4
to
6c5a4cd
Compare
Upstream branch: 1ae7a84 |
8e80682
to
99b73d1
Compare
6c5a4cd
to
1918227
Compare
Upstream branch: 86bc9c7 |
99b73d1
to
f274dfe
Compare
1918227
to
3777056
Compare
Upstream branch: d496557 |
f274dfe
to
e36451a
Compare
3777056
to
7f76eaa
Compare
Upstream branch: ca56fbd |
e36451a
to
c71ec37
Compare
7f76eaa
to
5ab4b7b
Compare
Upstream branch: 5ffb537 |
86d7ac4
to
9fa5029
Compare
Upstream branch: 90b83ef |
db90132
to
b648972
Compare
9fa5029
to
148f936
Compare
Upstream branch: bb1556e |
b648972
to
60e3f45
Compare
148f936
to
b3eed83
Compare
Upstream branch: bb1556e |
60e3f45
to
51385e3
Compare
b3eed83
to
5fa9e7d
Compare
Upstream branch: cd2e103 |
51385e3
to
ca96111
Compare
5fa9e7d
to
810d3c3
Compare
When sending plaintext data, we initially calculated the corresponding ciphertext length. However, if we later reduced the plaintext data length via socket policy, we failed to recalculate the ciphertext length. This results in transmitting buffers containing uninitialized data during ciphertext transmission. This causes uninitialized bytes to be appended after a complete "Application Data" packet, leading to errors on the receiving end when parsing TLS record. Fixes: d3b18ad ("tls: add bpf support to sk_msg handling") Reported-by: Cong Wang <[email protected]> Signed-off-by: Jiayuan Chen <[email protected]> Reviewed-by: John Fastabend <[email protected]>
The selftest can reproduce an issue where using bpf_msg_pop_data() in ktls causes errors on the receiving end. Signed-off-by: Jiayuan Chen <[email protected]> Reviewed-by: John Fastabend <[email protected]>
Upstream branch: cd2e103 |
ca96111
to
bdefd6f
Compare
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=965854 expired. Closing PR. |
Pull request for series with
subject: bpf,ktls: Fix data corruption caused by using bpf_msg_pop_data() in ktls
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=965854