linux-stable/net/ethtool
Maxim Korotkov 2f8f15f3f2 ethtool: avoiding integer overflow in ethtool_phys_id()
[ Upstream commit 64a8f8f712 ]

The value of an arithmetic expression "n * id.data" is subject
to possible overflow due to a failure to cast operands to a larger data
type before performing arithmetic. Used macro for multiplication instead
operator for avoiding overflow.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Maxim Korotkov <korotkov.maxim.s@gmail.com>
Reviewed-by: Alexander Lobakin <alexandr.lobakin@intel.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20221122122901.22294-1-korotkov.maxim.s@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-31 13:26:45 +01:00
..
Makefile ethtool: Add ability to control transceiver modules' power mode 2021-10-06 17:47:49 -07:00
bitset.c ethtool: fix stack overflow in ethnl_parse_bitset() 2020-12-09 15:50:38 -08:00
bitset.h
cabletest.c net: delete extra space and tab in blank line 2022-07-25 19:38:31 -07:00
channels.c ethtool: use ethnl_parse_header_dev_put() 2021-12-15 10:27:47 +00:00
coalesce.c ethtool: use ethnl_parse_header_dev_put() 2021-12-15 10:27:47 +00:00
common.c ethtool: Add 10base-T1L link mode entry 2022-05-01 17:45:35 +01:00
common.h net: ethtool: Export helpers for getting EEPROM info 2021-04-11 16:34:56 -07:00
debug.c ethtool: use ethnl_parse_header_dev_put() 2021-12-15 10:27:47 +00:00
eee.c ethtool: use ethnl_parse_header_dev_put() 2021-12-15 10:27:47 +00:00
eeprom.c ethtool: eeprom: fix null-deref on genl_info in dump 2022-11-04 00:00:24 +09:00
features.c ethtool: use ethnl_parse_header_dev_put() 2021-12-15 10:27:47 +00:00
fec.c ethtool: use ethnl_parse_header_dev_put() 2021-12-15 10:27:47 +00:00
ioctl.c ethtool: avoiding integer overflow in ethtool_phys_id() 2022-12-31 13:26:45 +01:00
linkinfo.c ethtool: use ethnl_parse_header_dev_put() 2021-12-15 10:27:47 +00:00
linkmodes.c ethtool: use ethnl_parse_header_dev_put() 2021-12-15 10:27:47 +00:00
linkstate.c ethtool: link up ethnl_header_policy as a nested policy 2020-10-06 06:25:55 -07:00
module.c ethtool: use ethnl_parse_header_dev_put() 2021-12-15 10:27:47 +00:00
netlink.c net: rename reference+tracking helpers 2022-06-09 21:52:55 -07:00
netlink.h net: rename reference+tracking helpers 2022-06-09 21:52:55 -07:00
pause.c ethtool: use ethnl_parse_header_dev_put() 2021-12-15 10:27:47 +00:00
phc_vclocks.c ethtool: add a new command for getting PHC virtual clocks 2021-07-01 13:08:18 -07:00
privflags.c ethtool: use ethnl_parse_header_dev_put() 2021-12-15 10:27:47 +00:00
rings.c net: ethtool: move checks before rtnl_lock() in ethnl_set_rings 2022-04-15 11:41:45 -07:00
stats.c ethtool: stats: Use struct_group() to clear all stats at once 2021-11-19 11:53:02 +00:00
strset.c ethtool: strset: fix message length calculation 2021-06-14 12:14:24 -07:00
tsinfo.c ethtool: link up ethnl_header_policy as a nested policy 2020-10-06 06:25:55 -07:00
tunnels.c ethtool: use ethnl_parse_header_dev_put() 2021-12-15 10:27:47 +00:00
wol.c ethtool: use ethnl_parse_header_dev_put() 2021-12-15 10:27:47 +00:00