kernel_samsung_a53x/net/mac80211
Ping-Ke Shih 4bed34e297 wifi: mac80211: don't return unset power in ieee80211_get_tx_power()
[ Upstream commit e160ab85166e77347d0cbe5149045cb25e83937f ]

We can get a UBSAN warning if ieee80211_get_tx_power() returns the
INT_MIN value mac80211 internally uses for "unset power level".

 UBSAN: signed-integer-overflow in net/wireless/nl80211.c:3816:5
 -2147483648 * 100 cannot be represented in type 'int'
 CPU: 0 PID: 20433 Comm: insmod Tainted: G        WC OE
 Call Trace:
  dump_stack+0x74/0x92
  ubsan_epilogue+0x9/0x50
  handle_overflow+0x8d/0xd0
  __ubsan_handle_mul_overflow+0xe/0x10
  nl80211_send_iface+0x688/0x6b0 [cfg80211]
  [...]
  cfg80211_register_wdev+0x78/0xb0 [cfg80211]
  cfg80211_netdev_notifier_call+0x200/0x620 [cfg80211]
  [...]
  ieee80211_if_add+0x60e/0x8f0 [mac80211]
  ieee80211_register_hw+0xda5/0x1170 [mac80211]

In this case, simply return an error instead, to indicate
that no data is available.

Cc: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://lore.kernel.org/r/20230203023636.4418-1-pkshih@realtek.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 11:43:12 +01:00
..
aead_api.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aead_api.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aes_ccm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aes_cmac.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aes_cmac.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aes_gcm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aes_gmac.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aes_gmac.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
agg-rx.c Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
agg-tx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
airtime.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cfg.c wifi: mac80211: don't return unset power in ieee80211_get_tx_power() 2024-11-18 11:43:12 +01:00
chan.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debug.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debugfs.c Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
debugfs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debugfs_key.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debugfs_key.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debugfs_netdev.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debugfs_netdev.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debugfs_sta.c Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
debugfs_sta.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
driver-ops.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
driver-ops.h Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
ethtool.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fils_aead.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fils_aead.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
he.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ht.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ibss.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ieee80211_i.h Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
iface.c Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
key.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
key.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
led.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
led.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
main.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mesh.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mesh.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mesh_hwmp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mesh_pathtbl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mesh_plink.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mesh_ps.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mesh_sync.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
michael.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
michael.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mlme.c Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
ocb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
offchannel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rate.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rate.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rc80211_minstrel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rc80211_minstrel.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rc80211_minstrel_debugfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rc80211_minstrel_ht.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rc80211_minstrel_ht.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rc80211_minstrel_ht_debugfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rx.c Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
s1g.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scan.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spectmgmt.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sta_info.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sta_info.h Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
status.c Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
tdls.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tkip.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tkip.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace.h Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
trace_msg.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tx.c wifi: mac80211: allow transmitting EAPOL frames with tainted key 2024-11-08 11:26:16 +01:00
util.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vht.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wep.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wep.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wme.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wme.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wpa.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wpa.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00