]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
p54: prevent speculative execution
authorElena Reshetova <elena.reshetova@intel.com>
Wed, 30 Aug 2017 10:44:38 +0000 (13:44 +0300)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 5 Feb 2018 15:56:00 +0000 (16:56 +0100)
CVE-2017-5753 (Spectre v1 Intel)

Since the queue value in function p54_conf_tx()
seems to be controllable by userspace and later on
conditionally (upon bound check) used to resolve
priv->qos_params, insert an observable speculation
barrier before its usage. This should prevent
observable speculation on that branch and avoid
kernel memory leak.

Signed-off-by: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/net/wireless/intersil/p54/main.c

index d5a3bf91a03e7b838788342fdc7257d6674dbcd4..3d20b47409d87ec82b2ab8a146ab90c76d2e0de4 100644 (file)
@@ -415,6 +415,7 @@ static int p54_conf_tx(struct ieee80211_hw *dev,
 
        mutex_lock(&priv->conf_mutex);
        if (queue < dev->queues) {
+               osb();
                P54_SET_QUEUE(priv->qos_params[queue], params->aifs,
                        params->cw_min, params->cw_max, params->txop);
                ret = p54_set_edcf(priv);