+2
−1
+7
−1
+7
−1
Loading
stable inclusion from stable-v6.6.68 commit 295a92e3df32e72aff0f4bc25c310e349d07ffbf category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBJCCV CVE: CVE-2024-49568 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=295a92e3df32e72aff0f4bc25c310e349d07ffbf -------------------------------- [ Upstream commit 7863c9f3d24ba49dbead7e03dfbe40deb5888fdf ] When receiving proposal msg in server, the fields v2_ext_offset/ eid_cnt/ism_gid_cnt in proposal msg are from the remote client and can not be fully trusted. Especially the field v2_ext_offset, once exceed the max value, there has the chance to access wrong address, and crash may happen. This patch checks the fields v2_ext_offset/eid_cnt/ism_gid_cnt before using them. Fixes: 8c3dca34 ("net/smc: build and send V2 CLC proposal") Signed-off-by:Guangguan Wang <guangguan.wang@linux.alibaba.com> Reviewed-by:
Wen Gu <guwen@linux.alibaba.com> Reviewed-by:
D. Wythe <alibuda@linux.alibaba.com> Signed-off-by:
David S. Miller <davem@davemloft.net> Signed-off-by:
Sasha Levin <sashal@kernel.org> Conflicts: net/smc/smc_clc.c [Fix context conflict.] Signed-off-by:
Zeng Heng <zengheng4@huawei.com>