PCI fixes for 2.6.26
I'll stop making predictions about whether this is the last pull request for 2.6.26 or not, but it is an important one. It turns out that we've had a trivial DoS on machines containing PCI devices with bad VPDs. We're entertaining a few options for a scalable, long term fix, but in the meantime, restricting access to the sysfs VPD file seems prudent. I've included the patch in lieu of a diffstat since it's so small.
Thanks,
Jesse
Ben Hutchings (1):
PCI: Restrict VPD read permission to root
drivers/pci/pci-sysfs.c +0 -0
@@ -738,7 +738,7 @@ int __must_check pci_create_sysfs_dev_files (struct
pci_dev
pdev->vpd->attr = attr;
attr->size = pdev->vpd->ops->get_size(pdev);
attr->attr.name = "vpd";
- attr->attr.mode = S_IRUGO | S_IWUSR;
+ attr->attr.mode = S_IRUSR | S_IWUSR;
attr->read = pci_read_vpd;
attr->write = pci_write_vpd;
retval = sysfs_create_bin_file(&pdev->dev.kobj, attr);Quoted 6 lines · Jesse Barnes
I'll stop making predictions about whether this is the last pull request for 2.6.26 or not, but it is an important one. It turns out that we've had a trivial DoS on machines containing PCI devices with bad VPDs. We're entertaining a few options for a scalable, long term fix, but in the meantime, restricting access to the sysfs VPD file seems prudent. I've included the patch in lieu of a diffstat since it's so small.
Ok, doesn't look like you've pulled yet, so I queued up a couple more crash fixes (shortlog & diffstat include previous stuff as well).
Alex Chiang (1):
PCI: acpiphp: cleanup notify handler on all root bridges
Ben Hutchings (1):
PCI: Restrict VPD read permission to root
Benjamin Li (1):
PCI: Limit VPD read/write lengths for Broadcom 5706, 5708, 5709 rev.
drivers/pci/access.c | 14 +++--------- drivers/pci/hotplug/acpiphp_glue.c | 17 ++++++++++++-- drivers/pci/pci-sysfs.c | 4 +-- drivers/pci/pci.h | 2 - drivers/pci/quirks.c | 42 +++++++++++++++++++++++++++++++++++++ 5 files changed, 63 insertions(+), 16 deletions(-)
Thanks,
Jesse
Quoted 3 lines · Jesse Barnes
Ok, doesn't look like you've pulled yet, so I queued up a couple more crash fixes (shortlog & diffstat include previous stuff as well).
Well, I won't be pulling, since you don't even tell me where to pull _from_, in either of your emails.
Yeah, yeah, I could easily guess, and it would work, but I'm not going to. Please just always include the repo URL and branch to pull from.
Linus
Quoted 9 lines · Linus Torvalds
Quoted 2 lines · Jesse Barnes
Ok, doesn't look like you've pulled yet, so I queued up a couple more crash fixes (shortlog & diffstat include previous stuff as well).
Well, I won't be pulling, since you don't even tell me where to pull _from_, in either of your emails.
Yeah, yeah, I could easily guess, and it would work, but I'm not going to. Please just always include the repo URL and branch to pull from.
Oh I fail. I'll send a fresh pull request.
Jesse