lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 29 Feb 2016 03:04:48 -0800
From:	tip-bot for Thomas Gleixner <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	bp@...en8.de, andi.kleen@...el.com, jolsa@...hat.com,
	vincent.weaver@...ne.edu, eranian@...gle.com, hpa@...or.com,
	torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org,
	peterz@...radead.org, tglx@...utronix.de, acme@...hat.com,
	kan.liang@...el.com, jacob.jun.pan@...ux.intel.com,
	mingo@...nel.org, harish.chegondi@...el.com
Subject: [tip:perf/core] perf/x86/intel/uncore: Add sanity checks for PCI
 dev package id

Commit-ID:  83f8ebd2eb459b21e8e74d43c75e1be666ec8b97
Gitweb:     http://git.kernel.org/tip/83f8ebd2eb459b21e8e74d43c75e1be666ec8b97
Author:     Thomas Gleixner <tglx@...utronix.de>
AuthorDate: Mon, 22 Feb 2016 22:19:10 +0000
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Mon, 29 Feb 2016 09:35:14 +0100

perf/x86/intel/uncore: Add sanity checks for PCI dev package id

The storage array is size limited, but misses a sanity check

Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: Andi Kleen <andi.kleen@...el.com>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Harish Chegondi <harish.chegondi@...el.com>
Cc: Jacob Pan <jacob.jun.pan@...ux.intel.com>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Kan Liang <kan.liang@...el.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Stephane Eranian <eranian@...gle.com>
Cc: Vince Weaver <vincent.weaver@...ne.edu>
Cc: linux-kernel@...r.kernel.org
Link: http://lkml.kernel.org/r/20160222221010.929967806@linutronix.de
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 arch/x86/events/intel/uncore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/events/intel/uncore.c b/arch/x86/events/intel/uncore.c
index 25e6203..42ea435 100644
--- a/arch/x86/events/intel/uncore.c
+++ b/arch/x86/events/intel/uncore.c
@@ -882,7 +882,7 @@ static int uncore_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id
 	int phys_id, ret;
 
 	phys_id = uncore_pcibus_to_physid(pdev->bus);
-	if (phys_id < 0)
+	if (phys_id < 0 || phys_id >= UNCORE_SOCKET_MAX)
 		return -ENODEV;
 
 	if (UNCORE_PCI_DEV_TYPE(id->driver_data) == UNCORE_EXTRA_PCI_DEV) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ