linux/net/phonet
Gustavo A. R. Silva d686026b1e phonet: af_phonet: Fix Spectre v1 vulnerability
protocol is indirectly controlled by user-space, hence leading to
a potential exploitation of the Spectre variant 1 vulnerability.

This issue was detected with the help of Smatch:

net/phonet/af_phonet.c:48 phonet_proto_get() warn: potential spectre issue 'proto_tab' [w] (local cap)

Fix this by sanitizing protocol before using it to index proto_tab.

Notice that given that speculation windows are large, the policy is
to kill the speculation on the first load and not worry if it can be
completed with a dependent load/store [1].

[1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-12-22 15:08:15 -08:00
..
af_phonet.c phonet: af_phonet: Fix Spectre v1 vulnerability 2018-12-22 15:08:15 -08:00
datagram.c net: phonet: mark phonet_protocol as const 2017-10-07 23:15:08 +01:00
Kconfig
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pep-gprs.c net: Fix inconsistent teardown and release of private netdev state. 2017-06-07 15:53:24 -04:00
pep.c net: phonet: mark phonet_protocol as const 2017-10-07 23:15:08 +01:00
pn_dev.c proc: introduce proc_create_net{,_data} 2018-05-16 07:24:30 +02:00
pn_netlink.c net: use rtnl_register_module where needed 2017-12-04 11:32:39 -05:00
socket.c Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL 2018-06-28 10:40:47 -07:00
sysctl.c