+4
−0
+29
−21
Loading
stable inclusion from stable-v6.6.48 commit 921f1acf0c3cf6b1260ab57a8a6e8b3d5f3023d5 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAOXZC CVE: CVE-2024-44996 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=921f1acf0c3cf6b1260ab57a8a6e8b3d5f3023d5 -------------------------------- [ Upstream commit 69139d2919dd4aa9a553c8245e7c63e82613e3fc ] After a vsock socket has been added to a BPF sockmap, its prot->recvmsg has been replaced with vsock_bpf_recvmsg(). Thus the following recursiion could happen: vsock_bpf_recvmsg() -> __vsock_recvmsg() -> vsock_connectible_recvmsg() -> prot->recvmsg() -> vsock_bpf_recvmsg() again We need to fix it by calling the original ->recvmsg() without any BPF sockmap logic in __vsock_recvmsg(). Fixes: 634f1a71 ("vsock: support sockmap") Reported-by:<syzbot+bdb4bd87b5e22058e2a4@syzkaller.appspotmail.com> Tested-by:
<syzbot+bdb4bd87b5e22058e2a4@syzkaller.appspotmail.com> Cc: Bobby Eshleman <bobby.eshleman@bytedance.com> Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by:
Cong Wang <cong.wang@bytedance.com> Acked-by:
Michael S. Tsirkin <mst@redhat.com> Link: https://patch.msgid.link/20240812022153.86512-1-xiyou.wangcong@gmail.com Signed-off-by:
Paolo Abeni <pabeni@redhat.com> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Zhang Changzhong <zhangchangzhong@huawei.com>