]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
applicom: Fix potential Spectre v1 vulnerabilities
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Wed, 9 Jan 2019 22:05:10 +0000 (16:05 -0600)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 24 Apr 2019 08:09:12 +0000 (10:09 +0200)
commitc69058231b780a0665915d31686965171db4eb03
tree12830bd65932f199304066b9d4759cb748ecc61f
parentf8c94aae707dc0ef5d9df372f594d6c4e80d705b
applicom: Fix potential Spectre v1 vulnerabilities

IndexCard 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:

drivers/char/applicom.c:418 ac_write() warn: potential spectre issue 'apbs' [r]
drivers/char/applicom.c:728 ac_ioctl() warn: potential spectre issue 'apbs' [r] (local cap)

Fix this by sanitizing IndexCard before using it to index apbs.

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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CVE-2017-5753

(cherry picked from commit d7ac3c6ef5d8ce14b6381d52eb7adafdd6c8bb3c)
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/char/applicom.c