aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/nvram.c
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavo@embeddedor.com>2019-01-09 17:39:06 -0600
committerCorey Minyard <cminyard@mvista.com>2019-01-23 10:44:23 -0600
commita7102c7461794a5bb31af24b08e9e0f50038897a (patch)
treea3037c4ff4591c602b4746e948056da0940b5ad9 /drivers/char/nvram.c
parentipmi:ssif: Fix handling of multi-part return messages (diff)
downloadlinux-dev-a7102c7461794a5bb31af24b08e9e0f50038897a.tar.xz
linux-dev-a7102c7461794a5bb31af24b08e9e0f50038897a.zip
ipmi: msghandler: Fix potential Spectre v1 vulnerabilities
channel and addr->channel are indirectly controlled by user-space, hence leading to a potential exploitation of the Spectre variant 1 vulnerability. These issues were detected with the help of Smatch: drivers/char/ipmi/ipmi_msghandler.c:1381 ipmi_set_my_address() warn: potential spectre issue 'user->intf->addrinfo' [w] (local cap) drivers/char/ipmi/ipmi_msghandler.c:1401 ipmi_get_my_address() warn: potential spectre issue 'user->intf->addrinfo' [r] (local cap) drivers/char/ipmi/ipmi_msghandler.c:1421 ipmi_set_my_LUN() warn: potential spectre issue 'user->intf->addrinfo' [w] (local cap) drivers/char/ipmi/ipmi_msghandler.c:1441 ipmi_get_my_LUN() warn: potential spectre issue 'user->intf->addrinfo' [r] (local cap) drivers/char/ipmi/ipmi_msghandler.c:2260 check_addr() warn: potential spectre issue 'intf->addrinfo' [r] (local cap) Fix this by sanitizing channel and addr->channel before using them to index user->intf->addrinfo and intf->addrinfo, correspondingly. 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://lore.kernel.org/lkml/20180423164740.GY17484@dhcp22.suse.cz/ Cc: stable@vger.kernel.org Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Corey Minyard <cminyard@mvista.com>
Diffstat (limited to 'drivers/char/nvram.c')
0 files changed, 0 insertions, 0 deletions