]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
p54: prevent speculative execution
authorElena Reshetova <elena.reshetova@intel.com>
Thu, 4 Jan 2018 09:38:52 +0000 (01:38 -0800)
committerKirtikar Kashyap <kirtikar.kashyap@oracle.com>
Fri, 12 Jan 2018 18:20:00 +0000 (10:20 -0800)
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>
Orabug: 27340445
CVE: CVE-2017-5753

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
Conflicts:
patch refers to drivers/net/wireless/intersil/p54/main.c
code base has drivers/net/wireless/p54/main.c

Reviewed-by: John Haxby <john.haxby@oracle.com>
Signed-off-by: Kirtikar Kashyap <kirtikar.kashyap@oracle.com>
drivers/net/wireless/p54/main.c

index e79674f73dc5766cda5bfae2c1762a5aeb98f863..b79bb7238892f0701a9c9c7898073c577f554a9b 100644 (file)
@@ -417,6 +417,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);