]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: fix potential overflow when multiplying to u32 integers
authorColin Ian King <colin.king@canonical.com>
Fri, 5 Feb 2021 17:53:52 +0000 (17:53 +0000)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 12 Feb 2021 07:54:42 +0000 (08:54 +0100)
commit05df5b0c35c79cf7853f5565b564c210337e8624
treeb2b0fca5c713d41010dc26a4c7590160c4c1fd11
parentae4b92657cc8908418e8d3af1a4b12311ed8210a
mac80211: fix potential overflow when multiplying to u32 integers

The multiplication of the u32 variables tx_time and estimated_retx is
performed using a 32 bit multiplication and the result is stored in
a u64 result. This has a potential u32 overflow issue, so avoid this
by casting tx_time to a u64 to force a 64 bit multiply.

Addresses-Coverity: ("Unintentional integer overflow")
Fixes: fd59e6c5619f ("mac80211: code for on-demand Hybrid Wireless Mesh Protocol")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210205175352.208841-1-colin.king@canonical.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mesh_hwmp.c