linux/net/mac80211
Ping-Ke Shih 2be24c47ac wifi: mac80211: don't return unset power in ieee80211_get_tx_power()
[ Upstream commit e160ab8516 ]

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>
2023-11-28 17:06:55 +00:00
..
aead_api.c
aead_api.h
aes_ccm.h
aes_cmac.c
aes_cmac.h
aes_gcm.h
aes_gmac.c
aes_gmac.h
agg-rx.c
agg-tx.c
airtime.c
cfg.c wifi: mac80211: don't return unset power in ieee80211_get_tx_power() 2023-11-28 17:06:55 +00:00
chan.c wifi: mac80211: recalc chanctx mindef before assigning 2023-06-09 10:34:15 +02:00
debug.h
debugfs_key.c
debugfs_key.h
debugfs_netdev.c wifi: mac80211: Fix permissions for valid_links debugfs entry 2023-07-19 16:21:09 +02:00
debugfs_netdev.h
debugfs_sta.c
debugfs_sta.h
debugfs.c
debugfs.h
driver-ops.c
driver-ops.h
eht.c
ethtool.c
fils_aead.c
fils_aead.h
he.c wifi: mac80211: use correct iftype HE cap 2023-06-14 11:15:18 +02:00
ht.c
ibss.c wifi: mac80211: work around Cisco AP 9115 VHT MPDU length 2023-10-25 12:03:10 +02:00
ieee80211_i.h wifi: mac80211: move sched-scan stop work to wiphy work 2023-11-20 11:51:51 +01:00
iface.c wifi: mac80211: move scan work to wiphy work 2023-11-20 11:51:51 +01:00
Kconfig
key.c wifi: mac80211: fix potential key use-after-free 2023-10-10 22:00:41 +02:00
key.h
led.c
led.h
link.c wifi: mac80211: fix link activation settings order 2023-06-21 16:00:59 +02:00
main.c wifi: mac80211: move sched-scan stop work to wiphy work 2023-11-20 11:51:51 +01:00
Makefile
mesh_hwmp.c
mesh_pathtbl.c
mesh_plink.c wifi: mac80211: work around Cisco AP 9115 VHT MPDU length 2023-10-25 12:03:10 +02:00
mesh_ps.c
mesh_sync.c
mesh.c
mesh.h
michael.c
michael.h
mlme.c wifi: mac80211: work around Cisco AP 9115 VHT MPDU length 2023-10-25 12:03:10 +02:00
ocb.c
offchannel.c wifi: mac80211: move offchannel works to wiphy work 2023-11-20 11:51:51 +01:00
pm.c
rate.c
rate.h
rc80211_minstrel_ht_debugfs.c
rc80211_minstrel_ht.c
rc80211_minstrel_ht.h
rx.c wifi: mac80211: check S1G action frame size 2023-09-23 11:11:02 +02:00
s1g.c
scan.c wifi: mac80211: move sched-scan stop work to wiphy work 2023-11-20 11:51:51 +01:00
spectmgmt.c
sta_info.c wifi: mac80211: fix # of MSDU in A-MSDU calculation 2023-11-20 11:51:51 +01:00
sta_info.h
status.c
tdls.c
tkip.c
tkip.h
trace_msg.h
trace.c
trace.h wifi: mac80211: fix min center freq offset tracing 2023-05-24 17:32:46 +01:00
tx.c wifi: mac80211: allow transmitting EAPOL frames with tainted key 2023-10-25 12:03:10 +02:00
util.c wifi: mac80211: move scan work to wiphy work 2023-11-20 11:51:51 +01:00
vht.c wifi: mac80211: work around Cisco AP 9115 VHT MPDU length 2023-10-25 12:03:10 +02:00
wep.c
wep.h
wme.c wifi: mac80211: fix qos on mesh interfaces 2023-03-30 12:49:27 +02:00
wme.h
wpa.c
wpa.h