kernel_samsung_a53x/drivers/net/ethernet/mellanox/mlxsw
Gustavo A. R. Silva 327dd2d8e7 mlxsw: Use size_mul() in call to struct_size()
[ Upstream commit e22c6ea025013ae447fe269269753ffec763dde5 ]

If, for any reason, the open-coded arithmetic causes a wraparound, the
protection that `struct_size()` adds against potential integer overflows
is defeated. Fix this by hardening call to `struct_size()` with `size_mul()`.

Fixes: 2285ec872d9d ("mlxsw: spectrum_acl_bloom_filter: use struct_size() in kzalloc()")
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 11:42:47 +01:00
..
cmd.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
core.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
core_acl_flex_actions.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
core_acl_flex_actions.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
core_acl_flex_keys.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
core_acl_flex_keys.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
core_env.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
core_env.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
core_hwmon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
core_thermal.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
emad.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ib.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
item.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
minimal.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci_hw.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
port.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
reg.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
resources.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum1_acl_tcam.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum1_kvdl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum1_mr_tcam.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum2_acl_tcam.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum2_kvdl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum2_mr_tcam.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_acl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_acl_atcam.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_acl_bloom_filter.c mlxsw: Use size_mul() in call to struct_size() 2024-11-18 11:42:47 +01:00
spectrum_acl_ctcam.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_acl_erp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_acl_flex_actions.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_acl_flex_actions.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_acl_flex_keys.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_acl_tcam.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_acl_tcam.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_buffers.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_cnt.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_cnt.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_dcb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_dpipe.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_dpipe.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_ethtool.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_fid.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_flow.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_flower.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_ipip.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_ipip.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_kvdl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_matchall.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_mr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_mr.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_mr_tcam.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_mr_tcam.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_nve.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_nve.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_nve_vxlan.c mlxsw: fix mlxsw_sp2_nve_vxlan_learning_set() return type 2024-11-08 11:25:45 +01:00
spectrum_policer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_ptp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_ptp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_qdisc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_router.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_router.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_span.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_span.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_switchdev.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_switchdev.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_trap.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectrum_trap.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
switchib.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
switchx2.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trap.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
txheader.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00