From: Linus Torvalds Date: Sat, 31 Oct 2015 01:47:18 +0000 (-0700) Subject: Merge tag 'pci-v4.3-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci X-Git-Tag: v4.3~13 X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-linux.git;a=commitdiff_plain;h=f9793e379bbb1188c72d8a367083290a14f98c97;hp=9b971e771ece3f3fa9c6074e5a12d9304e5fa9ef Merge tag 'pci-v4.3-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fix from Bjorn Helgaas: "Sorry for this last-minute update; it's been in -next for quite a while, but I forgot about it until I started getting ready for the merge window. It's small and fixes a way a user could cause a panic via sysfs, so I think it's worth getting it in v4.3. NUMA: - Prevent out of bounds access in sysfs numa_node override (Sasha Levin)" * tag 'pci-v4.3-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: Prevent out of bounds access in numa_node override --- diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 312f23a8429c..92618686604c 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -216,7 +216,7 @@ static ssize_t numa_node_store(struct device *dev, if (ret) return ret; - if (!node_online(node)) + if (node >= MAX_NUMNODES || !node_online(node)) return -EINVAL; add_taint(TAINT_FIRMWARE_WORKAROUND, LOCKDEP_STILL_OK);