Commit 5cc6195
vsock: Use container_of() to get net namespace in sysctl handlers
current->nsproxy is should not be accessed directly as syzbot has found
that it could be NULL at times, causing crashes. Fix up the af_vsock
sysctl handlers to use container_of() to deal with the current net
namespace instead of attempting to rely on current.
This is the same type of change done in commit 7f5611c ("rds:
sysctl: rds_tcp_{rcv,snd}buf: avoid using current->nsproxy")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Bobby Eshleman <bobbyeshleman@meta.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Fixes: eafb64f ("vsock: add netns to vsock core")
Link: https://patch.msgid.link/2026022318-rearview-gallery-ae13@gregkh
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 4b063c0 commit 5cc6195
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2825 | 2825 | | |
2826 | 2826 | | |
2827 | 2827 | | |
2828 | | - | |
| 2828 | + | |
2829 | 2829 | | |
2830 | 2830 | | |
2831 | 2831 | | |
| |||
2838 | 2838 | | |
2839 | 2839 | | |
2840 | 2840 | | |
2841 | | - | |
| 2841 | + | |
2842 | 2842 | | |
2843 | 2843 | | |
2844 | 2844 | | |
| |||
0 commit comments