Commit 1bd3f41
committed
bpf, vsock: Invoke proto::close on close()
jira NONE_AUTOMATION
cve CVE-2025-21756
Rebuild_History Non-Buildable kernel-5.14.0-570.17.1.el9_6
commit-author Michal Luczaj <[email protected]>
commit 135ffc7
vsock defines a BPF callback to be invoked when close() is called. However,
this callback is never actually executed. As a result, a closed vsock
socket is not automatically removed from the sockmap/sockhash.
Introduce a dummy vsock_close() and make vsock_release() call proto::close.
Note: changes in __vsock_release() look messy, but it's only due to indent
level reduction and variables xmas tree reorder.
Fixes: 634f1a7 ("vsock: support sockmap")
Signed-off-by: Michal Luczaj <[email protected]>
Reviewed-by: Stefano Garzarella <[email protected]>
Reviewed-by: Luigi Leonardi <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
Acked-by: John Fastabend <[email protected]>
(cherry picked from commit 135ffc7)
Signed-off-by: Jonathan Maple <[email protected]>1 parent 66f5604 commit 1bd3f41
1 file changed
+40
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
| 126 | + | |
125 | 127 | | |
126 | 128 | | |
127 | 129 | | |
| |||
797 | 799 | | |
798 | 800 | | |
799 | 801 | | |
800 | | - | |
801 | | - | |
802 | | - | |
803 | | - | |
804 | | - | |
805 | | - | |
| 802 | + | |
| 803 | + | |
806 | 804 | | |
807 | | - | |
808 | | - | |
809 | | - | |
810 | | - | |
811 | | - | |
812 | | - | |
| 805 | + | |
| 806 | + | |
813 | 807 | | |
814 | | - | |
815 | | - | |
816 | | - | |
817 | | - | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
818 | 814 | | |
819 | | - | |
820 | | - | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
821 | 819 | | |
822 | | - | |
| 820 | + | |
| 821 | + | |
823 | 822 | | |
824 | | - | |
825 | | - | |
826 | | - | |
827 | | - | |
828 | | - | |
| 823 | + | |
829 | 824 | | |
830 | | - | |
831 | | - | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
832 | 829 | | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
833 | 833 | | |
834 | 834 | | |
835 | 835 | | |
| |||
910 | 910 | | |
911 | 911 | | |
912 | 912 | | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
913 | 920 | | |
914 | 921 | | |
915 | | - | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
916 | 929 | | |
917 | 930 | | |
918 | 931 | | |
| |||
0 commit comments