From: Jerome Pouiller <Jerome.Pouiller@silabs.com> To: "devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org> Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Jerome Pouiller <Jerome.Pouiller@silabs.com>, kbuild test robot <lkp@intel.com>, Dan Carpenter <dan.carpenter@oracle.com> Subject: [PATCH] staging: wfx: fix potential vulnerability to spectre Date: Fri, 11 Oct 2019 10:15:54 +0000 [thread overview] Message-ID: <20191011101551.30946-1-Jerome.Pouiller@silabs.com> (raw) From: Jérôme Pouiller <jerome.pouiller@silabs.com> array_index_nospec() should be applied after a bound check. Fixes: 9bca45f3d6924f19f29c0d019e961af3f41bdc9e ("staging: wfx: allow to send 802.11 frames") Reported-by: kbuild test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> --- drivers/staging/wfx/wfx.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index 489836837b0a..4c0f2836015c 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -138,6 +138,7 @@ static inline struct wfx_vif *wdev_to_wvif(struct wfx_dev *wdev, int vif_id) dev_dbg(wdev->dev, "requesting non-existent vif: %d\n", vif_id); return NULL; } + vif_id = array_index_nospec(vif_id, ARRAY_SIZE(wdev->vif)); if (!wdev->vif[vif_id]) { dev_dbg(wdev->dev, "requesting non-allocated vif: %d\n", vif_id); return NULL; -- 2.20.1
WARNING: multiple messages have this Message-ID (diff)
From: Jerome Pouiller <Jerome.Pouiller@silabs.com> To: "devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, Dan Carpenter <dan.carpenter@oracle.com> Subject: [PATCH] staging: wfx: fix potential vulnerability to spectre Date: Fri, 11 Oct 2019 10:15:54 +0000 [thread overview] Message-ID: <20191011101551.30946-1-Jerome.Pouiller@silabs.com> (raw) From: Jérôme Pouiller <jerome.pouiller@silabs.com> array_index_nospec() should be applied after a bound check. Fixes: 9bca45f3d6924f19f29c0d019e961af3f41bdc9e ("staging: wfx: allow to send 802.11 frames") Reported-by: kbuild test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> --- drivers/staging/wfx/wfx.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index 489836837b0a..4c0f2836015c 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -138,6 +138,7 @@ static inline struct wfx_vif *wdev_to_wvif(struct wfx_dev *wdev, int vif_id) dev_dbg(wdev->dev, "requesting non-existent vif: %d\n", vif_id); return NULL; } + vif_id = array_index_nospec(vif_id, ARRAY_SIZE(wdev->vif)); if (!wdev->vif[vif_id]) { dev_dbg(wdev->dev, "requesting non-allocated vif: %d\n", vif_id); return NULL; -- 2.20.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
next reply other threads:[~2019-10-11 10:15 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-10-11 10:15 Jerome Pouiller [this message] 2019-10-11 10:15 ` [PATCH] staging: wfx: fix potential vulnerability to spectre Jerome Pouiller 2019-10-11 12:10 ` Greg Kroah-Hartman 2019-10-11 12:10 ` Greg Kroah-Hartman 2019-10-11 12:35 ` Jerome Pouiller 2019-10-11 12:35 ` Jerome Pouiller 2019-10-11 12:54 ` Dan Carpenter 2019-10-11 12:54 ` Dan Carpenter 2019-10-11 12:54 ` Dan Carpenter 2019-10-11 12:54 ` Dan Carpenter
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20191011101551.30946-1-Jerome.Pouiller@silabs.com \ --to=jerome.pouiller@silabs.com \ --cc=dan.carpenter@oracle.com \ --cc=devel@driverdev.osuosl.org \ --cc=gregkh@linuxfoundation.org \ --cc=linux-kernel@vger.kernel.org \ --cc=lkp@intel.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.