Commit a7bff11
net/tls: fix encryption error checking
bpf_exec_tx_verdict() can return negative value for copied
variable. In that case this value will be pushed back to caller
and the real error code will be lost. Fix it using signed type and
checking for positive value.
Fixes: d10523d ("net/tls: free the record on encryption error")
Fixes: d3b18ad ("tls: add bpf support to sk_msg handling")
Signed-off-by: Vadim Fedorenko <vfedorenko@novek.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 04ba6b7 commit a7bff11
1 file changed
+6
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
780 | 780 | | |
781 | 781 | | |
782 | 782 | | |
783 | | - | |
| 783 | + | |
784 | 784 | | |
785 | 785 | | |
786 | 786 | | |
| |||
916 | 916 | | |
917 | 917 | | |
918 | 918 | | |
919 | | - | |
| 919 | + | |
| 920 | + | |
920 | 921 | | |
921 | 922 | | |
922 | 923 | | |
| |||
1118 | 1119 | | |
1119 | 1120 | | |
1120 | 1121 | | |
1121 | | - | |
| 1122 | + | |
1122 | 1123 | | |
1123 | 1124 | | |
1124 | 1125 | | |
| |||
1132 | 1133 | | |
1133 | 1134 | | |
1134 | 1135 | | |
1135 | | - | |
| 1136 | + | |
1136 | 1137 | | |
1137 | 1138 | | |
1138 | 1139 | | |
| |||
1234 | 1235 | | |
1235 | 1236 | | |
1236 | 1237 | | |
1237 | | - | |
| 1238 | + | |
1238 | 1239 | | |
1239 | 1240 | | |
1240 | 1241 | | |
| |||
0 commit comments