diff options
author | Youness Alaoui <kakaroto@kakaroto.homelinux.net> | 2017-07-26 18:03:36 -0400 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2017-08-10 15:18:11 +0000 |
commit | a54ceb1dbe76e76ca8701dbda3e5baf011b16d6d (patch) | |
tree | f27ce3b104511a8b1598e77858cb42b41cb5e515 /COPYING | |
parent | 67d71792929f94d4638a3663f2fc19aea4918681 (diff) | |
download | flashrom-a54ceb1dbe76e76ca8701dbda3e5baf011b16d6d.tar.gz flashrom-a54ceb1dbe76e76ca8701dbda3e5baf011b16d6d.tar.bz2 flashrom-a54ceb1dbe76e76ca8701dbda3e5baf011b16d6d.zip |
rpci: Use pci_dev struct pointer to avoid API breaks
The pci_dev structure is never meant to be used as is, but always as a
pointer. By using the struct itself in undo_pci_write_data, we are risking
data corruption, or buffer overflows if the structure size changes.
This is especially apparent on my system where flashrom segfaults
because I compile it with pciutils 3.3.0 and I run it on a system
with pciutils 3.5.2. The struture size is different and causes a
struct with the wrong size to be sent to the library, with invalid
internal field values.
This has been discovered and discussed in Change ID 18925 [1]
[1] https://review.coreboot.org/#/c/18925/
Change-Id: Icde2e587992ba964d4ff92c33aa659850ba06298
Signed-off-by: Youness Alaoui <kakaroto@kakaroto.homelinux.net>
Reviewed-on: https://review.coreboot.org/20784
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions